Skip to content

Commit

Permalink
Smokey's Utilities 1.2.1
Browse files Browse the repository at this point in the history
* Changed: Reworked the event hook for keep video HD. This should hopefully prevent Twitch pages from not loading properly (on first load) and also no fallback in stream quality when you're not focused on that tab.
  • Loading branch information
smokey019 authored Jan 24, 2024
1 parent 180ca13 commit b071cbf
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 b071cbf

Please sign in to comment.