diff --git a/README.md b/README.md index a1124cc5a756f25a4346d0a11d5f5f548704a2d1..3ae14fc0bd816f286b19ac50e0c5daee1c1febc8 100644 --- a/README.md +++ b/README.md @@ -1,52 +1,15 @@ -# SimpleModifyHeaders V 1.7.0 - -Extension for Firefox and Chrome. (The extension can be installed via [this link](https://addons.mozilla.org/fr/firefox/addon/simple-modify-header/) for Firefox and via [this link](https://chrome.google.com/webstore/detail/simple-modify-headers/gjgiipmpldkpbdfjkgofildhapegmmic) for Chrome) - -The extension rewrites the headers based on a rules table. - -The extension can be started and stopped via the button on the top right. - -To save and apply the modification, you need to click on the save button. - -It's possible to: -- export the configuration into a file (json format) -- import the configuration from a file. It supports the format of the Modifyheaders plugin - -## Rules table -The rules table contains lines with the following parameters: -- action: add, modify or delete a header field or a cookie -- header field name or cookie name -- header field value or cookie value -- comment: a comment -- apply on: "request" if the modification applies to the request headers or "response" if the modification applies to the response headers -- status: on if the modification is active, off otherwise - -## Url pattern -We can choose the URLs on which the modifications are applied by modifying the URL pattern : -- The URL pattern must follow the syntax defined by https://developer.chrome.com/extensions/match_patterns -- Putting an empty string on the field will select all URLs -- It's possible to select multiple URL patterns using a semicolon (;) separator -- It's not possible to define a specific port number https://stackoverflow.com/questions/11425591/match-port-in-chrome-extension-pattern - -## Parameters -The parameters button permits to: -- Activate debug mode: shows detailed log messages in the extension debugging console of the browser. -- Show comments: show comments field on the config panel -- Filter URL by rules: activate the possibility to filter URL for each rule in the config panel. The header field will be modified only if the URL contains the configured value. - - -## Firefox-specific issue -According to the version of Firefox, the addition of a new header behaves differently. In the latest version, when you choose the "add" action and the header exists, it appends the value, while in the old version, it replaces it. If you want to modify an exiting header, you should use "modify" instead of "add" - -## Limitation - -Due to limitations in the webRequest API of browsers, headers of requests, which are invoked by Javascript could not be modified. - -## Extension permissions -In order to work, the following browser permissions are needed for the extension: -- storage: needed to store the configuration and the rules -- activeTab, tabs: needed to show the configuration screen in the browser tab. -- webRequest, webRequestBlocking ,<all_urls>: needed to modify the headers according to the rules table. - -## License -The code is Open Source under Mozilla Public License 2.0 +# refresh token sync: Office 365 on linux / any platform + +Read <https://git.recolic.net/root/ms-scripts/-/blob/master/docs/mscorp-browser-os-restriction-workaround_/README.md> before going through this document! + +This project is a patched SimpleModifyHeader extension, which automatically sync refresh token from windows-chicken to linux devbox. + +## Usage + +**You must use your own pastebin service instead of mine. DO NOT make me angry!** + +1. Put pastebin.php on your website, and update all links to `recolic.net` in code with yours. (`grep -F recolic.net -r .`) +2. Install `uploader` extension in windows-chrome (or edge), and install `downloader` extension in your devbox. + + + diff --git a/uploader/README.md b/uploader/README.md new file mode 100644 index 0000000000000000000000000000000000000000..a1124cc5a756f25a4346d0a11d5f5f548704a2d1 --- /dev/null +++ b/uploader/README.md @@ -0,0 +1,52 @@ +# SimpleModifyHeaders V 1.7.0 + +Extension for Firefox and Chrome. (The extension can be installed via [this link](https://addons.mozilla.org/fr/firefox/addon/simple-modify-header/) for Firefox and via [this link](https://chrome.google.com/webstore/detail/simple-modify-headers/gjgiipmpldkpbdfjkgofildhapegmmic) for Chrome) + +The extension rewrites the headers based on a rules table. + +The extension can be started and stopped via the button on the top right. + +To save and apply the modification, you need to click on the save button. + +It's possible to: +- export the configuration into a file (json format) +- import the configuration from a file. It supports the format of the Modifyheaders plugin + +## Rules table +The rules table contains lines with the following parameters: +- action: add, modify or delete a header field or a cookie +- header field name or cookie name +- header field value or cookie value +- comment: a comment +- apply on: "request" if the modification applies to the request headers or "response" if the modification applies to the response headers +- status: on if the modification is active, off otherwise + +## Url pattern +We can choose the URLs on which the modifications are applied by modifying the URL pattern : +- The URL pattern must follow the syntax defined by https://developer.chrome.com/extensions/match_patterns +- Putting an empty string on the field will select all URLs +- It's possible to select multiple URL patterns using a semicolon (;) separator +- It's not possible to define a specific port number https://stackoverflow.com/questions/11425591/match-port-in-chrome-extension-pattern + +## Parameters +The parameters button permits to: +- Activate debug mode: shows detailed log messages in the extension debugging console of the browser. +- Show comments: show comments field on the config panel +- Filter URL by rules: activate the possibility to filter URL for each rule in the config panel. The header field will be modified only if the URL contains the configured value. + + +## Firefox-specific issue +According to the version of Firefox, the addition of a new header behaves differently. In the latest version, when you choose the "add" action and the header exists, it appends the value, while in the old version, it replaces it. If you want to modify an exiting header, you should use "modify" instead of "add" + +## Limitation + +Due to limitations in the webRequest API of browsers, headers of requests, which are invoked by Javascript could not be modified. + +## Extension permissions +In order to work, the following browser permissions are needed for the extension: +- storage: needed to store the configuration and the rules +- activeTab, tabs: needed to show the configuration screen in the browser tab. +- webRequest, webRequestBlocking ,<all_urls>: needed to modify the headers according to the rules table. + +## License +The code is Open Source under Mozilla Public License 2.0 diff --git a/background.js b/uploader/background.js similarity index 100% rename from background.js rename to uploader/background.js diff --git a/fonts/glyphicons-halflings-regular.woff2 b/uploader/fonts/glyphicons-halflings-regular.woff2 similarity index 100% rename from fonts/glyphicons-halflings-regular.woff2 rename to uploader/fonts/glyphicons-halflings-regular.woff2 diff --git a/icons/modify-32.png b/uploader/icons/modify-32.png similarity index 100% rename from icons/modify-32.png rename to uploader/icons/modify-32.png diff --git a/icons/modify-48.png b/uploader/icons/modify-48.png similarity index 100% rename from icons/modify-48.png rename to uploader/icons/modify-48.png diff --git a/icons/modify-green-32.png b/uploader/icons/modify-green-32.png similarity index 100% rename from icons/modify-green-32.png rename to uploader/icons/modify-green-32.png diff --git a/icons/modify-green-48.png b/uploader/icons/modify-green-48.png similarity index 100% rename from icons/modify-green-48.png rename to uploader/icons/modify-green-48.png diff --git a/icons/modify.png b/uploader/icons/modify.png similarity index 100% rename from icons/modify.png rename to uploader/icons/modify.png diff --git a/manifest.json b/uploader/manifest.json similarity index 86% rename from manifest.json rename to uploader/manifest.json index aafe5bbf22709bb5155ae916c9c28b236c521f0f..b566f761b926bfeaca8b27353dd390aeab72e445 100644 --- a/manifest.json +++ b/uploader/manifest.json @@ -3,7 +3,7 @@ "manifest_version": 2, "name": "simple-modify-headers-fkmsu", "version": "1.7.0.1000", - "homepage_url": "https://git.recolic.net/msc/browser-fuck-mscredential", + "homepage_url": "https://git.recolic.net/msc/fuckms-refreshtokensync", "icons": { "48": "icons/modify-48.png" }, diff --git a/package/SimpleModifyHeaders-Package v1.1.zip b/uploader/package/SimpleModifyHeaders-Package v1.1.zip similarity index 100% rename from package/SimpleModifyHeaders-Package v1.1.zip rename to uploader/package/SimpleModifyHeaders-Package v1.1.zip diff --git a/package/SimpleModifyHeaders-Package v1.2.zip b/uploader/package/SimpleModifyHeaders-Package v1.2.zip similarity index 100% rename from package/SimpleModifyHeaders-Package v1.2.zip rename to uploader/package/SimpleModifyHeaders-Package v1.2.zip diff --git a/package/SimpleModifyHeaders-Package v1.3.zip b/uploader/package/SimpleModifyHeaders-Package v1.3.zip similarity index 100% rename from package/SimpleModifyHeaders-Package v1.3.zip rename to uploader/package/SimpleModifyHeaders-Package v1.3.zip diff --git a/package/SimpleModifyHeaders-Package v1.4.zip b/uploader/package/SimpleModifyHeaders-Package v1.4.zip similarity index 100% rename from package/SimpleModifyHeaders-Package v1.4.zip rename to uploader/package/SimpleModifyHeaders-Package v1.4.zip diff --git a/package/SimpleModifyHeaders-Package v1.5.zip b/uploader/package/SimpleModifyHeaders-Package v1.5.zip similarity index 100% rename from package/SimpleModifyHeaders-Package v1.5.zip rename to uploader/package/SimpleModifyHeaders-Package v1.5.zip diff --git a/package/SimpleModifyHeaders-Package v1.6.1.zip b/uploader/package/SimpleModifyHeaders-Package v1.6.1.zip similarity index 100% rename from package/SimpleModifyHeaders-Package v1.6.1.zip rename to uploader/package/SimpleModifyHeaders-Package v1.6.1.zip diff --git a/package/SimpleModifyHeaders-Package v1.6.3.zip b/uploader/package/SimpleModifyHeaders-Package v1.6.3.zip similarity index 100% rename from package/SimpleModifyHeaders-Package v1.6.3.zip rename to uploader/package/SimpleModifyHeaders-Package v1.6.3.zip diff --git a/package/SimpleModifyHeaders-Package v1.6.6.zip b/uploader/package/SimpleModifyHeaders-Package v1.6.6.zip similarity index 100% rename from package/SimpleModifyHeaders-Package v1.6.6.zip rename to uploader/package/SimpleModifyHeaders-Package v1.6.6.zip diff --git a/package/SimpleModifyHeaders-Package v1.7.0.zip b/uploader/package/SimpleModifyHeaders-Package v1.7.0.zip similarity index 100% rename from package/SimpleModifyHeaders-Package v1.7.0.zip rename to uploader/package/SimpleModifyHeaders-Package v1.7.0.zip diff --git a/popup/bootstrap.min.css b/uploader/popup/bootstrap.min.css similarity index 100% rename from popup/bootstrap.min.css rename to uploader/popup/bootstrap.min.css diff --git a/popup/config.css b/uploader/popup/config.css similarity index 100% rename from popup/config.css rename to uploader/popup/config.css diff --git a/popup/config.html b/uploader/popup/config.html similarity index 100% rename from popup/config.html rename to uploader/popup/config.html diff --git a/popup/config.js b/uploader/popup/config.js similarity index 100% rename from popup/config.js rename to uploader/popup/config.js diff --git a/popup/config_medium_screen.css b/uploader/popup/config_medium_screen.css similarity index 100% rename from popup/config_medium_screen.css rename to uploader/popup/config_medium_screen.css diff --git a/popup/config_small_screen.css b/uploader/popup/config_small_screen.css similarity index 100% rename from popup/config_small_screen.css rename to uploader/popup/config_small_screen.css diff --git a/popup/img/help.png b/uploader/popup/img/help.png similarity index 100% rename from popup/img/help.png rename to uploader/popup/img/help.png diff --git a/popup/img/start.png b/uploader/popup/img/start.png similarity index 100% rename from popup/img/start.png rename to uploader/popup/img/start.png diff --git a/popup/img/stop.png b/uploader/popup/img/stop.png similarity index 100% rename from popup/img/stop.png rename to uploader/popup/img/stop.png diff --git a/popup/img/stop_big.png b/uploader/popup/img/stop_big.png similarity index 100% rename from popup/img/stop_big.png rename to uploader/popup/img/stop_big.png diff --git a/popup/menu.html b/uploader/popup/menu.html similarity index 100% rename from popup/menu.html rename to uploader/popup/menu.html diff --git a/popup/menu.js b/uploader/popup/menu.js similarity index 100% rename from popup/menu.js rename to uploader/popup/menu.js diff --git a/screenshot.png b/uploader/screenshot.png similarity index 100% rename from screenshot.png rename to uploader/screenshot.png diff --git a/tests/MIT.LICENSE b/uploader/tests/MIT.LICENSE similarity index 100% rename from tests/MIT.LICENSE rename to uploader/tests/MIT.LICENSE diff --git a/tests/SpecRunner.html b/uploader/tests/SpecRunner.html similarity index 100% rename from tests/SpecRunner.html rename to uploader/tests/SpecRunner.html diff --git a/tests/lib/jasmine-3.3.0/boot.js b/uploader/tests/lib/jasmine-3.3.0/boot.js similarity index 100% rename from tests/lib/jasmine-3.3.0/boot.js rename to uploader/tests/lib/jasmine-3.3.0/boot.js diff --git a/tests/lib/jasmine-3.3.0/jasmine-html.js b/uploader/tests/lib/jasmine-3.3.0/jasmine-html.js similarity index 100% rename from tests/lib/jasmine-3.3.0/jasmine-html.js rename to uploader/tests/lib/jasmine-3.3.0/jasmine-html.js diff --git a/tests/lib/jasmine-3.3.0/jasmine.css b/uploader/tests/lib/jasmine-3.3.0/jasmine.css similarity index 100% rename from tests/lib/jasmine-3.3.0/jasmine.css rename to uploader/tests/lib/jasmine-3.3.0/jasmine.css diff --git a/tests/lib/jasmine-3.3.0/jasmine.js b/uploader/tests/lib/jasmine-3.3.0/jasmine.js similarity index 100% rename from tests/lib/jasmine-3.3.0/jasmine.js rename to uploader/tests/lib/jasmine-3.3.0/jasmine.js diff --git a/tests/lib/jasmine-3.3.0/jasmine_favicon.png b/uploader/tests/lib/jasmine-3.3.0/jasmine_favicon.png similarity index 100% rename from tests/lib/jasmine-3.3.0/jasmine_favicon.png rename to uploader/tests/lib/jasmine-3.3.0/jasmine_favicon.png diff --git a/tests/spec/ConfigSpec.js b/uploader/tests/spec/ConfigSpec.js similarity index 100% rename from tests/spec/ConfigSpec.js rename to uploader/tests/spec/ConfigSpec.js