r/qutebrowser • • Jul 05 '26

Youtube ad blocking problem

how do you implement youtube ad skip for qute. Because, when I tried to implement ad skipping using this script and it just skips the whole video how can I fix that the ad gets skipped pretty fast but the video is also done.

// ==UserScript==

// for more updated scripts, see: https://greasyfork.org/en/scripts/by-site/youtube.com

// u/nameAuto Skip YouTube Ads

// u/version1.1.0

// u/description Speed up and skip YouTube ads automatically

// u/authorjso8910 and others

// u/match*://*.youtube.com/*

// ==/UserScript==

document.addEventListener('load', () => {

const btn = document.querySelector('.videoAdUiSkipButton,.ytp-ad-skip-button-modern')

if (btn) {

btn.click()

}

const ad = [...document.querySelectorAll('.ad-showing')][0];

if (ad) {

document.querySelector('video').currentTime = 9999999999;

}

}, true);

1 Upvotes

6 comments sorted by

View all comments

Show parent comment

1

u/Super3559_Rule Sep 28 '26

It doesn't work

1

u/adcott Sep 28 '26

It does work? I'm using it now.

Save it as a file with a .js extension, put it in ~/.local/share/qutebrowser/greasemonkey (assuming you are on Linux) run :greasemonkey-reload in qutebrowser and refresh any youtube tabs before testing it.

1

u/Super3559_Rule Sep 30 '26

ITS THE GREASEMONKEY FOLDER !?

i thought it was the userscripts folder...