diff options
author | Malfurious <m@lfurio.us> | 2024-02-03 07:32:03 -0500 |
---|---|---|
committer | Malfurious <m@lfurio.us> | 2024-02-03 07:32:03 -0500 |
commit | ed08bac349bffd561f332913552a4cedff5b96c4 (patch) | |
tree | 4ba49b53d6a0cabbcd61b2ba54be1c227c872975 | |
parent | 507c467abaf0ddb1338ec4a4d99120ead2cdc594 (diff) | |
download | rice-ed08bac349bffd561f332913552a4cedff5b96c4.tar.gz rice-ed08bac349bffd561f332913552a4cedff5b96c4.zip |
qutebrowser: Remove delay from YT shorts blocker
This removes an initial 1 second delay in the function of the youtube
shorts blocker, so the affected elements never appear on screen.
-rw-r--r-- | .local/share/qutebrowser/greasemonkey/youtube_shorts_blocker.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/.local/share/qutebrowser/greasemonkey/youtube_shorts_blocker.js b/.local/share/qutebrowser/greasemonkey/youtube_shorts_blocker.js index 8f70937..8f94a10 100644 --- a/.local/share/qutebrowser/greasemonkey/youtube_shorts_blocker.js +++ b/.local/share/qutebrowser/greasemonkey/youtube_shorts_blocker.js @@ -13,10 +13,13 @@ (function() { console.log("YouTube Shorts blocker script is running!"); - setInterval(function() { + function hide() { $("ytd-reel-shelf-renderer").hide(); $("a[title='Shorts']").hide(); $('a[href^="/shorts/"]').closest('ytd-video-renderer').hide(); $('span:contains("Shorts")').closest('#content.ytd-rich-section-renderer').hide(); - }, 1000); + } + + hide(); + setInterval(hide, 1000); })(); |