mirror of
https://gitlab.com/arnekeller/yt-addiction-control.git
synced 2024-11-09 10:20:39 +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");
|
console.log("[YTAC] added action listener");
|
||||||
|
|
||||||
function modifyThings() {
|
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
|
// description expander
|
||||||
/*
|
let showMoreButton = document.querySelector(".ytd-video-secondary-info-renderer > #more");
|
||||||
let showMoreButton = document.getElementsByClassName("more-button");
|
if (!showMoreButton) {
|
||||||
if (showMoreButton.length == 0) {
|
console.warn("[YTAC] could not locate description expander");
|
||||||
console.warn("[YTAC] could not locate description expander, trying again in 5s");
|
//setTimeout(modifyThings, 5000);
|
||||||
setTimeout(modifyThings, 5000);
|
|
||||||
} else {
|
} else {
|
||||||
showMoreButton[0].click();
|
showMoreButton.click();
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
modifyThings();
|
modifyThings();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user