From 2b998ea4b436e96d6b416e2db044dbc2d9781992 Mon Sep 17 00:00:00 2001 From: qsniyg Date: Sun, 21 Jul 2024 03:20:24 +0000 Subject: [PATCH] More websites/rules --- CHANGELOG.txt | 2 +- src/userscript.ts | 137 ++++++++++++++++++++++++++++++++++++--------- userscript.user.js | 136 ++++++++++++++++++++++++++++++++++---------- 3 files changed, 216 insertions(+), 59 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index f6dc69db..b2452b9a 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -14,7 +14,7 @@ Bugfixes: * Fix GM_download headers for Tampermonkey and Violentmonkey * Fix header parsing for Tampermonkey BETA (thanks to Broly for reporting) -Special thanks to fireattack, nimbuz, Froktime, fyhtma, SakalliTavernaci, TheLastZombie, oifj34f34f, Solus, sn3akyb3ar, n0stal6ic, nyahgust, vscum, TristanWasTaken, BlindWanda, SUPER7X, n0099, remlap, CetaceanNation, bsydow, tathastu871, roi, ItsProyal, lazybookwyrm, James Joint, Machou, Broly for their contributions and reports for this release +Special thanks to fireattack, nimbuz, Froktime, fyhtma, SakalliTavernaci, TheLastZombie, oifj34f34f, Solus, sn3akyb3ar, n0stal6ic, nyahgust, vscum, TristanWasTaken, BlindWanda, SUPER7X, n0099, remlap, CetaceanNation, bsydow, tathastu871, roi, ItsProyal, lazybookwyrm, James Joint, Machou, Broly, siloricity for their contributions and reports for this release --- diff --git a/src/userscript.ts b/src/userscript.ts index eb173d49..3f2aa6ab 100644 --- a/src/userscript.ts +++ b/src/userscript.ts @@ -61046,7 +61046,7 @@ var $$IMU_EXPORT$$; var videoid_to_videourl = function(videoid) { if (our_host === "xvideos") { - return "https://www.xvideos.com/video" + videoid + "/a"; + return "https://www.xvideos.com/video." + videoid + "/a"; } else if (our_host === "xnxx") { return "https://www.xnxx.com/video-" + videoid + "/"; } @@ -61091,7 +61091,7 @@ var $$IMU_EXPORT$$; var regex = null; if (our_host === "xvideos") { - regex = /:\/\/[^/]+\/+(?:video|embedframe\/+)([0-9]+)(?:\/+.*)?(?:[?#].*)?$/; + regex = /:\/\/[^/]+\/+(?:video\.?|embedframe\/+)([0-9a-z]+)(?:\/+.*)?(?:[?#].*)?$/; } else if (our_host === "xnxx") { regex = /:\/\/[^/]+\/+video-([^-/._]+)\//; } @@ -62064,10 +62064,13 @@ var $$IMU_EXPORT$$; // https://img.joj.sk/0af19800d00341c4366ce000de3d89cd // https://img.joj.sk/rx115/a8821f0c5f162a4a843c0b6e5982fcd6 // https://img.joj.sk/a8821f0c5f162a4a843c0b6e5982fcd6 + // thanks to anonymous for reporting: + // https://img.joj.sk/r1200x/f7596119-5eac-4282-ac0d-fe9276f5503c + // https://img.joj.sk/f7596119-5eac-4282-ac0d-fe9276f5503c domain === "img.joj.sk") { // https://cloudia.hnonline.sk/r740x415n/f46d9eecfa7bc72be2d58a1db131b148.jpg?default=article // https://cloudia.hnonline.sk/f46d9eecfa7bc72be2d58a1db131b148.jpg - return src.replace(/(:\/\/[^/]*\/)[a-z]?[0-9]*x[0-9]*[a-z]?\/([0-9a-f]+(?:\.[^/.]*?)?)(?:\?.*)?$/, "$1$2"); + return src.replace(/(:\/\/[^/]*\/)[a-z]?[0-9]*x[0-9]*[a-z]?\/([-0-9a-f]+(?:\.[^/.]*?)?)(?:\?.*)?$/, "$1$2"); } if (googlestorage_container === "nana10img") { @@ -70493,10 +70496,14 @@ var $$IMU_EXPORT$$; return src.replace(/\/media\/thumbnails\/([^/?]*)\?.*$/, "/media/files/$1"); } - if (domain_nowww === "pronto.com.ar") { + if (domain_nowww === "pronto.com.ar" || + // thanks to anonymous for reporting: + // https://www.atalayar.com/asset/thumbnail,1280,720,center,center/media/atalayar/images/2024/06/21/2024062113534695479.jpg + // https://www.atalayar.com/media/atalayar/images/2024/06/21/2024062113534695479.jpg + domain_nowww === "atalayar.com") { // https://www.pronto.com.ar/asset/thumbnail%252C998%252C540%252Ccenter%252Ccenter/media/prontoar/images/2018/09/18/2018091813104610387.png -- 333x540 // https://www.pronto.com.ar/media/prontoar/images/2018/09/18/2018091813104610387.png -- 882x1430 - return src.replace(/\/asset\/thumbnail[,%][^/]*\/media\//, "/media/"); + return src.replace(/\/asset\/+thumbnail[,%][^/]*\/+media\//, "/media/"); } if (domain === "cdn.thebest.gr") { @@ -72067,7 +72074,7 @@ var $$IMU_EXPORT$$; // https://x001.imx.to/i/2016/01/19/569e0e4e392e4.jpg // https://i002.imx.to/t/2019/04/05/20esya.jpg // https://i002.imx.to/i/2019/04/05/20esya.jpg - return src.replace(/(:\/\/[^/]*\/)t\//, "$1i/"); + return src.replace(/:\/\/[^/]*\/t\//, "://imx.to/u/i/"); } if (domain_nowww === "sisajb.com" || @@ -72219,13 +72226,16 @@ var $$IMU_EXPORT$$; "$1$2$3"); } - if (domain_nosub === "thetimes.co.uk" && string_indexof(src, "/imageserver/image/") >= 0) { + if ((domain_nosub === "thetimes.co.uk" || + domain_nosub === "thetimes.com") && /\/imageserver\/+image\//.test(src)) { // https://www.thetimes.co.uk/imageserver/image/methode%2Ftimes%2Fprod%2Fweb%2Fbin%2F081a3bd8-fc5d-11e6-99c1-0f7da5c35c8f.jpg?crop=5022%2C2825%2C51%2C690&resize=685 // https://www.thetimes.co.uk/imageserver/image/methode%2Ftimes%2Fprod%2Fweb%2Fbin%2F081a3bd8-fc5d-11e6-99c1-0f7da5c35c8f.jpg?resize=999999999 // https://www.thetimes.co.uk/imageserver/image/methode%2Fsundaytimes%2Fprodmigration%2Fweb%2Fbin%2F1ed9d88f-d652-4563-8d8b-fcbad22a1d0a.jpg?crop=1024%2C683%2C0%2C0&resize=685 // https://www.thetimes.co.uk/imageserver/image/methode%2Fsundaytimes%2Fprodmigration%2Fweb%2Fbin%2F1ed9d88f-d652-4563-8d8b-fcbad22a1d0a.jpg?resize=999999999 // http://feeds.thetimes.co.uk/web/imageserver/imageserver/image/methode%2Ftimes%2Fprod%2Fweb%2Fbin%2F851fb466-202d-11e7-ba28-54204ca551ca.jpg?crop=1500,844,0,38 // http://feeds.thetimes.co.uk/web/imageserver/imageserver/image/methode%2Ftimes%2Fprod%2Fweb%2Fbin%2F851fb466-202d-11e7-ba28-54204ca551ca.jpg?resize=999999999 + // https://www.thetimes.com/imageserver/image/%2Fmethode%2Ftimes%2Fprod%2Fweb%2Fbin%2Fd31466da-f1b3-11e9-ba44-aad5db5172e7.jpg?crop=1441%2C811%2C66%2C394&resize=1200 + // https://www.thetimes.com/imageserver/image/%2Fmethode%2Ftimes%2Fprod%2Fweb%2Fbin%2Fd31466da-f1b3-11e9-ba44-aad5db5172e7.jpg?resize=999999999 return { url: src.replace(/(?:\?.*)?$/, "?resize=999999999"), head_wrong_contentlength: true @@ -83844,7 +83854,14 @@ var $$IMU_EXPORT$$; if (domain_nosub === "indiatvnews.com" && /^resize[0-9]*\./.test(domain)) { // https://resize6.indiatvnews.com/en/resize/oldbucket/210_-/entertainmenthollywood/IndiaTvbaca76_jennifer-lawrence.jpg // https://resize6.indiatvnews.com/en/oldbucket/entertainmenthollywood/IndiaTvbaca76_jennifer-lawrence.jpg - return src.replace(/\/resize\/+oldbucket\/+[-0-9]+_[-0-9]+\/+/, "/oldbucket/"); + // thanks to anonymous for reporting: + // https://resize.indiatvnews.com/en/resize/newbucket/290_-/2024/07/akb-march-1-1721464733.jpg + // https://resize.indiatvnews.com/en/newbucket/2024/07/akb-march-1-1721464733.jpg + // https://resize.indiatvnews.com/en/resize/gallery/200_-/2020/07/107443887-709624106491608-2248982593069084529-n-1594363555.jpg + // https://resize.indiatvnews.com/en/newbucket/2020/07/107443887-709624106491608-2248982593069084529-n-1594363555.jpg + return src + .replace(/\/resize\/+((?:new|old)bucket)\/+[-0-9]+_[0-9]*-?\/+/, "/$1/") + .replace(/\/resize\/+gallery\//, "/resize/newbucket/"); } if (domain === "girabsas.demo.vincolo.com") { @@ -90335,7 +90352,9 @@ var $$IMU_EXPORT$$; // thanks to fireattack on discord: // https://www.suruga-ya.jp/pics_light/boxart_a/508922053_1.jpg?v=49a0a1c22aaae3834f5d // https://www.suruga-ya.jp/database/pics/game/508922053_1.jpg - return src.replace(/\/(?:database\/+)?pics(?:_(?:light|webp))?\/+(?:boxart_[a-z]+|game)\/+([0-9]+(?:_[0-9]+)?)[a-z]*\.[a-z]+(?:\.[a-z]+)?(?:[?#].*)?$/, "/database/pics/game/$1.jpg"); + // https://www.suruga-ya.jp/pics_webp/boxart_m/gg151512m.jpg.webp + // https://www.suruga-ya.jp/database/pics/game/gg151512.jpg + return src.replace(/\/(?:database\/+)?pics(?:_(?:light|webp))?\/+(?:boxart_[a-z]+|game)\/+([a-z]*[0-9]+(?:_[0-9]+)?)[a-z]*\.[a-z]+(?:\.[a-z]+)?(?:[?#].*)?$/, "/database/pics/game/$1.jpg"); } if (domain_nowww === "itsfun.com.tw") { @@ -90596,26 +90615,48 @@ var $$IMU_EXPORT$$; } if (domain_nowww === "redgifs.com") { + let get_redgifs_token_localstorage = function(cb) { + if (!get_localstorage) + return cb(null); + + get_localstorage("https://www.redgifs.com/", ["session_data"], function(data) { + if (data && data["session_data"]) { + let sessdata = data["session_data"]; + let parsed = JSON_parse(sessdata); + if (parsed && parsed.token) { + return cb(parsed.token); + } + } + + return cb(null); + }); + }; + let get_gfycat_temp_token_v2 = function(site, cb) { var cache_key = site + ":access_token_v2"; - api_query(cache_key, { - url: "https://api." + site + ".com/v2/auth/temporary", - method: "GET", - headers: { - Origin: "https://www." + site + ".com", - Referer: "https://www." + site + ".com", - "Content-Type": "application/json", - "Accept": "application/json" - }, - json: true - }, cb, function(done, json, cache_key) { - if (json.token) { - return done(json.token, 60*60); - } else { - console_error("Unable to get temporary token for", site); - return done(null, false); - } + get_redgifs_token_localstorage(function(token) { + if (token) + return cb(token); + + api_query(cache_key, { + url: "https://api." + site + ".com/v2/auth/temporary", + method: "GET", + headers: { + Origin: "https://www." + site + ".com", + Referer: "https://www." + site + ".com", + "Content-Type": "application/json", + "Accept": "application/json" + }, + json: true + }, cb, function(done, json, cache_key) { + if (json.token) { + return done(json.token, 60*60); + } else { + console_error("Unable to get temporary token for", site); + return done(null, false); + } + }); }); }; @@ -110466,7 +110507,11 @@ var $$IMU_EXPORT$$; //return src.replace(/\/r\/+.*?\/+(p-[a-z]+)\/+/, "/r/$1/"); } - if (domain_nowww === "ososedki.com") { + if (domain_nowww === "ososedki.com" || + // thanks to anonymous for reporting: + // https://cosplaythots.com/images/a/604/-166908530/259321137/456373847.jpg + // https://cosplaythots.com/images/a/1280/-166908530/259321137/456373847.jpg + domain_nowww === "cosplaythots.com") { // thanks to vscum on github: https://github.com/qsniyg/maxurl/issues/1191 // https://ososedki.com/images/a/604/-166908530/292789896/457655229.jpg // https://ososedki.com/images/a/1280/-166908530/292789896/457655229.jpg @@ -115014,6 +115059,37 @@ var $$IMU_EXPORT$$; } } + if (domain_nowww === "pogd.es") { + // thanks to anonymous for reporting: + // https://pogd.es/assets/episodes/Douglas-Is-Cancelled/Douglas-Is-Cancelled-S01E04-0fcbb57ad109337707c3e8d36b847cc0-thumb.jpg + // https://pogd.es/assets/episodes/Douglas-Is-Cancelled/Douglas-Is-Cancelled-S01E04-0fcbb57ad109337707c3e8d36b847cc0-full.jpg + return src.replace(/(\/assets\/+.*?-[0-9a-f]{10,})-thumb\./, "$1-full."); + } + + if (domain === "cdn.moviestillsdb.com") { + // thanks to anonymous for reporting: + // https://cdn.moviestillsdb.com/images/spacer.png + if (/\/images\/+spacer\.png/.test(src)) { + return { + url: src, + bad: "mask" + }; + } + + // https://cdn.moviestillsdb.com/i/160x/4ycwvv3e/mary-poppins-sm.jpg + // https://cdn.moviestillsdb.com/i/500x/4ycwvv3e/mary-poppins-sm.jpg + return src.replace(/\/i\/+160x\/+/, "/i/500x/"); + } + + if (domain === "renginiai.kasvyksta.lt") { + // thanks to anonymous for reporting: + // https://renginiai.kasvyksta.lt/uploads/events/131316/medthumb/la_mer_2024_ventoji.jpg + // https://renginiai.kasvyksta.lt/uploads/events/131316/la_mer_2024_ventoji.jpg + // https://renginiai.kasvyksta.lt/uploads/events/131382/thumb/448174230_899653408842705_7479100982827670299_n_1.jpg + // https://renginiai.kasvyksta.lt/uploads/events/131382/448174230_899653408842705_7479100982827670299_n_1.jpg + return src.replace(/(\/uploads\/+[^/]+\/+[0-9]+\/+)(?:med)?thumb\/+/, "$1"); + } + @@ -116135,6 +116211,13 @@ var $$IMU_EXPORT$$; } } + if (domain_nosub === "wiki.gallery" && /:\/\/[^/]+\/+images\/+[0-9a-f]\/+[0-9a-f]{2}\/+/.test(src)) { + // thanks to siloricity on github: (format=original is needed to not use webp) + // https://mario.wiki.gallery/images/c/c8/Wwt.jpg + // https://mario.wiki.gallery/images/c/c8/Wwt.jpg?format=original + return add_queries(src, {"format": "original"}) + } + // Dokuwiki if (src.match(/\/lib\/+exe\/+fetch\.php.*?[?&]media=[^&]*.*?$/)) { // http://www.substech.com/dokuwiki/lib/exe/fetch.php?w=&h=&cache=cache&media=electron_microscope.png diff --git a/userscript.user.js b/userscript.user.js index 398a2b0a..9484f77e 100644 --- a/userscript.user.js +++ b/userscript.user.js @@ -55459,7 +55459,7 @@ var $$IMU_EXPORT$$; }; var videoid_to_videourl = function(videoid) { if (our_host === "xvideos") { - return "https://www.xvideos.com/video" + videoid + "/a"; + return "https://www.xvideos.com/video." + videoid + "/a"; } else if (our_host === "xnxx") { return "https://www.xnxx.com/video-" + videoid + "/"; } @@ -55496,7 +55496,7 @@ var $$IMU_EXPORT$$; var get_videoid_from_url = function(url) { var regex = null; if (our_host === "xvideos") { - regex = /:\/\/[^/]+\/+(?:video|embedframe\/+)([0-9]+)(?:\/+.*)?(?:[?#].*)?$/; + regex = /:\/\/[^/]+\/+(?:video\.?|embedframe\/+)([0-9a-z]+)(?:\/+.*)?(?:[?#].*)?$/; } else if (our_host === "xnxx") { regex = /:\/\/[^/]+\/+video-([^-/._]+)\//; } @@ -56369,10 +56369,13 @@ var $$IMU_EXPORT$$; // https://img.joj.sk/0af19800d00341c4366ce000de3d89cd // https://img.joj.sk/rx115/a8821f0c5f162a4a843c0b6e5982fcd6 // https://img.joj.sk/a8821f0c5f162a4a843c0b6e5982fcd6 + // thanks to anonymous for reporting: + // https://img.joj.sk/r1200x/f7596119-5eac-4282-ac0d-fe9276f5503c + // https://img.joj.sk/f7596119-5eac-4282-ac0d-fe9276f5503c domain === "img.joj.sk") { // https://cloudia.hnonline.sk/r740x415n/f46d9eecfa7bc72be2d58a1db131b148.jpg?default=article // https://cloudia.hnonline.sk/f46d9eecfa7bc72be2d58a1db131b148.jpg - return src.replace(/(:\/\/[^/]*\/)[a-z]?[0-9]*x[0-9]*[a-z]?\/([0-9a-f]+(?:\.[^/.]*?)?)(?:\?.*)?$/, "$1$2"); + return src.replace(/(:\/\/[^/]*\/)[a-z]?[0-9]*x[0-9]*[a-z]?\/([-0-9a-f]+(?:\.[^/.]*?)?)(?:\?.*)?$/, "$1$2"); } if (googlestorage_container === "nana10img") { // https://storage.googleapis.com/nana10img/crop/_w-743_h-418_c-1/images/news/2018-07-13T115944Z_222051012_RC17A823B160_RTRMADP_3_GREENLAND-ICEBERG.JPG @@ -63896,10 +63899,14 @@ var $$IMU_EXPORT$$; // https://cms.artandarchaeology.princeton.edu/media/files/jessicawomack.jpg return src.replace(/\/media\/thumbnails\/([^/?]*)\?.*$/, "/media/files/$1"); } - if (domain_nowww === "pronto.com.ar") { + if (domain_nowww === "pronto.com.ar" || + // thanks to anonymous for reporting: + // https://www.atalayar.com/asset/thumbnail,1280,720,center,center/media/atalayar/images/2024/06/21/2024062113534695479.jpg + // https://www.atalayar.com/media/atalayar/images/2024/06/21/2024062113534695479.jpg + domain_nowww === "atalayar.com") { // https://www.pronto.com.ar/asset/thumbnail%252C998%252C540%252Ccenter%252Ccenter/media/prontoar/images/2018/09/18/2018091813104610387.png -- 333x540 // https://www.pronto.com.ar/media/prontoar/images/2018/09/18/2018091813104610387.png -- 882x1430 - return src.replace(/\/asset\/thumbnail[,%][^/]*\/media\//, "/media/"); + return src.replace(/\/asset\/+thumbnail[,%][^/]*\/+media\//, "/media/"); } if (domain === "cdn.thebest.gr") { // http://cdn.thebest.gr/media/images/thumbnail/wekkstmsor5bc22ca4898b6.jpg --140x105 @@ -65289,7 +65296,7 @@ var $$IMU_EXPORT$$; // https://x001.imx.to/i/2016/01/19/569e0e4e392e4.jpg // https://i002.imx.to/t/2019/04/05/20esya.jpg // https://i002.imx.to/i/2019/04/05/20esya.jpg - return src.replace(/(:\/\/[^/]*\/)t\//, "$1i/"); + return src.replace(/:\/\/[^/]*\/t\//, "://imx.to/u/i/"); } if (domain_nowww === "sisajb.com" || // http://image.kbsm.net/data/newsThumb/1549957378ADD_thumb580.png @@ -65423,13 +65430,16 @@ var $$IMU_EXPORT$$; // http://sportuvai.bg/pictures/136739__.jpg -- 388x555 return src.replace(/(\/pictures\/+[0-9]+_{1,2})[0-9]+(_+(?:[0-9]+)?)?(\.[^/.]*)(?:[?#].*)?$/, "$1$2$3"); } - if (domain_nosub === "thetimes.co.uk" && string_indexof(src, "/imageserver/image/") >= 0) { + if ((domain_nosub === "thetimes.co.uk" || + domain_nosub === "thetimes.com") && /\/imageserver\/+image\//.test(src)) { // https://www.thetimes.co.uk/imageserver/image/methode%2Ftimes%2Fprod%2Fweb%2Fbin%2F081a3bd8-fc5d-11e6-99c1-0f7da5c35c8f.jpg?crop=5022%2C2825%2C51%2C690&resize=685 // https://www.thetimes.co.uk/imageserver/image/methode%2Ftimes%2Fprod%2Fweb%2Fbin%2F081a3bd8-fc5d-11e6-99c1-0f7da5c35c8f.jpg?resize=999999999 // https://www.thetimes.co.uk/imageserver/image/methode%2Fsundaytimes%2Fprodmigration%2Fweb%2Fbin%2F1ed9d88f-d652-4563-8d8b-fcbad22a1d0a.jpg?crop=1024%2C683%2C0%2C0&resize=685 // https://www.thetimes.co.uk/imageserver/image/methode%2Fsundaytimes%2Fprodmigration%2Fweb%2Fbin%2F1ed9d88f-d652-4563-8d8b-fcbad22a1d0a.jpg?resize=999999999 // http://feeds.thetimes.co.uk/web/imageserver/imageserver/image/methode%2Ftimes%2Fprod%2Fweb%2Fbin%2F851fb466-202d-11e7-ba28-54204ca551ca.jpg?crop=1500,844,0,38 // http://feeds.thetimes.co.uk/web/imageserver/imageserver/image/methode%2Ftimes%2Fprod%2Fweb%2Fbin%2F851fb466-202d-11e7-ba28-54204ca551ca.jpg?resize=999999999 + // https://www.thetimes.com/imageserver/image/%2Fmethode%2Ftimes%2Fprod%2Fweb%2Fbin%2Fd31466da-f1b3-11e9-ba44-aad5db5172e7.jpg?crop=1441%2C811%2C66%2C394&resize=1200 + // https://www.thetimes.com/imageserver/image/%2Fmethode%2Ftimes%2Fprod%2Fweb%2Fbin%2Fd31466da-f1b3-11e9-ba44-aad5db5172e7.jpg?resize=999999999 return { url: src.replace(/(?:\?.*)?$/, "?resize=999999999"), head_wrong_contentlength: true @@ -75576,7 +75586,14 @@ var $$IMU_EXPORT$$; if (domain_nosub === "indiatvnews.com" && /^resize[0-9]*\./.test(domain)) { // https://resize6.indiatvnews.com/en/resize/oldbucket/210_-/entertainmenthollywood/IndiaTvbaca76_jennifer-lawrence.jpg // https://resize6.indiatvnews.com/en/oldbucket/entertainmenthollywood/IndiaTvbaca76_jennifer-lawrence.jpg - return src.replace(/\/resize\/+oldbucket\/+[-0-9]+_[-0-9]+\/+/, "/oldbucket/"); + // thanks to anonymous for reporting: + // https://resize.indiatvnews.com/en/resize/newbucket/290_-/2024/07/akb-march-1-1721464733.jpg + // https://resize.indiatvnews.com/en/newbucket/2024/07/akb-march-1-1721464733.jpg + // https://resize.indiatvnews.com/en/resize/gallery/200_-/2020/07/107443887-709624106491608-2248982593069084529-n-1594363555.jpg + // https://resize.indiatvnews.com/en/newbucket/2020/07/107443887-709624106491608-2248982593069084529-n-1594363555.jpg + return src + .replace(/\/resize\/+((?:new|old)bucket)\/+[-0-9]+_[0-9]*-?\/+/, "/$1/") + .replace(/\/resize\/+gallery\//, "/resize/newbucket/"); } if (domain === "girabsas.demo.vincolo.com") { // http://girabsas.demo.vincolo.com/tools/image.php?id=9799&p=/files/image/9/9799/54d50e7633bee.jpg&w=314&h=176&s=f3f57a00bc8140c28911bd4470d1d16c&d=1423253713 @@ -81311,7 +81328,9 @@ var $$IMU_EXPORT$$; // thanks to fireattack on discord: // https://www.suruga-ya.jp/pics_light/boxart_a/508922053_1.jpg?v=49a0a1c22aaae3834f5d // https://www.suruga-ya.jp/database/pics/game/508922053_1.jpg - return src.replace(/\/(?:database\/+)?pics(?:_(?:light|webp))?\/+(?:boxart_[a-z]+|game)\/+([0-9]+(?:_[0-9]+)?)[a-z]*\.[a-z]+(?:\.[a-z]+)?(?:[?#].*)?$/, "/database/pics/game/$1.jpg"); + // https://www.suruga-ya.jp/pics_webp/boxart_m/gg151512m.jpg.webp + // https://www.suruga-ya.jp/database/pics/game/gg151512.jpg + return src.replace(/\/(?:database\/+)?pics(?:_(?:light|webp))?\/+(?:boxart_[a-z]+|game)\/+([a-z]*[0-9]+(?:_[0-9]+)?)[a-z]*\.[a-z]+(?:\.[a-z]+)?(?:[?#].*)?$/, "/database/pics/game/$1.jpg"); } if (domain_nowww === "itsfun.com.tw") { // https://www.itsfun.com.tw/images/ef/b2/==wZwpmL2kzMkNGMmhDZ2kjZjFGMyEDM09yX4YjMfhjNy8CZmRXbk9SbvNmLnNXboFnL4A3LvoDc0RHa.jpg @@ -81541,25 +81560,43 @@ var $$IMU_EXPORT$$; return newsrc; } if (domain_nowww === "redgifs.com") { + var get_redgifs_token_localstorage_1 = function(cb) { + if (!get_localstorage) + return cb(null); + get_localstorage("https://www.redgifs.com/", ["session_data"], function(data) { + if (data && data["session_data"]) { + var sessdata = data["session_data"]; + var parsed_4 = JSON_parse(sessdata); + if (parsed_4 && parsed_4.token) { + return cb(parsed_4.token); + } + } + return cb(null); + }); + }; var get_gfycat_temp_token_v2_1 = function(site, cb) { var cache_key = site + ":access_token_v2"; - api_query(cache_key, { - url: "https://api." + site + ".com/v2/auth/temporary", - method: "GET", - headers: { - Origin: "https://www." + site + ".com", - Referer: "https://www." + site + ".com", - "Content-Type": "application/json", - "Accept": "application/json" - }, - json: true - }, cb, function(done, json, cache_key) { - if (json.token) { - return done(json.token, 60 * 60); - } else { - console_error("Unable to get temporary token for", site); - return done(null, false); - } + get_redgifs_token_localstorage_1(function(token) { + if (token) + return cb(token); + api_query(cache_key, { + url: "https://api." + site + ".com/v2/auth/temporary", + method: "GET", + headers: { + Origin: "https://www." + site + ".com", + Referer: "https://www." + site + ".com", + "Content-Type": "application/json", + "Accept": "application/json" + }, + json: true + }, cb, function(done, json, cache_key) { + if (json.token) { + return done(json.token, 60 * 60); + } else { + console_error("Unable to get temporary token for", site); + return done(null, false); + } + }); }); }; var query_gfycat_v2 = function(site, id, cb) { @@ -81904,9 +81941,9 @@ var $$IMU_EXPORT$$; process: function(done, resp, cache_key) { var match = resp.responseText.match(/initialRoomDossier\s*=\s*("[^"]+");/); if (match) { - var parsed_4 = JSON_parse(JSON_parse(match[1])); + var parsed_5 = JSON_parse(JSON_parse(match[1])); return done({ - url: parsed_4.hls_source, + url: parsed_5.hls_source, media_info: { type: "video", delivery: "hls", @@ -99228,7 +99265,11 @@ var $$IMU_EXPORT$$; return src.replace(/^[a-z]+:\/\/[^/]+\/+r\/.*?\/hmv\/+files\/+[0-9a-f]{2}\/+([-0-9a-f]{10,})(\.[a-z]+)(?:[?#].*)?$/, "https://hmv.com/getattachment/$1/a$2"); //return src.replace(/\/r\/+.*?\/+(p-[a-z]+)\/+/, "/r/$1/"); } - if (domain_nowww === "ososedki.com") { + if (domain_nowww === "ososedki.com" || + // thanks to anonymous for reporting: + // https://cosplaythots.com/images/a/604/-166908530/259321137/456373847.jpg + // https://cosplaythots.com/images/a/1280/-166908530/259321137/456373847.jpg + domain_nowww === "cosplaythots.com") { // thanks to vscum on github: https://github.com/qsniyg/maxurl/issues/1191 // https://ososedki.com/images/a/604/-166908530/292789896/457655229.jpg // https://ososedki.com/images/a/1280/-166908530/292789896/457655229.jpg @@ -101092,8 +101133,8 @@ var $$IMU_EXPORT$$; // https://files.lbr.cloud/public/2021-11/SoftBank.jpg match = src.match(/^[a-z]+:\/\/[^/]+\/+(ewog[^/?#]+)(?:[?#].*)?$/); if (match) { - var parsed_5 = JSON_parse(base64_decode(match[1])); - return "http://" + parsed_5.bucket + "/" + parsed_5.key; + var parsed_6 = JSON_parse(base64_decode(match[1])); + return "http://" + parsed_6.bucket + "/" + parsed_6.key; } } if (domain === "kuvat.huuto.net") { @@ -103279,6 +103320,33 @@ var $$IMU_EXPORT$$; }; } } + if (domain_nowww === "pogd.es") { + // thanks to anonymous for reporting: + // https://pogd.es/assets/episodes/Douglas-Is-Cancelled/Douglas-Is-Cancelled-S01E04-0fcbb57ad109337707c3e8d36b847cc0-thumb.jpg + // https://pogd.es/assets/episodes/Douglas-Is-Cancelled/Douglas-Is-Cancelled-S01E04-0fcbb57ad109337707c3e8d36b847cc0-full.jpg + return src.replace(/(\/assets\/+.*?-[0-9a-f]{10,})-thumb\./, "$1-full."); + } + if (domain === "cdn.moviestillsdb.com") { + // thanks to anonymous for reporting: + // https://cdn.moviestillsdb.com/images/spacer.png + if (/\/images\/+spacer\.png/.test(src)) { + return { + url: src, + bad: "mask" + }; + } + // https://cdn.moviestillsdb.com/i/160x/4ycwvv3e/mary-poppins-sm.jpg + // https://cdn.moviestillsdb.com/i/500x/4ycwvv3e/mary-poppins-sm.jpg + return src.replace(/\/i\/+160x\/+/, "/i/500x/"); + } + if (domain === "renginiai.kasvyksta.lt") { + // thanks to anonymous for reporting: + // https://renginiai.kasvyksta.lt/uploads/events/131316/medthumb/la_mer_2024_ventoji.jpg + // https://renginiai.kasvyksta.lt/uploads/events/131316/la_mer_2024_ventoji.jpg + // https://renginiai.kasvyksta.lt/uploads/events/131382/thumb/448174230_899653408842705_7479100982827670299_n_1.jpg + // https://renginiai.kasvyksta.lt/uploads/events/131382/448174230_899653408842705_7479100982827670299_n_1.jpg + return src.replace(/(\/uploads\/+[^/]+\/+[0-9]+\/+)(?:med)?thumb\/+/, "$1"); + } // -- 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 @@ -104160,6 +104228,12 @@ var $$IMU_EXPORT$$; }; } } + if (domain_nosub === "wiki.gallery" && /:\/\/[^/]+\/+images\/+[0-9a-f]\/+[0-9a-f]{2}\/+/.test(src)) { + // thanks to siloricity on github: (format=original is needed to not use webp) + // https://mario.wiki.gallery/images/c/c8/Wwt.jpg + // https://mario.wiki.gallery/images/c/c8/Wwt.jpg?format=original + return add_queries(src, { "format": "original" }); + } // Dokuwiki if (src.match(/\/lib\/+exe\/+fetch\.php.*?[?&]media=[^&]*.*?$/)) { // http://www.substech.com/dokuwiki/lib/exe/fetch.php?w=&h=&cache=cache&media=electron_microscope.png