From fa223ed3dba39b43eaa3ee41132444676c01ad05 Mon Sep 17 00:00:00 2001 From: Amm0ni4 Date: Thu, 25 Jan 2024 08:21:58 +0000 Subject: [PATCH] remove google and recaptcha domains. they can be enabled manually --- 2_generate_includes.py | 18 +++++++----------- Bypass_All_Shortlinks.user.js | 2 -- supported_sites.txt | 2 -- 3 files changed, 7 insertions(+), 15 deletions(-) diff --git a/2_generate_includes.py b/2_generate_includes.py index 7084cb7..acec121 100644 --- a/2_generate_includes.py +++ b/2_generate_includes.py @@ -41,14 +41,6 @@ def generate_include_lines(regex_list): include_line = regex_to_include_line(regex) include_lines.append(include_line) - # Manual additions of lines - - ## -Adding this so that captchas can be auto-opened by this userscript - include_lines.append('// @match *://*/recaptcha/api2/*') - - ## -Adding this as a go-to URL for accessing the settings menu in this userscript - ###include_lines.append('// @match https://codeberg.org/Amm0ni4/bypass-all-shortlinks-debloated*') - return include_lines def write_to_file(filename, lines): @@ -78,10 +70,14 @@ def main(): regex_strings = extract_regex_from_js(js_code) # remove short domains (errors) - regex_strings = [s for s in regex_strings if "." in s and len(s) >= 5] + regex_strings = [s for s in regex_strings if "." in s and len(s) >= 5] - # remove Google domains - regex_strings = [s for s in regex_strings if "google" not in s] + # remove domains with blocked words + blocked_words_for_includes = [ + "google", + "youtube" #youtube is for redirecting shorts, but I remove it to avoid people worrying + ] + regex_strings = [s for s in regex_strings if not any(word in s for word in blocked_words_for_includes)] compile_and_print(regex_strings) except FileNotFoundError: diff --git a/Bypass_All_Shortlinks.user.js b/Bypass_All_Shortlinks.user.js index e8488e0..c920aa5 100644 --- a/Bypass_All_Shortlinks.user.js +++ b/Bypass_All_Shortlinks.user.js @@ -113,7 +113,6 @@ // @match *://*.linkbox.to/* // @include /^(https?:\/\/)(.+)?((desbloquea|drivelinks).me|(acortame-esto|recorta-enlace|enlace-protegido|super-enlace).com|short-info.link)(\/.*)/ // @match *://*.adbtc.top/* -// @match *://*.youtube.com/* // @match *://*.upload.ee/* // @include /^(https?:\/\/)(.+)?(appdrive\.*)/ // @match *://*.dddrive.me/* @@ -365,7 +364,6 @@ // @match *://*.autodime.com/* // @include /^(https?:\/\/)(.+)?(lootlinks.co|(loot-links|links-loot|loot-link).com|(lootdest|lootlink).org|lootdest.info|linksloot.net)(\/.*)/ // @match *://*.amritadrino.com/* -// @match *://*.youtube.com/* // @include /^(https?:\/\/)(.+)?(hunterkiller.me|surflink.tech)(\/.*)/ // @match *://*.coinhub.wiki/* // @include /^(https?:\/\/)(.+)?(lyricsbaazaar.com|ezeviral.com)(\/.*)/ diff --git a/supported_sites.txt b/supported_sites.txt index 7aeab37..07e2c8f 100644 --- a/supported_sites.txt +++ b/supported_sites.txt @@ -30,7 +30,6 @@ ouo.io linkbox.to (desbloquea|drivelinks).me|(acortame-esto|recorta-enlace|enlace-protegido|super-enlace).com|short-info.link adbtc.top -youtube.com upload.ee appdrive\.* dddrive.me @@ -282,7 +281,6 @@ bastinews.xyz autodime.com lootlinks.co|(loot-links|links-loot|loot-link).com|(lootdest|lootlink).org|lootdest.info|linksloot.net amritadrino.com -youtube.com hunterkiller.me|surflink.tech coinhub.wiki lyricsbaazaar.com|ezeviral.com