mirror of
https://gitlab.com/arnekeller/yt-addiction-control.git
synced 2024-11-08 18:00:38 +00:00
Fix description expander
This commit is contained in:
parent
772a77c7e2
commit
4e050b429f
@ -79,26 +79,14 @@ browser.runtime.onMessage.addListener(window.ytacListener);
|
||||
console.log("[YTAC] added action listener");
|
||||
|
||||
function modifyThings() {
|
||||
//let repeating = false;
|
||||
// autoplay disabler
|
||||
let autoplayButton = document.getElementById("toggle");
|
||||
if (autoplayButton == null) {
|
||||
console.warn("[YTAC] could not locate autoplay button, trying again in 10s ...");
|
||||
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");
|
||||
setTimeout(modifyThings, 5000);
|
||||
let showMoreButton = document.querySelector(".ytd-video-secondary-info-renderer > #more");
|
||||
if (!showMoreButton) {
|
||||
console.warn("[YTAC] could not locate description expander");
|
||||
//setTimeout(modifyThings, 5000);
|
||||
} else {
|
||||
showMoreButton[0].click();
|
||||
showMoreButton.click();
|
||||
}
|
||||
*/
|
||||
}
|
||||
modifyThings();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user