diff --git a/src/userscript.ts b/src/userscript.ts index 1c3bc6ca..9969884a 100644 --- a/src/userscript.ts +++ b/src/userscript.ts @@ -151,8 +151,8 @@ var $$IMU_EXPORT$$; cache: false, bigimage_recursive: true, input: false, - check_image_get: true, - find_source: true + check_image_get: false, + find_source: false }; console.log("Loaded"); @@ -66138,7 +66138,7 @@ var $$IMU_EXPORT$$; var eb_info = { regex: /^[a-z]+:\/\/[^/]+\/+pics\/+[^/]*-([0-9]+)\.html(?:[?#].*)?$/, qfi: "https://" + domain + "/pics/-${id}.html", - image_regex: /[\s\S]+<\/video>)/ }; @@ -108915,6 +108915,13 @@ var $$IMU_EXPORT$$; return src.replace(/(\/auction\/+)(?:small|view)(\/+auctions\/+)/, "$1big$2"); } + if (domain === "media.springernature.com") { + // thanks to anonymous for reporting: + // https://media.springernature.com/w300/springer-static/image/art%3A10.1038%2Fs41565-019-0561-4/MediaObjects/41565_2019_561_Figa_HTML.jpg?as=webp + // https://media.springernature.com/full/springer-static/image/art%3A10.1038%2Fs41565-019-0561-4/MediaObjects/41565_2019_561_Figa_HTML.jpg + return src.replace(/(:\/\/[^/]+\/+)[wh][0-9]+\/+(.*?)(?:[?#].*)?$/, "$1full/$2"); + } + @@ -112254,6 +112261,7 @@ var $$IMU_EXPORT$$; var obj = objified[i]; var remove_obj = function() { + nir_debug("bigimage_recursive", "parse_bigimage (removing obj)"); objified.splice(i, 1); if (is_array(newhref1)) { newhref1.splice(i, 1); @@ -112364,18 +112372,14 @@ var $$IMU_EXPORT$$; }); }; - // commenting out because apply doesn't exist - /* - // fixme: apply doesn't exist?? - apply(newhref); + _apply(newhref); // strikinglycdn needs newhref1 to be applied, because it has two rules, the cloudinary one, then the {url: src, can_head: false} one // the second one is only set in newhref1, not newhref - apply(newhref1); + _apply(newhref1); + // _apply is also needed for bigimage'd album_links - // this also needs to be commented out, because normally "apply" not existing would throw an error, preventing this from running. newhref = null; currentobj = pastobjs[0]; - */ } if (false) { diff --git a/userscript.user.js b/userscript.user.js index 03312f5a..56b5b02e 100644 --- a/userscript.user.js +++ b/userscript.user.js @@ -140,8 +140,8 @@ var $$IMU_EXPORT$$; cache: false, bigimage_recursive: true, input: false, - check_image_get: true, - find_source: true + check_image_get: false, + find_source: false }; console.log("Loaded"); } @@ -59934,7 +59934,7 @@ var $$IMU_EXPORT$$; var eb_info = { regex: /^[a-z]+:\/\/[^/]+\/+pics\/+[^/]*-([0-9]+)\.html(?:[?#].*)?$/, qfi: "https://" + domain + "/pics/-${id}.html", - image_regex: /[\s\S]+<\/video>)/ }; var pw_info = { @@ -97695,6 +97695,12 @@ var $$IMU_EXPORT$$; // https://st.violity.com/auction/big/auctions/13/75/23/9/137523999.jpg return src.replace(/(\/auction\/+)(?:small|view)(\/+auctions\/+)/, "$1big$2"); } + if (domain === "media.springernature.com") { + // thanks to anonymous for reporting: + // https://media.springernature.com/w300/springer-static/image/art%3A10.1038%2Fs41565-019-0561-4/MediaObjects/41565_2019_561_Figa_HTML.jpg?as=webp + // https://media.springernature.com/full/springer-static/image/art%3A10.1038%2Fs41565-019-0561-4/MediaObjects/41565_2019_561_Figa_HTML.jpg + return src.replace(/(:\/\/[^/]+\/+)[wh][0-9]+\/+(.*?)(?:[?#].*)?$/, "$1full/$2"); + } // -- general rules -- if (src.match(/\/ImageGen\.ashx\?/)) { // http://www.lookalikes.info/umbraco/ImageGen.ashx?image=/media/97522/nick%20hewer%20-%20mark%20brown.jpeg&width=250&constrain=true @@ -100474,6 +100480,7 @@ var $$IMU_EXPORT$$; objified[i] = deepcopy(objified[i]); // ensure no references are kept between objects var obj = objified[i]; var remove_obj = function() { + nir_debug("bigimage_recursive", "parse_bigimage (removing obj)"); objified.splice(i, 1); if (is_array(newhref1)) { newhref1.splice(i, 1); @@ -100567,18 +100574,13 @@ var $$IMU_EXPORT$$; }); }); }; - // commenting out because apply doesn't exist - /* - // fixme: apply doesn't exist?? - apply(newhref); + _apply(newhref); // strikinglycdn needs newhref1 to be applied, because it has two rules, the cloudinary one, then the {url: src, can_head: false} one // the second one is only set in newhref1, not newhref - apply(newhref1); - - // this also needs to be commented out, because normally "apply" not existing would throw an error, preventing this from running. + _apply(newhref1); + // _apply is also needed for bigimage'd album_links newhref = null; currentobj = pastobjs[0]; - */ } if (false) { if (!cond) {