Skip to content

Commit

Permalink
event changes
Browse files Browse the repository at this point in the history
  • Loading branch information
smokey019 committed Jan 24, 2024
1 parent d0efad1 commit 120d30c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
14 changes: 9 additions & 5 deletions src/smokemotes/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -224,16 +224,20 @@ class SmokeysUtils extends Addon {
}

onEnable() {
this.log.debug("Smokey's Utilities module was enabled successfully.");

window.addEventListener('load', () => {
if (document.readyState != "complete") {
window.addEventListener('load', () => {
this.keep_hd_video();
});
} else {
this.keep_hd_video();
});
}

this.mod_keybind_handler();

this.ViewerCard.on('mount', this.updateCard, this);
this.ViewerCard.on('unmount', this.unmountCard, this);

this.log.debug("Smokey's Utilities module was enabled successfully.");
}

/**
Expand Down Expand Up @@ -408,7 +412,7 @@ class SmokeysUtils extends Addon {
true
);
} catch (err) {
this.log.warn('Unable to install document visibility hook.', err);
this.log.warn('Unable to install always HD document visibility hook.', err);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/smokemotes/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"enabled": true,
"requires": [],
"icon": "https://i.imgur.com/a98FccA.png",
"version": "1.2.0",
"version": "1.2.1",
"short_name": "smokeys_utils",
"name": "Smokey's Utilities",
"author": "Smokey",
Expand Down

0 comments on commit 120d30c

Please sign in to comment.