From fc6341cb486af7c18ae1a1ce970e6ac91b097078 Mon Sep 17 00:00:00 2001 From: Arne Keller Date: Sat, 13 Jul 2019 12:11:25 +0200 Subject: [PATCH] Rehide other elements too --- youtube-addiction-control-extension-firefox.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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);