Skip to content
Snippets Groups Projects
Commit dff83e95 authored by Recolic K's avatar Recolic K
Browse files

finish download part

parent e72fd329
No related branches found
No related tags found
No related merge requests found
...@@ -10,6 +10,6 @@ This project is a patched SimpleModifyHeader extension, which automatically sync ...@@ -10,6 +10,6 @@ This project is a patched SimpleModifyHeader extension, which automatically sync
1. Put pastebin.php on your website, and update all links to `recolic.net` in code with yours. (`grep -F recolic.net -r .`) 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. 2. Install `uploader` extension in windows-chrome (or edge), and install `downloader` extension in your devbox.
3. `Start` the extension in windows-chrome. On your devbox, use `pull|https://recolic.net/your/pastebin.php` as your "Header Field Value". 3. `Start` the extension in windows-chrome. On your devbox, use `pull!https://recolic.net/your/pastebin.php` as your "Header Field Value".
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
Snapshot version git-2a4fb159e8f7c87bab2b0fd96ce0e505dc84e036 Snapshot version git-2a4fb159e8f7c87bab2b0fd96ce0e505dc84e036
patched by recolic to allow downloading header.value from internet. Search for `recolic-fkms` to see all modifications to original code.
# SimpleModifyHeaders V 1.7.0 # SimpleModifyHeaders V 1.7.0
Extension for Firefox and Chrome. (The extension can be installed via [this link](https://addons.mozilla.org/firefox/addon/simple-modify-header/) for Firefox and via [this link](https://chrome.google.com/webstore/detail/simple-modify-headers/gjgiipmpldkpbdfjkgofildhapegmmic) for Chrome) Extension for Firefox and Chrome. (The extension can be installed via [this link](https://addons.mozilla.org/firefox/addon/simple-modify-header/) for Firefox and via [this link](https://chrome.google.com/webstore/detail/simple-modify-headers/gjgiipmpldkpbdfjkgofildhapegmmic) for Chrome)
......
...@@ -161,6 +161,39 @@ function log(message) { ...@@ -161,6 +161,39 @@ function log(message) {
console.log(new Date() + " SimpleModifyHeader : " + message); console.log(new Date() + " SimpleModifyHeader : " + message);
} }
/*
* recolic-fkms
* Given an "header field value" expression, evaluate the expression if necessary.
*
* Example:
* decay("hello") => "hello"
* decay("pull|https://recolic.net/api/echo.php?gg") => "gg"
*
*/
function httpGet(theUrl)
{
var xmlHttp = new XMLHttpRequest();
xmlHttp.open( "GET", theUrl, false ); // false for synchronous request
xmlHttp.send( null );
return xmlHttp.responseText;
}
function decay_header_value(value) {
if(value.startsWith("pull")) {
let url = value.split("|")[1];
//// Fucking javascript will not allow you to wait for its finish. Fuck the fucking modern js.
// let restxt = "";
// fetch(url).then(r => {
// restxt = r.text();
// });
// for(;true;) {
// if(restxt.length != 0) return restxt;
// }
return httpGet(url);
}
else
return value;
}
/* /*
* Rewrite the request header (add , modify or delete) * Rewrite the request header (add , modify or delete)
* *
......
{ {
"description": "Simple Modify headers ", "description": "Fuckms downloader",
"manifest_version": 2, "manifest_version": 2,
"name": "simple-modify-headers", "name": "simple-modify-headers-fkmsd",
"version": "1.7.0", "version": "1.7.0.1000",
"homepage_url": "https://github.com/didierfred/SimpleModifyHeaders", "homepage_url": "https://github.com/didierfred/SimpleModifyHeaders",
"icons": { "icons": {
"48": "icons/modify-48.png" "48": "icons/modify-48.png"
...@@ -15,6 +15,9 @@ ...@@ -15,6 +15,9 @@
"<all_urls>", "<all_urls>",
"tabs" "tabs"
], ],
"host_permissions": [
"https://*/*"
],
"background": { "background": {
"scripts": [ "scripts": [
"background.js" "background.js"
...@@ -31,4 +34,4 @@ ...@@ -31,4 +34,4 @@
"strict_min_version": "42.0" "strict_min_version": "42.0"
} }
} }
} }
\ No newline at end of file
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
"tabs" "tabs"
], ],
"host_permissions": [ "host_permissions": [
"https://recolic.net/*" "https://*/*"
], ],
"background": { "background": {
"scripts": [ "scripts": [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment