From 097bfab3944e3a4404c0d68e11d955f25aee532a Mon Sep 17 00:00:00 2001 From: qsniyg Date: Sun, 4 Aug 2024 21:04:26 +0000 Subject: [PATCH] More websites/rules --- src/userscript.ts | 18 ++++++++++++++---- userscript.user.js | 18 ++++++++++++++---- 2 files changed, 28 insertions(+), 8 deletions(-) diff --git a/src/userscript.ts b/src/userscript.ts index e9ef7c98..ff0f6c3e 100644 --- a/src/userscript.ts +++ b/src/userscript.ts @@ -29590,6 +29590,9 @@ var $$IMU_EXPORT$$; // https://m.media-amazon.com/images/M/MV5BYmY4NTExN2MtOWZjMy00NWU0LWIzZDMtMzQ4NThjNGM3OGU0XkEyXkFqcGdeQXVyOTc5MDI5NjE@.jpeg // https://m.media-amazon.com/images/M/MV5BOGFkMTZkYmYtNTliNy00N2U3LTkyZjQtYTIxNjEyY2I5MjhiXkEyXkFqcGdeQXVyOTc5MDI5NjE@.UX1000.jpeg -- upscaled // https://m.media-amazon.com/images/M/MV5BOGFkMTZkYmYtNTliNy00N2U3LTkyZjQtYTIxNjEyY2I5MjhiXkEyXkFqcGdeQXVyOTc5MDI5NjE@.jpeg -- original + // thanks to nimbuz on discord: + // https://m.media-amazon.com/images/I/A13usaonutL._CLa%7C2140%2C2000%7C91ZCXdqRg0L.png%7C0%2C0%2C2140%2C2000%2B0.0%2C0.0%2C2140.0%2C2000.0_AC_SX466_.png + // https://m.media-amazon.com/images/I/A13usaonutL._CLa%7C2140%2C2000%7C91ZCXdqRg0L.png%7C0%2C0%2C2140%2C2000%2B0.0%2C0.0%2C2140.0%2C2000.png domain_nosub === "media-amazon.com" || // https://ia.media-imdb.com/images/M/MV5BNjA1NDYwMDQ3MF5BMl5BanBnXkFtZTcwOTYyNDQ0MQ@@._V1_UY268_CR1,0,182,268_AL_.jpg // https://ia.media-imdb.com/images/M/MV5BNjA1NDYwMDQ3MF5BMl5BanBnXkFtZTcwOTYyNDQ0MQ@@.jpg @@ -29617,7 +29620,7 @@ var $$IMU_EXPORT$$; }; let parse_directives = function(url) { - let match = url.match(/((?:\.+_*(?:[A-Z][A-Z0-9]|V_)[^/.]*)+)\.+[^/.]+(?:[?#].*)?$/); + let match = url.match(/((?:\.+_*(?:0_)?(?:[A-Z][A-Z0-9]|V_)[^/.]*)+)\.+[^/.]+(?:[?#].*)?$/); if (!match) return null; @@ -29628,7 +29631,7 @@ var $$IMU_EXPORT$$; if (!directive || !directive.length) continue; - let dmatch = directive.match(/^([A-Z][A-Z0-9]|V)(.*)?$/); + let dmatch = directive.match(/^([A-Z][A-Z0-9]|V|0)(.*)?$/); if (!dmatch) { console_warn("Invalid directive", directive, "for URL", url); return null; @@ -29654,7 +29657,7 @@ var $$IMU_EXPORT$$; if (!stringified_arr.length) stringified = ""; - let urlmatch = url.match(/^(.*\/[^/]+?)(?:\.+_*(?:[A-Z][A-Z0-9]|V_)[^/.]*)*\.*(\.[^/.]+(?:[?#].*)?)$/); + let urlmatch = url.match(/^(.*\/[^/]+?)(?:\.+_*(?:0_)?(?:[A-Z][A-Z0-9]|V_)[^/.]*)*\.*(\.[^/.]+(?:[?#].*)?)$/); if (!urlmatch) { console_warn("Unable to find URL match for", url); return url; @@ -29682,6 +29685,7 @@ var $$IMU_EXPORT$$; directive.key === "SY" || directive.key === "V" || directive.key === "BG" || // background color + directive.key === "0" || directive.key === "CB") { continue; } @@ -51656,7 +51660,7 @@ var $$IMU_EXPORT$$; if ((domain_nosub === "staticflickr.com" || domain === "static.flickr.com" || (domain_nosub === "flickr.com" && string_indexof(domain, ".static.flickr.com") >= 0)) && - (src.match(/\/[0-9]+_[0-9a-f]+(?:_[a-z0-9]*)?\.[a-z]+.*$/) || /\/video\/+[0-9]+\/+[0-9a-f]+\/+/.test(src)) && + (src.match(/\/[0-9]+_[0-9a-f]+(?:_[a-z0-9]*)*\.[a-z]+.*$/) || /\/video\/+[0-9]+\/+[0-9a-f]+\/+/.test(src)) && options && options.do_request && options.cb) { // https://c1.staticflickr.com/5/4190/34341416210_29e6098b30.jpg // https://farm5.staticflickr.com/4190/34341416210_9f14cc1576_o.jpg @@ -51672,6 +51676,8 @@ var $$IMU_EXPORT$$; // https://live.staticflickr.com/65535/48913730532_c31a823c53_o.jpg // https://live.staticflickr.com/31337/49782135648_bff29ec44e_b.jpg // https://live.staticflickr.com/video/49782135648/bff29ec44e/1080p.mp4 + // thanks to anonymous for reporting: + // https://live.staticflickr.com/2624/4134813569_42c3f585de_b_d.jpg var find_photoid_secret_from_url = function(src) { var match = src.match(/\/video\/+([0-9]+)\/+([0-9a-f]+)\/+/); @@ -82845,6 +82851,10 @@ var $$IMU_EXPORT$$; // https://www.theleader.com.au/images/transform/v1/crop/frm/137578502/6e23b1ab-793d-48fb-b7c6-17cae54099bd.jpg // https://www.theleader.com.au/images/transform/v1/resize/frm/137578502/6e23b1ab-793d-48fb-b7c6-17cae54099bd.jpg/w0_h0_fscale.jpg domain_nowww === "theleader.com.au" || + // thanks to anonymous for reporting: + // https://www.examiner.com.au/images/transform/v1/crop/frm/storypad-C3fzmZSeE4zEq4PyG5Utt8/84d63f34-e4b0-400e-abb7-f02e54f9c253.jpg/r2_0_5182_2914_w1200_h678_fmax.jpg + // https://www.examiner.com.au/images/transform/v1/resize/frm/storypad-C3fzmZSeE4zEq4PyG5Utt8/84d63f34-e4b0-400e-abb7-f02e54f9c253.jpg/w0_h0_fscale.jpg + domain_nowww === "examiner.com.au" || // https://www.northweststar.com.au/images/transform/v1/crop/frm/Y5kUJ9Q7iPMNzBC9i5WqCU/a68e9967-e0cd-4818-a227-878719e98f65.jpg/r0_0_1200_677_w1200_h678_fmax.jpg // https://www.northweststar.com.au/images/transform/v1/resize/frm/Y5kUJ9Q7iPMNzBC9i5WqCU/a68e9967-e0cd-4818-a227-878719e98f65.jpg/w0_h0_fscale.jpg domain_nowww === "northweststar.com.au") { diff --git a/userscript.user.js b/userscript.user.js index c13f9a43..e1e4a366 100644 --- a/userscript.user.js +++ b/userscript.user.js @@ -27004,6 +27004,9 @@ var $$IMU_EXPORT$$; // https://m.media-amazon.com/images/M/MV5BYmY4NTExN2MtOWZjMy00NWU0LWIzZDMtMzQ4NThjNGM3OGU0XkEyXkFqcGdeQXVyOTc5MDI5NjE@.jpeg // https://m.media-amazon.com/images/M/MV5BOGFkMTZkYmYtNTliNy00N2U3LTkyZjQtYTIxNjEyY2I5MjhiXkEyXkFqcGdeQXVyOTc5MDI5NjE@.UX1000.jpeg -- upscaled // https://m.media-amazon.com/images/M/MV5BOGFkMTZkYmYtNTliNy00N2U3LTkyZjQtYTIxNjEyY2I5MjhiXkEyXkFqcGdeQXVyOTc5MDI5NjE@.jpeg -- original + // thanks to nimbuz on discord: + // https://m.media-amazon.com/images/I/A13usaonutL._CLa%7C2140%2C2000%7C91ZCXdqRg0L.png%7C0%2C0%2C2140%2C2000%2B0.0%2C0.0%2C2140.0%2C2000.0_AC_SX466_.png + // https://m.media-amazon.com/images/I/A13usaonutL._CLa%7C2140%2C2000%7C91ZCXdqRg0L.png%7C0%2C0%2C2140%2C2000%2B0.0%2C0.0%2C2140.0%2C2000.png domain_nosub === "media-amazon.com" || // https://ia.media-imdb.com/images/M/MV5BNjA1NDYwMDQ3MF5BMl5BanBnXkFtZTcwOTYyNDQ0MQ@@._V1_UY268_CR1,0,182,268_AL_.jpg // https://ia.media-imdb.com/images/M/MV5BNjA1NDYwMDQ3MF5BMl5BanBnXkFtZTcwOTYyNDQ0MQ@@.jpg @@ -27030,7 +27033,7 @@ var $$IMU_EXPORT$$; bad: "mask" }; var parse_directives = function(url) { - var match = url.match(/((?:\.+_*(?:[A-Z][A-Z0-9]|V_)[^/.]*)+)\.+[^/.]+(?:[?#].*)?$/); + var match = url.match(/((?:\.+_*(?:0_)?(?:[A-Z][A-Z0-9]|V_)[^/.]*)+)\.+[^/.]+(?:[?#].*)?$/); if (!match) return null; var raw_directives = match[1].replace(/\./g, "_").replace(/_+/g, "_").split("_"); @@ -27039,7 +27042,7 @@ var $$IMU_EXPORT$$; var directive = raw_directives_1[_i]; if (!directive || !directive.length) continue; - var dmatch = directive.match(/^([A-Z][A-Z0-9]|V)(.*)?$/); + var dmatch = directive.match(/^([A-Z][A-Z0-9]|V|0)(.*)?$/); if (!dmatch) { console_warn("Invalid directive", directive, "for URL", url); return null; @@ -27060,7 +27063,7 @@ var $$IMU_EXPORT$$; var stringified = "._" + stringified_arr.join("_") + "_"; if (!stringified_arr.length) stringified = ""; - var urlmatch = url.match(/^(.*\/[^/]+?)(?:\.+_*(?:[A-Z][A-Z0-9]|V_)[^/.]*)*\.*(\.[^/.]+(?:[?#].*)?)$/); + var urlmatch = url.match(/^(.*\/[^/]+?)(?:\.+_*(?:0_)?(?:[A-Z][A-Z0-9]|V_)[^/.]*)*\.*(\.[^/.]+(?:[?#].*)?)$/); if (!urlmatch) { console_warn("Unable to find URL match for", url); return url; @@ -27087,6 +27090,7 @@ var $$IMU_EXPORT$$; directive.key === "SY" || directive.key === "V" || directive.key === "BG" || // background color + directive.key === "0" || directive.key === "CB") { continue; } @@ -47145,7 +47149,7 @@ var $$IMU_EXPORT$$; if ((domain_nosub === "staticflickr.com" || domain === "static.flickr.com" || (domain_nosub === "flickr.com" && string_indexof(domain, ".static.flickr.com") >= 0)) && - (src.match(/\/[0-9]+_[0-9a-f]+(?:_[a-z0-9]*)?\.[a-z]+.*$/) || /\/video\/+[0-9]+\/+[0-9a-f]+\/+/.test(src)) && + (src.match(/\/[0-9]+_[0-9a-f]+(?:_[a-z0-9]*)*\.[a-z]+.*$/) || /\/video\/+[0-9]+\/+[0-9a-f]+\/+/.test(src)) && options && options.do_request && options.cb) { // https://c1.staticflickr.com/5/4190/34341416210_29e6098b30.jpg // https://farm5.staticflickr.com/4190/34341416210_9f14cc1576_o.jpg @@ -47161,6 +47165,8 @@ var $$IMU_EXPORT$$; // https://live.staticflickr.com/65535/48913730532_c31a823c53_o.jpg // https://live.staticflickr.com/31337/49782135648_bff29ec44e_b.jpg // https://live.staticflickr.com/video/49782135648/bff29ec44e/1080p.mp4 + // thanks to anonymous for reporting: + // https://live.staticflickr.com/2624/4134813569_42c3f585de_b_d.jpg var find_photoid_secret_from_url = function(src) { var match = src.match(/\/video\/+([0-9]+)\/+([0-9a-f]+)\/+/); if (!match) { @@ -74705,6 +74711,10 @@ var $$IMU_EXPORT$$; // https://www.theleader.com.au/images/transform/v1/crop/frm/137578502/6e23b1ab-793d-48fb-b7c6-17cae54099bd.jpg // https://www.theleader.com.au/images/transform/v1/resize/frm/137578502/6e23b1ab-793d-48fb-b7c6-17cae54099bd.jpg/w0_h0_fscale.jpg domain_nowww === "theleader.com.au" || + // thanks to anonymous for reporting: + // https://www.examiner.com.au/images/transform/v1/crop/frm/storypad-C3fzmZSeE4zEq4PyG5Utt8/84d63f34-e4b0-400e-abb7-f02e54f9c253.jpg/r2_0_5182_2914_w1200_h678_fmax.jpg + // https://www.examiner.com.au/images/transform/v1/resize/frm/storypad-C3fzmZSeE4zEq4PyG5Utt8/84d63f34-e4b0-400e-abb7-f02e54f9c253.jpg/w0_h0_fscale.jpg + domain_nowww === "examiner.com.au" || // https://www.northweststar.com.au/images/transform/v1/crop/frm/Y5kUJ9Q7iPMNzBC9i5WqCU/a68e9967-e0cd-4818-a227-878719e98f65.jpg/r0_0_1200_677_w1200_h678_fmax.jpg // https://www.northweststar.com.au/images/transform/v1/resize/frm/Y5kUJ9Q7iPMNzBC9i5WqCU/a68e9967-e0cd-4818-a227-878719e98f65.jpg/w0_h0_fscale.jpg domain_nowww === "northweststar.com.au") {