From 9bda48232c75f0754a4f8b21d41c6d067e8da395 Mon Sep 17 00:00:00 2001 From: Arne Keller Date: Tue, 23 Jul 2019 17:19:22 +0200 Subject: [PATCH] Disable description displayer --- youtube-addiction-control-extension-firefox.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/youtube-addiction-control-extension-firefox.js b/youtube-addiction-control-extension-firefox.js index 8cbe82c..781d930 100644 --- a/youtube-addiction-control-extension-firefox.js +++ b/youtube-addiction-control-extension-firefox.js @@ -79,16 +79,18 @@ browser.runtime.onMessage.addListener(window.ytacListener); console.log("[YTAC] added action listener"); function modifyThings() { - let repeating = false; + //let repeating = false; // autoplay disabler let autoplayButton = document.getElementById("toggle"); if (autoplayButton == null) { console.warn("[YTAC] could not locate autoplay button"); + setTimeout(modifyThings, 10000); } else if (autoplayButton.getAttribute("aria-pressed") === "true") { autoplayButton.click(); } // description expander + /* let showMoreButton = document.getElementsByClassName("more-button"); if (showMoreButton.length == 0) { console.warn("[YTAC] could not locate description expander, trying again in 5s"); @@ -96,6 +98,7 @@ function modifyThings() { } else { showMoreButton[0].click(); } + */ } modifyThings(); @@ -107,4 +110,4 @@ function hideNotificationCount() { a.innerText = a.innerText.substr(a.innerText.indexOf(")") + 2); } } -setInterval(hideNotificationCount, 1000); \ No newline at end of file +setInterval(hideNotificationCount, 1000);