simplify script code and remove the manually added domain which is not necessary

This commit is contained in:
Amm0ni4 2024-01-21 10:02:58 +00:00
parent 582eb6ef02
commit 2e23f14625
3 changed files with 5 additions and 13 deletions

View file

@ -67,14 +67,6 @@ def compile_and_print(regex_strings):
#for line in include_lines: print(line) #for line in include_lines: print(line)
write_to_file('includes.txt', include_lines) write_to_file('includes.txt', include_lines)
def remove_strings_containing_word(word, string_list):
return [s for s in string_list if word not in s]
def filter_strings(input_list):
filtered_list = [string for string in input_list if "." in string and len(string) >= 4]
filtered_list = remove_strings_containing_word("google", filtered_list)
return filtered_list
def main(): def main():
file_path = 'untouched_Bypass_All_Shortlinks.user.js' file_path = 'untouched_Bypass_All_Shortlinks.user.js'
@ -84,10 +76,12 @@ def main():
js_code = file.read() js_code = file.read()
regex_strings = extract_regex_from_js(js_code) regex_strings = extract_regex_from_js(js_code)
regex_strings = filter_strings(regex_strings)
#Manual additions # remove short domains (errors)
regex_strings.append('shrinkme.us') 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]
compile_and_print(regex_strings) compile_and_print(regex_strings)
except FileNotFoundError: except FileNotFoundError:

View file

@ -741,7 +741,6 @@
// @match *://*.gos2.urlcash.click/* // @match *://*.gos2.urlcash.click/*
// @match *://*.goes3.urlcash.click/* // @match *://*.goes3.urlcash.click/*
// @match *://*.r1.foxylinks.site/* // @match *://*.r1.foxylinks.site/*
// @match *://*.shrinkme.us/*
// @match *://*/recaptcha/api2/* // @match *://*/recaptcha/api2/*
// @exclude /^(https?:\/\/)(.+)?((advertisingexcel|talkforfitness|rsadnetworkinfo|rsinsuranceinfo|rsfinanceinfo|rssoftwareinfo|rshostinginfo|rseducationinfo|gametechreviewer|vegan4k|phineypet|batmanfactor|techedifier|urlhives|linkhives|github|freeoseocheck|greenenez|aliyun|reddit|wiki-topia|edonmanor|vrtier|whatsapp|gearsadviser|edonmanor|tunebug|menrealitycalc|cloud.google).com|(thumb8|thumb9|crewbase|crewus|shinchu|shinbhu|ultraten|uniqueten|topcryptoz|allcryptoz|coinsvalue|cookinguide|cryptowidgets|webfreetools|carstopia|makeupguide|carsmania).net|(linksfly|shortsfly|urlsfly|wefly|blog24).me|(greasyfork|openuserjs|adarima|telegram).org|mcrypto.club|misterio.ro|insurancegold.in|coinscap.info)(\/.*)/ // @exclude /^(https?:\/\/)(.+)?((advertisingexcel|talkforfitness|rsadnetworkinfo|rsinsuranceinfo|rsfinanceinfo|rssoftwareinfo|rshostinginfo|rseducationinfo|gametechreviewer|vegan4k|phineypet|batmanfactor|techedifier|urlhives|linkhives|github|freeoseocheck|greenenez|aliyun|reddit|wiki-topia|edonmanor|vrtier|whatsapp|gearsadviser|edonmanor|tunebug|menrealitycalc|cloud.google).com|(thumb8|thumb9|crewbase|crewus|shinchu|shinbhu|ultraten|uniqueten|topcryptoz|allcryptoz|coinsvalue|cookinguide|cryptowidgets|webfreetools|carstopia|makeupguide|carsmania).net|(linksfly|shortsfly|urlsfly|wefly|blog24).me|(greasyfork|openuserjs|adarima|telegram).org|mcrypto.club|misterio.ro|insurancegold.in|coinscap.info)(\/.*)/
// @downloadURL https://codeberg.org/Amm0ni4/bypass-all-shortlinks-debloated/raw/branch/main/Bypass_All_Shortlinks.user.js // @downloadURL https://codeberg.org/Amm0ni4/bypass-all-shortlinks-debloated/raw/branch/main/Bypass_All_Shortlinks.user.js

View file

@ -658,4 +658,3 @@ go2.urlcash.site
gos2.urlcash.click gos2.urlcash.click
goes3.urlcash.click goes3.urlcash.click
r1.foxylinks.site r1.foxylinks.site
shrinkme.us