diff options
author | Malfurious <m@lfurio.us> | 2024-02-03 07:25:07 -0500 |
---|---|---|
committer | Malfurious <m@lfurio.us> | 2024-02-03 07:25:07 -0500 |
commit | 507c467abaf0ddb1338ec4a4d99120ead2cdc594 (patch) | |
tree | 4d24eee346d38f002e37542a268ebdecbb569dcc | |
parent | b1ca2e3e15d960949a6ced1b8145e9f245cc817c (diff) | |
download | rice-507c467abaf0ddb1338ec4a4d99120ead2cdc594.tar.gz rice-507c467abaf0ddb1338ec4a4d99120ead2cdc594.zip |
qutebrowser: Add YT shorts blocking script
Script from greasy fork:
https://greasyfork.org/en/scripts/471062-youtube-shorts-blocker
-rw-r--r-- | .local/share/qutebrowser/greasemonkey/youtube_shorts_blocker.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/.local/share/qutebrowser/greasemonkey/youtube_shorts_blocker.js b/.local/share/qutebrowser/greasemonkey/youtube_shorts_blocker.js new file mode 100644 index 0000000..8f70937 --- /dev/null +++ b/.local/share/qutebrowser/greasemonkey/youtube_shorts_blocker.js @@ -0,0 +1,22 @@ +// ==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); +})(); |