From eeb95347fb6c6d6c049697f77fc72bca825ee352 Mon Sep 17 00:00:00 2001 From: Amm0ni4 Date: Mon, 22 Jan 2024 12:46:07 +0000 Subject: [PATCH] improve comments and tracking tester --- 3_patch.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/3_patch.py b/3_patch.py index dc48640..ba815ae 100644 --- a/3_patch.py +++ b/3_patch.py @@ -55,12 +55,16 @@ def modify_script_extra(file_path): "https://codeberg.org/Amm0ni4/bypass-all-shortlinks-debloated/raw/branch/main/Bypass_All_Shortlinks.user.js") #Remove tracking + + ## Remove redirection to tracking site content = content.replace("https://rotator.nurul-huda.sch.id/?BypassResults=", "") content = content.replace("https://free4u.nurul-huda.or.id/?BypassResults=", "") content = content.replace("blog = true", "blog = false") + ## Remove tracking iframe being injected content = remove_lines_with_url(content, "https://menrealitycalc.com/") + ## Check known issues have been removed and remove antifeature label if corrected strings_to_check = [ "rotator.nurul-huda.sch.id/?BypassResults=", "free4u.nurul-huda.or.id/?BypassResults=", @@ -69,7 +73,10 @@ def modify_script_extra(file_path): ] if does_not_contain_any(content, strings_to_check): content = content.replace("\n// @antifeature tracking", "") - + else: + print("ERROR: TRACKING NOT REMOVED.") + open("Bypass_All_Shortlinks.user.js", "w").close() # Clear file + return False # Write the modified content back to the file with open(file_path, 'w') as file: