mirror of
https://github.com/Alvin-Zilverstand/return-youtube-dislike.git
synced 2026-11-30 01:47:54 +01:00
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:
1 parent
2f2153ed37
commit
6791543617
5 files changed
+65
-42
No files matched your search
@@ -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();
|
||||
});
|
||||
Reference in new issue
Block a user