diff --git a/youtube-addiction-control-extension-firefox.js b/youtube-addiction-control-extension-firefox.js index e42a28a..4cbdf59 100644 --- a/youtube-addiction-control-extension-firefox.js +++ b/youtube-addiction-control-extension-firefox.js @@ -56,7 +56,7 @@ window.ytacListener = (message) => { console.log("[YTAC] received browser action " + message.command); if (message.command == "comments") { console.log("[YTAC] showing comments"); - document.getElementById("ytaccomments").remove(); + document.getElementById("ytaccomments").remove(); } else if (message.command == "sidebar") { console.log("[YTAC] showing video sidebar"); document.getElementById("ytacsidebar").remove(); @@ -64,12 +64,15 @@ window.ytacListener = (message) => { } else if (message.command == "invideo") { console.log("[YTAC] showing in-video suggestions"); document.getElementById("ytacinvideo").remove(); + addClickListeners("invideo"); } else if (message.command == "endscreen") { console.log("[YTAC] showing endscreen"); document.getElementById("ytacendscreen").remove(); + addClickListeners("endscreen"); } else if (message.command == "notification") { console.log("[YTAC] showing notification bell"); document.getElementById("ytacnotification").remove(); + addClickListeners("notification"); } }; browser.runtime.onMessage.addListener(window.ytacListener);