summaryrefslogtreecommitdiff
path: root/global/.local/share/qutebrowser/greasemonkey/youtube.css.js
blob: e86edf9d3e373f9c629ea87f147efd68b165ab25 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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;
    }
`);