Skip to content

Commit

Permalink
More websites/rules
Browse files Browse the repository at this point in the history
  • Loading branch information
qsniyg committed Aug 24, 2023
1 parent 8da3e61 commit fe8ed7b
Show file tree
Hide file tree
Showing 2 changed files with 135 additions and 2 deletions.
72 changes: 71 additions & 1 deletion src/userscript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52202,6 +52202,10 @@ var $$IMU_EXPORT$$;
domain === "images-prod.anothermag.com" ||
// https://anotherimg-dazedgroup.netdna-ssl.com/1037/azure/another-prod/410/9/419846.jpg
domain === "anotherimg-dazedgroup.netdna-ssl.com" ||
// thanks to anonymous for reporting:
// https://images-prod.dazeddigital.com/1063/azure/dazed-prod/1350/1/1351397.jpg
// https://dazedprod.blob.core.windows.net/dazed-prod/1350/1/1351397.jpg
domain === "images-prod.dazeddigital.com" ||
// https://dazedimg-dazedgroup.netdna-ssl.com/900/azure/dazed-prod/1070/3/1073070.jpg
domain === "dazedimg-dazedgroup.netdna-ssl.com") {
// http://dazedimg.dazedgroup.netdna-cdn.com/320/0-0-558-372/azure/dazed-prod/1240/0/1240136.jpg
Expand Down Expand Up @@ -55882,6 +55886,13 @@ var $$IMU_EXPORT$$;
}

