Skip to content

Commit

Permalink
More websites/rules
Browse files Browse the repository at this point in the history
  • Loading branch information
qsniyg committed Jul 21, 2024
1 parent 340385a commit 2b998ea
Show file tree
Hide file tree
Showing 3 changed files with 216 additions and 59 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

---

Expand Down
137 changes: 110 additions & 27 deletions src/userscript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 + "/";
}
Expand Down Expand Up @@ -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-([^-/._]+)\//;
}
Expand Down Expand Up @@ -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") {
Expand Down Expand Up @@ -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") {
Expand Down Expand Up @@ -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" ||
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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") {
Expand Down Expand Up @@ -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") {
Expand Down Expand Up @@ -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);
}
});
});
};

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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");
}




Expand Down Expand Up @@ -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
Expand Down
Loading

0 comments on commit 2b998ea

Please sign in to comment.