diff --git a/src/userscript.ts b/src/userscript.ts index 5517cd19..8abd25c8 100644 --- a/src/userscript.ts +++ b/src/userscript.ts @@ -29506,6 +29506,15 @@ var $$IMU_EXPORT$$; // https://ssl.c.photoshelter.com/img-get2/I0000Ie55NrhpWqc/sec=wdfsdfoeflwefms1440ed20190122M0EoIIVFG8_ziPw/fit=350x2040 // https://ssl.c.photoshelter.com/img-get2/I0000Ie55NrhpWqc/fit=99999999999/fit=350x2040 // https://ssl.c.photoshelter.com/img-get2/I0000Ie55NrhpWqc/fit=99999999999 + + // https://ssl.c.photoshelter.com/img/photoshelter_unavailable.jpg + if (/\/img\/+photoshelter_unavailable\./.test(src)) { + return { + url: src, + bad: true + }; + } + return src .replace(/\/img-get2\/([^/]*)\/(?:[a-z]+=[^/]*\/)*([^/]*)$/, "/img-get2/$1/fit=99999999999/$2") .replace(/\/img-get\/([^/]*)(?:\/[ts]\/[0-9]+\/(?:[0-9]+\/)?)?([^/]*)$/, "/img-get2/$1/fit=99999999999/$2") @@ -29516,6 +29525,8 @@ var $$IMU_EXPORT$$; // thanks to anonymous for reporting: domain_nowww === "schreyer-photo.com" || // thanks to anonymous for reporting: + domain_nowww === "stellapictures.co.uk" || + // thanks to anonymous for reporting: domain_nowww === "mgpstockphotos.com") { // thanks to meloner on discord for reporting: // https://www.marcusgetta.photography/img-get2/I0000RIQ98yTy98k/fill=/fit=188x188/I0000RIQ98yTy98k.jpg @@ -33266,9 +33277,6 @@ var $$IMU_EXPORT$$; // thanks to anonymous for reporting: // https://s.isanook.com/gu/0/pichistory/118112112007053654.jpg?ip/crop/w200/q90/webp domain === "s.isanook.com" || - // thanks to anonymous for reporting: - // https://numero.twic.pics/images/article/homepage/full/push-cover-andre3000-numero-magazine.jpg?twic=v1/quality=83/truecolor=true/output=jpeg/focus=800x395/cover=11:5/resize=1680 - (domain === "numero.twic.pics" && string_indexof(src, "/images/") >= 0) || // thanks to doio on github: https://github.com/qsniyg/maxurl/issues/1065 // https://att.fengimg.com/2022/10/01/180531wola29wdc80v3bq1.jpeg?imageMogr2/thumbnail/320x/format/jpg/interlace/0/quality/100 -- via https://www.feng.com/post/13618502 // https://att.fengimg.com/2022/10/01/180531wola29wdc80v3bq1.jpeg @@ -50307,6 +50315,13 @@ var $$IMU_EXPORT$$; } } + if (/:[0-9]+-[0-9]+\?.*$/.test(src)) { + // thanks to anonymous for reporting: + // https://intelcorp.scene7.com/is/image/intelcorp/diagram-mpi-library-l-v2-rwd:1072-603?scl=1&fmt=png-alpha + // https://intelcorp.scene7.com/is/image/intelcorp/diagram-mpi-library-l-v2-rwd?scl=1&fmt=png-alpha + return src.replace(/:[0-9]+-[0-9]+(\?.*)?$/, "$1"); + } + var srcadd = ""; if (src.match(/\.(?:jpe?g|JPE?G)(?:\?.*)?$/)) @@ -82782,6 +82797,10 @@ var $$IMU_EXPORT$$; // https://www.hawkesburygazette.com.au/images/transform/v1/crop/frm/silverstone-feed-data/83c69e9a-d532-4303-8db6-7d31db31d4cc.jpg/r0_0_800_600_w1200_h678_fmax.webp // https://www.hawkesburygazette.com.au/images/transform/v1/resize/frm/silverstone-feed-data/83c69e9a-d532-4303-8db6-7d31db31d4cc.jpg/w0_h0_fscale.webp domain_nowww === "hawkesburygazette.com.au" || + // thanks to anonymous for reporting: + // 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" || // 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") { @@ -85189,7 +85208,7 @@ var $$IMU_EXPORT$$; var params = json.payload[1][4].player; return done(params, 3*60*60); } catch (e) { - console_error("vk_video", e); + console_error("vk_video", e, result); } return done(null, false); @@ -85243,7 +85262,7 @@ var $$IMU_EXPORT$$; }; newsrc = website_query({ - website_regex: /^[a-z]+:\/\/[^/]+\/+video(-[0-9]+_[0-9]+)(?:[?#].*)?$/, + website_regex: /^[a-z]+:\/\/[^/]+\/+video(-?[0-9]+_[0-9]+)(?:[?#].*)?$/, run: function(cb, match) { var queries = common_functions["parse_imu_hash"](src); @@ -85262,10 +85281,21 @@ var $$IMU_EXPORT$$; if (domain_nowww === "vk.com") { // thanks to anonymous for reporting: - match = src.match(/:\/\/[^/]+\/+clips\/+[^/]+\?(?:.*&)?z=clip-([0-9]+_[0-9]+)(?:[&/%#].*)?$/); + match = src.match(/:\/\/[^/]+\/+clips\/+[^/]+\?(?:.*&)?z=clip(-?[0-9]+_[0-9]+)(?:[&/%#].*)?$/); if (match) { return { - url: "https://vk.com/video-" + match[1], + url: "https://vk.com/video" + match[1], + is_pagelink: true + }; + } + } + + if (domain === "m.vk.com") { + // thanks to anonymous for reporting: + match = src.match(/:\/\/[^/]+\/+video(-?[0-9]+_[0-9]+)(?:[?#].*)?$/); + if (match) { + return { + url: "https://vk.com/video" + match[1], is_pagelink: true }; } @@ -90726,10 +90756,15 @@ var $$IMU_EXPORT$$; } if (host_domain_nowww === "redgifs.com" && options.element && !src) { - if (options.element.tagName === "VIDEO" && options.element.parentElement && options.element.parentElement.classList.contains("Video")) { - let poster = options.element.parentElement.querySelector("img.Video-Poster"); - if (poster) { - return poster.src; + if (options.element.tagName === "VIDEO") { + let parent = common_functions["get_parent_el_matching"](options.element, x => (x.classList.contains("Video") || x.classList.contains("GifPreview"))); + if (parent) { + let poster = parent.querySelector("img.Video-Poster"); + if (!poster) + poster = parent.querySelector("img.Player-Poster"); + if (poster) { + return poster.src; + } } } } @@ -114945,6 +114980,40 @@ var $$IMU_EXPORT$$; return src.replace(/(\/Picture\/+Get\/+)[rtm]\/+/, "$1f/"); } + if (domain === "images.sidearmdev.com") { + // thanks to anonymous for reporting: + // https://images.sidearmdev.com/crop?url=https%3A%2F%2Fdxbhsrqyrr690.cloudfront.net%2Fsidearm.nextgen.sites%2Ffsuni.sidearmsports.com%2Fimages%2F2023%2F7%2F5%2FSeminole_-_full_color_on_white_background.jpg&width=100&height=100&gravity=north&type=webp + // https://dxbhsrqyrr690.cloudfront.net/sidearm.nextgen.sites/fsuni.sidearmsports.com/images/2023/7/5/Seminole_-_full_color_on_white_background.jpg + newsrc = src.replace(/^[a-z]+:\/\/[^/]+\/+crop\?(?:.*&)?url=([^&]+)(?:[&#].*)?$/, "$1"); + if (newsrc !== src) + return decodeuri_ifneeded(newsrc); + } + + if (domain_nosub === "twic.pics") { + // thanks to anonymous for reporting: + // https://numero.twic.pics/images/article/homepage/full/push-cover-andre3000-numero-magazine.jpg?twic=v1/quality=83/truecolor=true/output=jpeg/focus=800x395/cover=11:5/resize=1680 + // https://numero.twic.pics/images/article/homepage/full/push-cover-andre3000-numero-magazine.jpg + // https://saywho.twic.pics/https://saywho.fr/app/uploads/2019/06/20190627_06272019_VillaNoailles_Toulon-J1_269-1365x2048.jpg?twic=v1/cover=1365:2048/resize=370/max=1440 + // https://saywho.twic.pics/https://saywho.fr/app/uploads/2019/06/20190627_06272019_VillaNoailles_Toulon-J1_269.jpg + newsrc = remove_queries(src, "twic"); + if (newsrc !== src) + return newsrc; + + return src.replace(/-[0-9]+x[0-9]+(\.[a-z]+)$/, "$1"); + } + + if ((domain_nowww === "4pda.to" || + domain === "i.4pda.ws") && /:\/\/[^/]+\/+s\//.test(src)) { + // thanks to anonymous for reporting: + // https://4pda.to/s/as6yfz1IksFlRyBDvGH8dcO.gif + if (/\/s\/+as6yfz1IksFlRyBDvGH8dcO\./.test(src)) { + return { + url: src, + bad: "mask" + }; + } + } + diff --git a/userscript.user.js b/userscript.user.js index 91785ad7..713715ca 100644 --- a/userscript.user.js +++ b/userscript.user.js @@ -26928,6 +26928,13 @@ var $$IMU_EXPORT$$; // https://ssl.c.photoshelter.com/img-get2/I0000Ie55NrhpWqc/sec=wdfsdfoeflwefms1440ed20190122M0EoIIVFG8_ziPw/fit=350x2040 // https://ssl.c.photoshelter.com/img-get2/I0000Ie55NrhpWqc/fit=99999999999/fit=350x2040 // https://ssl.c.photoshelter.com/img-get2/I0000Ie55NrhpWqc/fit=99999999999 + // https://ssl.c.photoshelter.com/img/photoshelter_unavailable.jpg + if (/\/img\/+photoshelter_unavailable\./.test(src)) { + return { + url: src, + bad: true + }; + } return src .replace(/\/img-get2\/([^/]*)\/(?:[a-z]+=[^/]*\/)*([^/]*)$/, "/img-get2/$1/fit=99999999999/$2") .replace(/\/img-get\/([^/]*)(?:\/[ts]\/[0-9]+\/(?:[0-9]+\/)?)?([^/]*)$/, "/img-get2/$1/fit=99999999999/$2") @@ -26937,6 +26944,8 @@ var $$IMU_EXPORT$$; // thanks to anonymous for reporting: domain_nowww === "schreyer-photo.com" || // thanks to anonymous for reporting: + domain_nowww === "stellapictures.co.uk" || + // thanks to anonymous for reporting: domain_nowww === "mgpstockphotos.com") { // thanks to meloner on discord for reporting: // https://www.marcusgetta.photography/img-get2/I0000RIQ98yTy98k/fill=/fit=188x188/I0000RIQ98yTy98k.jpg @@ -30417,9 +30426,6 @@ var $$IMU_EXPORT$$; // thanks to anonymous for reporting: // https://s.isanook.com/gu/0/pichistory/118112112007053654.jpg?ip/crop/w200/q90/webp domain === "s.isanook.com" || - // thanks to anonymous for reporting: - // https://numero.twic.pics/images/article/homepage/full/push-cover-andre3000-numero-magazine.jpg?twic=v1/quality=83/truecolor=true/output=jpeg/focus=800x395/cover=11:5/resize=1680 - (domain === "numero.twic.pics" && string_indexof(src, "/images/") >= 0) || // thanks to doio on github: https://github.com/qsniyg/maxurl/issues/1065 // https://att.fengimg.com/2022/10/01/180531wola29wdc80v3bq1.jpeg?imageMogr2/thumbnail/320x/format/jpg/interlace/0/quality/100 -- via https://www.feng.com/post/13618502 // https://att.fengimg.com/2022/10/01/180531wola29wdc80v3bq1.jpeg @@ -45918,6 +45924,12 @@ var $$IMU_EXPORT$$; return newsrc; } } + if (/:[0-9]+-[0-9]+\?.*$/.test(src)) { + // thanks to anonymous for reporting: + // https://intelcorp.scene7.com/is/image/intelcorp/diagram-mpi-library-l-v2-rwd:1072-603?scl=1&fmt=png-alpha + // https://intelcorp.scene7.com/is/image/intelcorp/diagram-mpi-library-l-v2-rwd?scl=1&fmt=png-alpha + return src.replace(/:[0-9]+-[0-9]+(\?.*)?$/, "$1"); + } var srcadd = ""; if (src.match(/\.(?:jpe?g|JPE?G)(?:\?.*)?$/)) srcadd = "scl=1"; @@ -74648,6 +74660,10 @@ var $$IMU_EXPORT$$; // https://www.hawkesburygazette.com.au/images/transform/v1/crop/frm/silverstone-feed-data/83c69e9a-d532-4303-8db6-7d31db31d4cc.jpg/r0_0_800_600_w1200_h678_fmax.webp // https://www.hawkesburygazette.com.au/images/transform/v1/resize/frm/silverstone-feed-data/83c69e9a-d532-4303-8db6-7d31db31d4cc.jpg/w0_h0_fscale.webp domain_nowww === "hawkesburygazette.com.au" || + // thanks to anonymous for reporting: + // 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" || // 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") { @@ -76778,7 +76794,7 @@ var $$IMU_EXPORT$$; var params = json.payload[1][4].player; return done(params, 3 * 60 * 60); } catch (e) { - console_error("vk_video", e); + console_error("vk_video", e, result); } return done(null, false); } @@ -76823,7 +76839,7 @@ var $$IMU_EXPORT$$; return null; }; newsrc = website_query({ - website_regex: /^[a-z]+:\/\/[^/]+\/+video(-[0-9]+_[0-9]+)(?:[?#].*)?$/, + website_regex: /^[a-z]+:\/\/[^/]+\/+video(-?[0-9]+_[0-9]+)(?:[?#].*)?$/, run: function(cb, match) { var queries = common_functions["parse_imu_hash"](src); var list = null; @@ -76841,10 +76857,20 @@ var $$IMU_EXPORT$$; } if (domain_nowww === "vk.com") { // thanks to anonymous for reporting: - match = src.match(/:\/\/[^/]+\/+clips\/+[^/]+\?(?:.*&)?z=clip-([0-9]+_[0-9]+)(?:[&/%#].*)?$/); + match = src.match(/:\/\/[^/]+\/+clips\/+[^/]+\?(?:.*&)?z=clip(-?[0-9]+_[0-9]+)(?:[&/%#].*)?$/); if (match) { return { - url: "https://vk.com/video-" + match[1], + url: "https://vk.com/video" + match[1], + is_pagelink: true + }; + } + } + if (domain === "m.vk.com") { + // thanks to anonymous for reporting: + match = src.match(/:\/\/[^/]+\/+video(-?[0-9]+_[0-9]+)(?:[?#].*)?$/); + if (match) { + return { + url: "https://vk.com/video" + match[1], is_pagelink: true }; } @@ -81657,10 +81683,15 @@ var $$IMU_EXPORT$$; return newsrc; } if (host_domain_nowww === "redgifs.com" && options.element && !src) { - if (options.element.tagName === "VIDEO" && options.element.parentElement && options.element.parentElement.classList.contains("Video")) { - var poster = options.element.parentElement.querySelector("img.Video-Poster"); - if (poster) { - return poster.src; + if (options.element.tagName === "VIDEO") { + var parent_3 = common_functions["get_parent_el_matching"](options.element, function(x) { return (x.classList.contains("Video") || x.classList.contains("GifPreview")); }); + if (parent_3) { + var poster = parent_3.querySelector("img.Video-Poster"); + if (!poster) + poster = parent_3.querySelector("img.Player-Poster"); + if (poster) { + return poster.src; + } } } } @@ -99911,8 +99942,8 @@ var $$IMU_EXPORT$$; } if (host_domain_nowww === "picnob.com" && options.element && domain_nosub === "picnob.com") { if (options.element.tagName === "IMG" && options.element.parentElement && options.element.parentElement.tagName === "A") { - var parent_3 = options.element.parentElement; - var parent_href = parent_3.href || ""; + var parent_4 = options.element.parentElement; + var parent_href = parent_4.href || ""; if (/^[a-z]+:\/\/[^/]*\.cdninstagram\.com\//.test(parent_href)) { return common_functions["set_cdninstagram_obj"](parent_href); } @@ -100163,12 +100194,12 @@ var $$IMU_EXPORT$$; } } if (host_domain_nowww === "itaku.ee" && options.element) { - var parent_4 = common_functions["get_parent_el_matching"](options.element, function(el) { + var parent_5 = common_functions["get_parent_el_matching"](options.element, function(el) { return el.tagName === "A" && el.classList.contains("img-link") && el.href && /\/images\/+[0-9]+/.test(el.href); }); - if (parent_4) { + if (parent_5) { return { - url: parent_4.href, + url: parent_5.href, is_pagelink: true }; } @@ -100307,9 +100338,9 @@ var $$IMU_EXPORT$$; // thanks to anonymous for reporting: // https://www.sfmoma.org/artwork/2007.207/ if (options.element.tagName === "CANVAS" && options.element.matches("#artworkimage > .openseadragon-container .openseadragon-canvas > canvas")) { - var parent_5 = common_functions["get_parent_el_matching"](options.element, function(x) { return x.matches("#artworkimage"); }); - if (parent_5) { - var imgel = parent_5.querySelector("img.artworksingleimage-image"); + var parent_6 = common_functions["get_parent_el_matching"](options.element, function(x) { return x.matches("#artworkimage"); }); + if (parent_6) { + var imgel = parent_6.querySelector("img.artworksingleimage-image"); if (imgel) return imgel.src; } @@ -103218,6 +103249,36 @@ var $$IMU_EXPORT$$; // https://rehost.diberie.com/Picture/Get/f/293961 -- 4178x2350 return src.replace(/(\/Picture\/+Get\/+)[rtm]\/+/, "$1f/"); } + if (domain === "images.sidearmdev.com") { + // thanks to anonymous for reporting: + // https://images.sidearmdev.com/crop?url=https%3A%2F%2Fdxbhsrqyrr690.cloudfront.net%2Fsidearm.nextgen.sites%2Ffsuni.sidearmsports.com%2Fimages%2F2023%2F7%2F5%2FSeminole_-_full_color_on_white_background.jpg&width=100&height=100&gravity=north&type=webp + // https://dxbhsrqyrr690.cloudfront.net/sidearm.nextgen.sites/fsuni.sidearmsports.com/images/2023/7/5/Seminole_-_full_color_on_white_background.jpg + newsrc = src.replace(/^[a-z]+:\/\/[^/]+\/+crop\?(?:.*&)?url=([^&]+)(?:[&#].*)?$/, "$1"); + if (newsrc !== src) + return decodeuri_ifneeded(newsrc); + } + if (domain_nosub === "twic.pics") { + // thanks to anonymous for reporting: + // https://numero.twic.pics/images/article/homepage/full/push-cover-andre3000-numero-magazine.jpg?twic=v1/quality=83/truecolor=true/output=jpeg/focus=800x395/cover=11:5/resize=1680 + // https://numero.twic.pics/images/article/homepage/full/push-cover-andre3000-numero-magazine.jpg + // https://saywho.twic.pics/https://saywho.fr/app/uploads/2019/06/20190627_06272019_VillaNoailles_Toulon-J1_269-1365x2048.jpg?twic=v1/cover=1365:2048/resize=370/max=1440 + // https://saywho.twic.pics/https://saywho.fr/app/uploads/2019/06/20190627_06272019_VillaNoailles_Toulon-J1_269.jpg + newsrc = remove_queries(src, "twic"); + if (newsrc !== src) + return newsrc; + return src.replace(/-[0-9]+x[0-9]+(\.[a-z]+)$/, "$1"); + } + if ((domain_nowww === "4pda.to" || + domain === "i.4pda.ws") && /:\/\/[^/]+\/+s\//.test(src)) { + // thanks to anonymous for reporting: + // https://4pda.to/s/as6yfz1IksFlRyBDvGH8dcO.gif + if (/\/s\/+as6yfz1IksFlRyBDvGH8dcO\./.test(src)) { + return { + url: src, + bad: "mask" + }; + } + } // -- 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 @@ -105775,9 +105836,9 @@ var $$IMU_EXPORT$$; element_ok: function(el) { if (el.tagName.toUpperCase() === "BUTTON" && (el.classList.contains("gallery-inline__next-overlay") || el.classList.contains("gallery-inline__prev-overlay"))) { - var parent_6 = el.parentElement; - if (parent_6.classList.contains("gallery-inline__container")) { - var slides = parent_6.querySelector(".gallery-inline__slides"); + var parent_7 = el.parentElement; + if (parent_7.classList.contains("gallery-inline__container")) { + var slides = parent_7.querySelector(".gallery-inline__slides"); return { el: slides, search: true