Hide the next video button in the video control bar

This commit is contained in:
Arne Keller 2020-08-16 09:41:50 +02:00
parent 9bda48232c
commit 772a77c7e2
4 changed files with 4 additions and 10 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
web-ext-artifacts

View File

@ -2,7 +2,7 @@
"description": "Enables you to fight your youtube addiction by hiding video suggestions and related 'features' of YouTube's website. If you really want to, you can temporarily unhide those elements.", "description": "Enables you to fight your youtube addiction by hiding video suggestions and related 'features' of YouTube's website. If you really want to, you can temporarily unhide those elements.",
"manifest_version": 2, "manifest_version": 2,
"name": "YT addiction control", "name": "YT addiction control",
"version": "0.1.1", "version": "0.1.3",
"homepage_url": "https://gitlab.com/arnekeller/yt-addiction-control", "homepage_url": "https://gitlab.com/arnekeller/yt-addiction-control",
"icons": { "icons": {

View File

@ -1,7 +0,0 @@
"theme_icons": [{
"light": "icons/beasts-32-light.png",
"dark": "icons/beasts-32.png",
"size": 32
}],
(4) tab title notification count

View File

@ -12,7 +12,7 @@ window.ytacCSS = {
"endscreen": ".videowall-endscreen", "endscreen": ".videowall-endscreen",
"invideo": ".ytp-ce-video", "invideo": ".ytp-ce-video",
"notification": "ytd-notification-topbar-button-renderer", "notification": "ytd-notification-topbar-button-renderer",
"other": "#newness-dot, .ytp-spinner" "other": "#newness-dot, .ytp-spinner, .ytp-next-button"
}; };
const INVISIBLE = " { display: none !important; }"; const INVISIBLE = " { display: none !important; }";
@ -83,7 +83,7 @@ function modifyThings() {
// 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, trying again in 10s ...");
setTimeout(modifyThings, 10000); setTimeout(modifyThings, 10000);
} else if (autoplayButton.getAttribute("aria-pressed") === "true") { } else if (autoplayButton.getAttribute("aria-pressed") === "true") {
autoplayButton.click(); autoplayButton.click();