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