diff --git a/src/smokemotes/index.jsx b/src/smokemotes/index.jsx index 1b0ba8ea..9fc94f76 100644 --- a/src/smokemotes/index.jsx +++ b/src/smokemotes/index.jsx @@ -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."); } /** @@ -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); } } } diff --git a/src/smokemotes/manifest.json b/src/smokemotes/manifest.json index d9457526..9dcee884 100644 --- a/src/smokemotes/manifest.json +++ b/src/smokemotes/manifest.json @@ -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",