From 9c56ab15d712f782d69a4c91c792a6d29207d1f9 Mon Sep 17 00:00:00 2001 From: Amm0ni4 Date: Fri, 19 Jan 2024 13:51:42 +0000 Subject: [PATCH] Upload files to "/" --- 3_patch.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/3_patch.py b/3_patch.py index 0d25a61..ffc77af 100644 --- a/3_patch.py +++ b/3_patch.py @@ -38,9 +38,10 @@ def modify_script_extra(file_path): #Change source URL content = content.replace("https://update.greasyfork.org/scripts/431691/Bypass%20All%20Shortlinks.user.js", - "https://codeberg.org/Amm0ni4/bypass-all-shortlinks-debloated/raw/branch/main/Bypass_All_Shortlinks.user.js") + "https://codeberg.org/Amm0ni4/bypass-all-shortlinks-debloated/raw/branch/main/Bypass_All_Shortlinks.user.js") + content = content.replace("https://update.greasyfork.org/scripts/431691/Bypass%20All%20Shortlinks.meta.js", - "https://codeberg.org/Amm0ni4/bypass-all-shortlinks-debloated/raw/branch/main/Bypass_All_Shortlinks.user.js") + "https://codeberg.org/Amm0ni4/bypass-all-shortlinks-debloated/raw/branch/main/Bypass_All_Shortlinks.user.js") #Remove tracking content = content.replace("'https://rotator.nurul-huda.sch.id/?BypassResults=' + url", "'' + url") @@ -60,9 +61,12 @@ def modify_script_extra(file_path): print(f"An error occurred: {e}") -# Example usage -input_script_path = 'untouched_Bypass_All_Shortlinks.user.js' -includes_file_path = 'includes.txt' -output_script_path = 'Bypass_All_Shortlinks.user.js' -modify_script(input_script_path, includes_file_path, output_script_path) -modify_script_extra(output_script_path) +def main(): + input_script_path = 'untouched_Bypass_All_Shortlinks.user.js' + includes_file_path = 'includes.txt' + output_script_path = 'Bypass_All_Shortlinks.user.js' + modify_script(input_script_path, includes_file_path, output_script_path) + modify_script_extra(output_script_path) + +if __name__ == "__main__": + main()