summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.local/share/qutebrowser/greasemonkey/youtube_shorts_blocker.js7
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);
})();