diff --git a/2_generate_includes.py b/2_generate_includes.py index 75c6b34..01374b4 100644 --- a/2_generate_includes.py +++ b/2_generate_includes.py @@ -24,7 +24,7 @@ def regex_to_include_line(regex): #regex = regex.strip("/") #Use @include for more complex regex - if '|' in regex: + if any(char in regex for char in ['|', '(', ')', '*']): regex = '(' + regex + ')' include_line = "// @include /^(https?:\/\/)(.+)?" + regex + "(\/.*)/" include_line = include_line.replace( "\.*)(\/.*)/", "\.*)/" ) #clean excess in the regex diff --git a/Bypass_All_Shortlinks.user.js b/Bypass_All_Shortlinks.user.js index 597262e..592552f 100644 --- a/Bypass_All_Shortlinks.user.js +++ b/Bypass_All_Shortlinks.user.js @@ -116,7 +116,7 @@ // @match *://*.adbtc.top/* // @match *://*.youtube.com/* // @match *://*.upload.ee/* -// @match *://*.appdrive\.*/* +// @include /^(https?:\/\/)(.+)?(appdrive\.*)/ // @match *://*.dddrive.me/* // @match *://*.uppit.com/* // @match *://*.krakenfiles.com/* @@ -136,8 +136,8 @@ // @match *://*.files.fm/* // @match *://*.megaup.net/* // @match *://*.4fnet.org/* -// @match *://*.oxy\.*/* -// @match *://*.gdtot\.*/* +// @include /^(https?:\/\/)(.+)?(oxy\.*)/ +// @include /^(https?:\/\/)(.+)?(gdtot\.*)/ // @match *://*.mp4upload.com/* // @match *://*.drop.download/* // @match *://*.workupload.com/* @@ -335,7 +335,7 @@ // @include /^(https?:\/\/)(.+)?(writedroid.eu.org|modmania.eu.org|writedroid.in|mytop5.club)(\/.*)/ // @match *://*.computerpedia.in/* // @match *://*.finance.uploadsoon.com/* -// @match *://*.adclicker\.*/* +// @include /^(https?:\/\/)(.+)?(adclicker\.*)/ // @include /^(https?:\/\/)(.+)?(offers4crypto.xyz|ewall.biz)(\/.*)/ // @match *://*.dl.lk21static.xyz/* // @match *://*.easylink.gamingwithtr.com/*