From 9786eb8672213344d8d1b7bdef12bc94510b20db Mon Sep 17 00:00:00 2001 From: outremonde Date: Tue, 10 Jun 2025 20:32:00 -0400 Subject: initialized repository Former-commit-id: 84647f22b951a957b2b83885b612115d473f6626 --- .../apps/qutebrowser/scripts/yt-shorts-blocker.js | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 features/user/gui/apps/qutebrowser/scripts/yt-shorts-blocker.js (limited to 'features/user/gui/apps/qutebrowser/scripts/yt-shorts-blocker.js') diff --git a/features/user/gui/apps/qutebrowser/scripts/yt-shorts-blocker.js b/features/user/gui/apps/qutebrowser/scripts/yt-shorts-blocker.js new file mode 100644 index 0000000..383fec3 --- /dev/null +++ b/features/user/gui/apps/qutebrowser/scripts/yt-shorts-blocker.js @@ -0,0 +1,23 @@ +// ==UserScript== +// @name YouTube Shorts Blocker +// @namespace http://tampermonkey.net/ +// @version 0.1.2 +// @description Blocks the YouTube shorts from appearing. +// @author Aiden Charles +// @license MIT +// @match https://www.youtube.com/* +// @require https://code.jquery.com/jquery-3.4.1.slim.min.js +// @grant none +// ==/UserScript== + +(function() { + console.log("YouTube Shorts blocker script is running!"); + + setInterval(function() { + $("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); +})(); + -- cgit v1.2.3