diff --git a/README.md b/README.md index cea9aeb..92a0265 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,17 @@ # RoPro Patcher -This automatically patches the [RoPro](https://chrome.google.com/webstore/detail/ropro-enhance-your-roblox/adbacgifemdbhdkfppmeilbgppmhaobf?hl=en-GB) extension for you, allowing you to have `pro_tier` for free. \ No newline at end of file +This automatically patches the [RoPro](https://chrome.google.com/webstore/detail/ropro-enhance-your-roblox/adbacgifemdbhdkfppmeilbgppmhaobf?hl=en-GB) extension for you, allowing you to have `pro_tier` for free. + +## Firefox +This currently does not support Firefox but it easily can be done manually. + +- Go to where your extension is installed, usually at `%appdata%\Mozilla\Firefox\Profiles` followed by your profile name (the most recently modified folder) and finally into `extensions`. +- From there, find the RoPro file - for me it is named `{fbfda72b-073a-4a24-9e87-6d472b69b66f}.xpi`. +- Now, change the `.xpi` extension to `.zip` and extract. +- Next, apply the custom path patch to it. +- Rezip the file and change the extension back to `.xpi`. +- Make sure to override the old extension. + +## NOTE +Chrome (and possibly other browsers) have a feature that checks the hash of the extension. This means that it will flag as corrupted. Therefore, you will have to download the extension, patch it with a custom path and use developer mode to load an unpacked extension. + +- an exception to this rule is Opera GX \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index a8a194f..0a343d8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -26,10 +26,10 @@ fn patch(path: PathBuf) { // Finding the things to patch background_contents = background_contents.replace("subscription = await getStorage(\"rpSubscription\")", "subscription = \"pro_tier\""); background_contents = background_contents.replace("subscription = data", "data = \"pro_tier\"; subscription = data"); - background_contents = background_contents.replace("getStorage('rpSubscription')", "\"pro_tier\""); + background_contents = background_contents.replace("getStorage('rpSubscription')", "new Promise(resolve => resolve(\"pro_tier\"))"); background_contents = background_contents.replace("await getStorage(\"rpSubscription\")", "\"pro_tier\""); - background_contents = background_contents.replace("setStorage(\"rpSubscription\", xhr.getResponseHeader(\"ropro-subscription-tier\"))", "setStorage(\"rpSubscription\", \"pro_tier\""); - background_contents = background_contents.replace("setStorage(\"rpSubscription\", subscriptionLevel", "setStorage(\"rpSubscription\", \"pro_tier\""); + background_contents = background_contents.replace("setStorage(\"rpSubscription\", xhr.getResponseHeader(\"ropro-subscription-tier\"))", "setStorage(\"rpSubscription\", \"pro_tier\")"); + background_contents = background_contents.replace("setStorage(\"rpSubscription\", subscriptionLevel)", "setStorage(\"rpSubscription\", \"pro_tier\")"); // Write our changes fs::write(background.clone(), background_contents).expect("Unable to write file contents (background.js)");