Skip to content

Commit

Permalink
More websites/rules
Browse files Browse the repository at this point in the history
  • Loading branch information
qsniyg committed Feb 1, 2025
1 parent 0d788b6 commit 8e1d1bb
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
2025.1.0 (in-dev)
2025.2.0 (in-dev)

New features:

Expand Down
20 changes: 18 additions & 2 deletions src/userscript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46624,7 +46624,7 @@ var $$IMU_EXPORT$$;
return src.replace("/imgS/", "/imgL/").replace("/imgM/", "/imgL/");
}

if (domain === "walter.trakt.tv") {
if (domain_nosub === "trakt.tv" && /^walter[-.]/.test(domain)) {
// https://walter.trakt.tv/images/movies/000/224/301/posters/thumb/687ddf47d8.jpg.webp
// https://walter.trakt.tv/images/movies/000/224/301/posters/thumb/687ddf47d8.jpg
// https://walter.trakt.tv/images/movies/000/224/301/posters/medium/687ddf47d8.jpg.webp
Expand All @@ -46645,6 +46645,9 @@ var $$IMU_EXPORT$$;
// https://walter.trakt.tv/images/users/001/257/078/avatars/original/bfb7994232.jpg
// https://walter.trakt.tv/images/users/001/006/285/avatars/medium/ff4a3b514d.png -- 300x300, upscaled
// https://walter.trakt.tv/images/users/001/006/285/avatars/original/ff4a3b514d.png -- 200x199
// thanks to anonymous for reporting:
// https://walter-r2.trakt.tv/images/shows/000/067/584/fanarts/thumb/e49f97f20d.jpg.webp
// https://walter-r2.trakt.tv/images/shows/000/067/584/fanarts/original/e49f97f20d.jpg
return src
.replace(/\/(posters|fanarts|avatars)\/(?:thumb|medium|large|full)\/([^/]*?)(\.webp)?$/, "/$1/original/$2");
}
Expand Down Expand Up @@ -92764,11 +92767,13 @@ var $$IMU_EXPORT$$;

if (host_domain_nowww === "redgifs.com" && options.element && !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")));
let parent = common_functions["get_parent_el_matching"](options.element, x => (x.classList.contains("Video") || x.classList.contains("GifPreview") || x.classList.contains("PlayerV2")));
if (parent) {
let poster = parent.querySelector("img.Video-Poster");
if (!poster)
poster = parent.querySelector("img.Player-Poster");
if (!poster)
poster = parent.querySelector("img.PlayerV2-Poster");
if (poster) {
return poster.src;
}
Expand Down Expand Up @@ -118917,6 +118922,17 @@ var $$IMU_EXPORT$$;
return src.replace(/(:\/\/[^/]+\/+)pp\/+/, "$1p/");
}

if (domain_nosub === "exportersindia.com" && /^img[0-9]*\./.test(domain)) {
// thanks to anonymous for reporting:
// https://img3.exportersindia.com/product_images/bc-thumb/dir_11/304667/mica-heating-elements-01-93207.jpg
// https://img3.exportersindia.com/product_images/bc-small/dir_11/304667/mica-heating-elements-01-93207.jpg
// https://img3.exportersindia.com/product_images/bc-full/dir_11/304667/mica-heating-elements-01-93207.jpg -- 450x256
// https://img1.exportersindia.com/product_images/bc-full/2023/9/433773/ladies-cotton-top-1686981275-6940736.jpeg -- 488x798, upscaled?
return src
.replace(/(\/product_images\/+)bc-small\/+/, "$1bc-full/")
.replace(/(\/product_images\/+)bc-thumb\/+/, "$1bc-small/");
}




Expand Down
19 changes: 17 additions & 2 deletions userscript.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -42657,7 +42657,7 @@ var $$IMU_EXPORT$$;
// https://img.cdandlp.com/2014/09/imgM/117153395.jpg
return src.replace("/imgS/", "/imgL/").replace("/imgM/", "/imgL/");
}
if (domain === "walter.trakt.tv") {
if (domain_nosub === "trakt.tv" && /^walter[-.]/.test(domain)) {
// https://walter.trakt.tv/images/movies/000/224/301/posters/thumb/687ddf47d8.jpg.webp
// https://walter.trakt.tv/images/movies/000/224/301/posters/thumb/687ddf47d8.jpg
// https://walter.trakt.tv/images/movies/000/224/301/posters/medium/687ddf47d8.jpg.webp
Expand All @@ -42678,6 +42678,9 @@ var $$IMU_EXPORT$$;
// https://walter.trakt.tv/images/users/001/257/078/avatars/original/bfb7994232.jpg
// https://walter.trakt.tv/images/users/001/006/285/avatars/medium/ff4a3b514d.png -- 300x300, upscaled
// https://walter.trakt.tv/images/users/001/006/285/avatars/original/ff4a3b514d.png -- 200x199
// thanks to anonymous for reporting:
// https://walter-r2.trakt.tv/images/shows/000/067/584/fanarts/thumb/e49f97f20d.jpg.webp
// https://walter-r2.trakt.tv/images/shows/000/067/584/fanarts/original/e49f97f20d.jpg
return src
.replace(/\/(posters|fanarts|avatars)\/(?:thumb|medium|large|full)\/([^/]*?)(\.webp)?$/, "/$1/original/$2");
}
Expand Down Expand Up @@ -83577,11 +83580,13 @@ var $$IMU_EXPORT$$;
}
if (host_domain_nowww === "redgifs.com" && options.element && !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")); });
var parent_3 = common_functions["get_parent_el_matching"](options.element, function(x) { return (x.classList.contains("Video") || x.classList.contains("GifPreview") || x.classList.contains("PlayerV2")); });
if (parent_3) {
var poster = parent_3.querySelector("img.Video-Poster");
if (!poster)
poster = parent_3.querySelector("img.Player-Poster");
if (!poster)
poster = parent_3.querySelector("img.PlayerV2-Poster");
if (poster) {
return poster.src;
}
Expand Down Expand Up @@ -106879,6 +106884,16 @@ var $$IMU_EXPORT$$;
// thanks to anonymous for reporting:
return src.replace(/(:\/\/[^/]+\/+)pp\/+/, "$1p/");
}
if (domain_nosub === "exportersindia.com" && /^img[0-9]*\./.test(domain)) {
// thanks to anonymous for reporting:
// https://img3.exportersindia.com/product_images/bc-thumb/dir_11/304667/mica-heating-elements-01-93207.jpg
// https://img3.exportersindia.com/product_images/bc-small/dir_11/304667/mica-heating-elements-01-93207.jpg
// https://img3.exportersindia.com/product_images/bc-full/dir_11/304667/mica-heating-elements-01-93207.jpg -- 450x256
// https://img1.exportersindia.com/product_images/bc-full/2023/9/433773/ladies-cotton-top-1686981275-6940736.jpeg -- 488x798, upscaled?
return src
.replace(/(\/product_images\/+)bc-small\/+/, "$1bc-full/")
.replace(/(\/product_images\/+)bc-thumb\/+/, "$1bc-small/");
}
// -- 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 8e1d1bb

Please sign in to comment.