#1074 - Extension is freezing some Youtube pages

#846 - Infinite Recursion on Some Video
This commit is contained in:
Anarios committed 2024-08-26 11:42:20 +02:00
1 parent a42df5bb82
commit c8f23b2c7d
5 files changed
+122 -26

No files matched your search

+9 -5
View File
@@ -6,11 +6,7 @@ import { isShorts, setInitialState, initExtConfig } from "./src/state";
//--- Import Video & Browser Functions ---//
import { getBrowser, isVideoLoaded, cLog } from "./src/utils";
import {
addLikeDislikeEventListener,
createSmartimationObserver,
storageChangeHandler,
} from "./src/events";
import { addLikeDislikeEventListener, createSmartimationObserver, storageChangeHandler } from "./src/events";
await initExtConfig();
@@ -47,3 +43,11 @@ document.addEventListener("yt-navigate-finish", async function (event) {
if (jsInitChecktimer !== null) clearInterval(jsInitChecktimer);
await setEventListeners();
});
const s = document.createElement("script");
s.src = chrome.runtime.getURL("menu-fixer.js");
s.onload = function () {
this.remove();
};
// see also "Dynamic values in the injected code" section in this answer
(document.head || document.documentElement).appendChild(s);