Extension fix - disappearing dislike counter (#999)

* Fix rate bar jumping around in width

* Fix disappearing dislike counter

* Fix disappearing dislike count on button focus/unfocus by @kokonguyen191

* Fix event listeners being thrown away by YouTube in some cases

* Extension fix for disappearing dislikes while smartimations play

* Check if smartimationContainer exists
This commit is contained in:
Moondarker authored and GitHub committed 2023-12-12 19:33:37 +01:00
1 parent 2f2153ed37
commit 6791543617
5 files changed
+65 -42

No files matched your search

+2 -2
View File
@@ -19,9 +19,9 @@ import {
isVideoLoaded,
cLog,
} from "./src/utils";
import { createRateBar } from "./src/bar";
import {
addLikeDislikeEventListener,
createSmartimationObserver,
storageChangeHandler,
} from "./src/events";
@@ -37,6 +37,7 @@ async function setEventListeners (evt) {
clearInterval(jsInitChecktimer);
jsInitChecktimer = null;
addLikeDislikeEventListener();
createSmartimationObserver();
await setInitialState();
isSetInitialStateDone = true;
getBrowser().storage.onChanged.addListener(storageChangeHandler);
@@ -57,6 +58,5 @@ await setEventListeners();
document.addEventListener("yt-navigate-finish", async function (event) {
if (jsInitChecktimer !== null) clearInterval(jsInitChecktimer);
window.returnDislikeButtonlistenersSet = false;
await setEventListeners();
});