if (domain_nosub === "reddit.com" || domain_nowww === "redd.it") {
// thanks to anonymous for reporting:
// https://www.reddit.com/media?url=https%3A%2F%2Fi.redd.it%2Fvop3v3hflzjb1.png
// https://i.redd.it/vop3v3hflzjb1.png
newsrc = src.replace(/^[a-z]+:\/\/[^/]+\/+media\?(?:.*&)?url=([^&]+)(?:[&#].*)?$/, "$1");
if (newsrc !== src)
return decodeuri_ifneeded(newsrc);

var request_reddit_api = function(id, cb) {
api_query("reddit_api:" + id, {
url: "https://www.reddit.com/api/info.json?id=" + id,
Expand Down Expand Up @@ -66660,7 +66671,14 @@ var $$IMU_EXPORT$$;
// https://i.chzbgr.com/original/9029115904/h545C0A2E/ -- 600x899
// https://i.chzbgr.com/full/8600201472/h54C40B07/
// https://i.chzbgr.com/original/8600201472/h54C40B07/
return src.replace(/(:\/\/[^/]*\/+)(?:thumb[0-9]*|full)\/+/, "$1original/");
newsrc = src.replace(/(:\/\/[^/]*\/+)(?:thumb[0-9]*|full)\/+/, "$1original/");
if (newsrc !== src)
return newsrc;

// thanks to anonymous for reporting:
// https://i.chzbgr.com/imagestore/2012/4/28/th_9b826e3c-1d4b-4cc8-8fb4-d96c230480e8.jpg
// https://i.chzbgr.com/imagestore/2012/4/28/9b826e3c-1d4b-4cc8-8fb4-d96c230480e8.jpg
return src.replace(/(\/imagestore\/+[0-9]{4}\/+[0-9]+\/+[0-9]+\/+)th_/, "$1");
}

if (domain === "img.memecdn.com") {
Expand Down Expand Up @@ -89859,6 +89877,13 @@ var $$IMU_EXPORT$$;
return src.replace(/(:\/\/[^/]+\/+)[0-9]+x[0-9]+\/+media\//, "$1media/");
}

if (domain_nowww === "impericon.com") {
// thanks to anonymous for reporting:
// https://www.impericon.com/432x624x90/media/catalog/product/2/0/20180523_jeff_buckley_lp_lg.jpg
// https://www.impericon.com/media/catalog/product/2/0/20180523_jeff_buckley_lp_lg.jpg
return src.replace(/(:\/\/[^/]+\/+)[0-9]+x[0-9]+x[0-9]+\/+media\//, "$1media/");
}

if (domain === "d1466nnw0ex81e.cloudfront.net") {
// https://d1466nnw0ex81e.cloudfront.net/n_ii/1200/1326121.jpg
// https://d1466nnw0ex81e.cloudfront.net/n_ii/originalimage/1326121.jpg
Expand Down Expand Up @@ -106497,6 +106522,51 @@ var $$IMU_EXPORT$$;
return src.replace(/\/thumbs\/+([0-9]+(?:_[0-9]+)?\.)/, "/orig/$1");
}

if (domain_nowww === "arthive.net") {
// thanks to anonymous for reporting:
// https://arthive.net/res/media/img/oy400/work/29f/9228036.jpg
// https://arthive.net/res/media/img/oy400/work/29f/[email protected]
// https://arthive.net/res/media/img/oy1200/work/29f/9228036.jpg -- 1200x1200
// https://arthive.net/res/media/img/oy1200/work/29f/[email protected] -- 2400x2400, upscaled
// https://arthive.net/res/media/img/oy1200/work/2a2/392425.jpg -- 5418x1200
// https://arthive.net/res/media/img/oy1200/work/2a2/[email protected] -- 10836x2400, upscaled
// https://arthive.net/res/media/img/oy1400/work/5a4/8849505.jpg -- 1112x1400
// https://arthive.net/res/media/img/ox1400/work/5a4/8849505.jpg -- 1400x1762
// other:
// https://arthive.net/res/instances/og_img/audience_artists_en.jpg
//return src.replace(/(\/res\/+media\/+img\/+[^/]+\/+work\/+[^/]+\/+[0-9]+)(\.)/, "$1@2x$2");
newsrc = src
.replace(/(\/res\/+media\/+img\/.*)\.webp(?:[?#].*)?$/, "$1.jpg")
.replace(/(\/res\/+media\/+img\/+o[xy]1400\/+work\/+[^/]+\/+[0-9]+)@2x\./, "$1.")
.replace(/(\/res\/+media\/+img\/+o[xy])(?:400|800|1000|1200)\/+/, "$11400/");
if (newsrc !== src)
return newsrc;

if (options && options.cb && get_image_size && /\/res\/+media\/+img\/+o[xy][0-9]+\//.test(src)) {
get_image_size(src, function(x, y) {
if (x > y) {
return options.cb(src.replace(/(\/res\/+media\/+img\/+o)[xy]([0-9]+\/+)/, "$1y$2"));
} else {
return options.cb(src.replace(/(\/res\/+media\/+img\/+o)[xy]([0-9]+\/+)/, "$1x$2"));
}
});

return {
waiting: true
};
}
}

if (domain === "img-cdn.dnes.bg") {
// thanks to anonymous for reporting:
// https://img-cdn.dnes.bg/d/images/photos/0146/0000146262-lifestyle.jpg
// https://img-cdn.dnes.bg/d/images/photos/0146/0000146262-lifestyle3.jpg -- 569x365, zoomed in
// https://img-cdn.dnes.bg/d/images/photos/0146/0000146262-exclusive.jpg -- 600x331
// other:
// https://img-cdn.dnes.bg/d/images/photos/0526/0000526132-article2.jpg -- 8076x5387
return src.replace(/(\/images\/+photos\/+[^/]+\/+[0-9]+)-(?:lifestyle3?|article2|developing|fbh|middle|category)\./, "$1-exclusive.");
}




Expand Down
65 changes: 64 additions & 1 deletion userscript.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -47508,6 +47508,10 @@ var $$IMU_EXPORT$$;
domain === "images-prod.anothermag.com" ||
// https://anotherimg-dazedgroup.netdna-ssl.com/1037/azure/another-prod/410/9/419846.jpg
domain === "anotherimg-dazedgroup.netdna-ssl.com" ||
// thanks to anonymous for reporting:
// https://images-prod.dazeddigital.com/1063/azure/dazed-prod/1350/1/1351397.jpg
// https://dazedprod.blob.core.windows.net/dazed-prod/1350/1/1351397.jpg
domain === "images-prod.dazeddigital.com" ||
// https://dazedimg-dazedgroup.netdna-ssl.com/900/azure/dazed-prod/1070/3/1073070.jpg
domain === "dazedimg-dazedgroup.netdna-ssl.com") {
// http://dazedimg.dazedgroup.netdna-cdn.com/320/0-0-558-372/azure/dazed-prod/1240/0/1240136.jpg
Expand Down Expand Up @@ -50780,6 +50784,12 @@ var $$IMU_EXPORT$$;
return newsrc;
}
if (domain_nosub === "reddit.com" || domain_nowww === "redd.it") {
// thanks to anonymous for reporting:
// https://www.reddit.com/media?url=https%3A%2F%2Fi.redd.it%2Fvop3v3hflzjb1.png
// https://i.redd.it/vop3v3hflzjb1.png
newsrc = src.replace(/^[a-z]+:\/\/[^/]+\/+media\?(?:.*&)?url=([^&]+)(?:[&#].*)?$/, "$1");
if (newsrc !== src)
return decodeuri_ifneeded(newsrc);
var request_reddit_api = function(id, cb) {
api_query("reddit_api:" + id, {
url: "https://www.reddit.com/api/info.json?id=" + id,
Expand Down Expand Up @@ -60385,7 +60395,13 @@ var $$IMU_EXPORT$$;
// https://i.chzbgr.com/original/9029115904/h545C0A2E/ -- 600x899
// https://i.chzbgr.com/full/8600201472/h54C40B07/
// https://i.chzbgr.com/original/8600201472/h54C40B07/
return src.replace(/(:\/\/[^/]*\/+)(?:thumb[0-9]*|full)\/+/, "$1original/");
newsrc = src.replace(/(:\/\/[^/]*\/+)(?:thumb[0-9]*|full)\/+/, "$1original/");
if (newsrc !== src)
return newsrc;
// thanks to anonymous for reporting:
// https://i.chzbgr.com/imagestore/2012/4/28/th_9b826e3c-1d4b-4cc8-8fb4-d96c230480e8.jpg
// https://i.chzbgr.com/imagestore/2012/4/28/9b826e3c-1d4b-4cc8-8fb4-d96c230480e8.jpg
return src.replace(/(\/imagestore\/+[0-9]{4}\/+[0-9]+\/+[0-9]+\/+)th_/, "$1");
}
if (domain === "img.memecdn.com") {
// https://img.memecdn.com/rogue-cosplay_t_3023679.webp
Expand Down Expand Up @@ -80703,6 +80719,12 @@ var $$IMU_EXPORT$$;
// http://cdn.cdkeys.com/media/catalog/product/t/h/the_technomancer_cover_large.jpg
return src.replace(/(:\/\/[^/]+\/+)[0-9]+x[0-9]+\/+media\//, "$1media/");
}
if (domain_nowww === "impericon.com") {
// thanks to anonymous for reporting:
// https://www.impericon.com/432x624x90/media/catalog/product/2/0/20180523_jeff_buckley_lp_lg.jpg
// https://www.impericon.com/media/catalog/product/2/0/20180523_jeff_buckley_lp_lg.jpg
return src.replace(/(:\/\/[^/]+\/+)[0-9]+x[0-9]+x[0-9]+\/+media\//, "$1media/");
}
if (domain === "d1466nnw0ex81e.cloudfront.net") {
// https://d1466nnw0ex81e.cloudfront.net/n_ii/1200/1326121.jpg
// https://d1466nnw0ex81e.cloudfront.net/n_ii/originalimage/1326121.jpg
Expand Down Expand Up @@ -95504,6 +95526,47 @@ var $$IMU_EXPORT$$;
// https://img.allzip.org/g/3/orig/32166303_28076.jpg
return src.replace(/\/thumbs\/+([0-9]+(?:_[0-9]+)?\.)/, "/orig/$1");
}
if (domain_nowww === "arthive.net") {
// thanks to anonymous for reporting:
// https://arthive.net/res/media/img/oy400/work/29f/9228036.jpg
// https://arthive.net/res/media/img/oy400/work/29f/[email protected]
// https://arthive.net/res/media/img/oy1200/work/29f/9228036.jpg -- 1200x1200
// https://arthive.net/res/media/img/oy1200/work/29f/[email protected] -- 2400x2400, upscaled
// https://arthive.net/res/media/img/oy1200/work/2a2/392425.jpg -- 5418x1200
// https://arthive.net/res/media/img/oy1200/work/2a2/[email protected] -- 10836x2400, upscaled
// https://arthive.net/res/media/img/oy1400/work/5a4/8849505.jpg -- 1112x1400
// https://arthive.net/res/media/img/ox1400/work/5a4/8849505.jpg -- 1400x1762
// other:
// https://arthive.net/res/instances/og_img/audience_artists_en.jpg
//return src.replace(/(\/res\/+media\/+img\/+[^/]+\/+work\/+[^/]+\/+[0-9]+)(\.)/, "$1@2x$2");
newsrc = src
.replace(/(\/res\/+media\/+img\/.*)\.webp(?:[?#].*)?$/, "$1.jpg")
.replace(/(\/res\/+media\/+img\/+o[xy]1400\/+work\/+[^/]+\/+[0-9]+)@2x\./, "$1.")
.replace(/(\/res\/+media\/+img\/+o[xy])(?:400|800|1000|1200)\/+/, "$11400/");
if (newsrc !== src)
return newsrc;
if (options && options.cb && get_image_size && /\/res\/+media\/+img\/+o[xy][0-9]+\//.test(src)) {
get_image_size(src, function(x, y) {
if (x > y) {
return options.cb(src.replace(/(\/res\/+media\/+img\/+o)[xy]([0-9]+\/+)/, "$1y$2"));
} else {
return options.cb(src.replace(/(\/res\/+media\/+img\/+o)[xy]([0-9]+\/+)/, "$1x$2"));
}
});
return {
waiting: true
};
}
}
if (domain === "img-cdn.dnes.bg") {
// thanks to anonymous for reporting:
// https://img-cdn.dnes.bg/d/images/photos/0146/0000146262-lifestyle.jpg
// https://img-cdn.dnes.bg/d/images/photos/0146/0000146262-lifestyle3.jpg -- 569x365, zoomed in
// https://img-cdn.dnes.bg/d/images/photos/0146/0000146262-exclusive.jpg -- 600x331
// other:
// https://img-cdn.dnes.bg/d/images/photos/0526/0000526132-article2.jpg -- 8076x5387
return src.replace(/(\/images\/+photos\/+[^/]+\/+[0-9]+)-(?:lifestyle3?|article2|developing|fbh|middle|category)\./, "$1-exclusive.");
}
// -- 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
Expand Down

0 comments on commit fe8ed7b

Please sign in to comment.