From ed08bac349bffd561f332913552a4cedff5b96c4 Mon Sep 17 00:00:00 2001 From: Malfurious Date: Sat, 3 Feb 2024 07:32:03 -0500 Subject: 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. --- .local/share/qutebrowser/greasemonkey/youtube_shorts_blocker.js | 7 +++++-- 1 file 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); })(); -- cgit v1.2.3