mirror of
https://gitlab.com/arnekeller/yt-addiction-control.git
synced 2024-11-09 10:20:39 +00:00
Disable description displayer
This commit is contained in:
parent
39fdbd3ac1
commit
9bda48232c
@ -79,16 +79,18 @@ 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;
|
//let repeating = false;
|
||||||
// autoplay disabler
|
// autoplay disabler
|
||||||
let autoplayButton = document.getElementById("toggle");
|
let autoplayButton = document.getElementById("toggle");
|
||||||
if (autoplayButton == null) {
|
if (autoplayButton == null) {
|
||||||
console.warn("[YTAC] could not locate autoplay button");
|
console.warn("[YTAC] could not locate autoplay button");
|
||||||
|
setTimeout(modifyThings, 10000);
|
||||||
} else if (autoplayButton.getAttribute("aria-pressed") === "true") {
|
} else if (autoplayButton.getAttribute("aria-pressed") === "true") {
|
||||||
autoplayButton.click();
|
autoplayButton.click();
|
||||||
}
|
}
|
||||||
|
|
||||||
// description expander
|
// description expander
|
||||||
|
/*
|
||||||
let showMoreButton = document.getElementsByClassName("more-button");
|
let showMoreButton = document.getElementsByClassName("more-button");
|
||||||
if (showMoreButton.length == 0) {
|
if (showMoreButton.length == 0) {
|
||||||
console.warn("[YTAC] could not locate description expander, trying again in 5s");
|
console.warn("[YTAC] could not locate description expander, trying again in 5s");
|
||||||
@ -96,6 +98,7 @@ function modifyThings() {
|
|||||||
} else {
|
} else {
|
||||||
showMoreButton[0].click();
|
showMoreButton[0].click();
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
modifyThings();
|
modifyThings();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user