summaryrefslogtreecommitdiff
path: root/global/.local/share/qutebrowser/greasemonkey/youtube.css.js
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-02-17 04:57:37 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-02-17 04:57:37 +0900
commit0423b9850f06a32ef102547c2dabc3015d379ecc (patch)
treeb9aae5725b58af13a2d65763e389f391ef3b62c8 /global/.local/share/qutebrowser/greasemonkey/youtube.css.js
parent618a7d709658ada71730ea3ff33f0ec7fd937c1e (diff)
updates
Diffstat (limited to 'global/.local/share/qutebrowser/greasemonkey/youtube.css.js')
-rw-r--r--global/.local/share/qutebrowser/greasemonkey/youtube.css.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/global/.local/share/qutebrowser/greasemonkey/youtube.css.js b/global/.local/share/qutebrowser/greasemonkey/youtube.css.js
new file mode 100644
index 0000000..e86edf9
--- /dev/null
+++ b/global/.local/share/qutebrowser/greasemonkey/youtube.css.js
@@ -0,0 +1,18 @@
+// ==UserScript==
+// @name YouTube
+// @include *://*.youtube.com/*
+// ==/UserScript==
+
+/* ~/.config/qutebrowser/greasemonkey/youtube.css.js :: */
+
+document.addEventListener('load', () => {
+ try { document.querySelector('.ad-showing video').currentTime = 99999 } catch {}
+ try { document.querySelector('.ytp-ad-skip-button').click() } catch {}
+}, true);
+
+GM_addStyle(`
+ ytd-compact-promoted-video-renderer, .ytd-action-companion-ad-renderer,
+ .ytd-ad-slot-renderer, .ytd-promoted-sparkles-web-renderer {
+ display: none !important;
+ }
+`);