mirror of
https://github.com/SoPat712/videospeed.git
synced 2025-08-21 18:08:46 -04:00
* Fix for #326, #269, #309 - previous approach disabled controller for local playback
This commit is contained in:

committed by
Ilya Grigorik

parent
70a055156e
commit
0999acc7fc
@@ -191,7 +191,7 @@ chrome.runtime.sendMessage({}, function(response) {
|
|||||||
window.onload = () => {
|
window.onload = () => {
|
||||||
initializeNow(window.document)
|
initializeNow(window.document)
|
||||||
};
|
};
|
||||||
if (document && document.doctype && document.doctype.name == "html") {
|
if (document) {
|
||||||
if (document.readyState === "complete") {
|
if (document.readyState === "complete") {
|
||||||
initializeNow(document);
|
initializeNow(document);
|
||||||
} else {
|
} else {
|
||||||
@@ -206,7 +206,7 @@ chrome.runtime.sendMessage({}, function(response) {
|
|||||||
|
|
||||||
function initializeNow(document) {
|
function initializeNow(document) {
|
||||||
// enforce init-once due to redundant callers
|
// enforce init-once due to redundant callers
|
||||||
if (document.body.classList.contains('vsc-initialized')) {
|
if (!document.body || document.body.classList.contains('vsc-initialized')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
document.body.classList.add('vsc-initialized');
|
document.body.classList.add('vsc-initialized');
|
||||||
|
Reference in New Issue
Block a user