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 9, 2024
1 parent 5f7964d commit 864f722
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
17 changes: 15 additions & 2 deletions src/userscript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93301,7 +93301,7 @@ var $$IMU_EXPORT$$;
}
},
process: function(done, resp, cache_key) {
var match = resp.responseText.match(/<a[^>]+href=["'](https?:\/\/i\.pixxxels\.cc\/+[^"']+\?dl=1)["']/);
var match = resp.responseText.match(/<a[^>]+href=["'](https?:\/\/i\.[a-z]+\.cc\/+[^"']+\?dl=1)["']/);
if (!match) {
console_error(cache_key, "Unable to find download link for", resp);
return done(null, false);
Expand All @@ -93310,7 +93310,7 @@ var $$IMU_EXPORT$$;
var dllink = decode_entities(match[1]).replace(/[?#].*$/, "");

var referer = resp.finalUrl;
match = resp.responseText.match(/<link rel="canonical" href="(https?:\/\/pixxxels\.cc\/[^"]+)"/);
match = resp.responseText.match(/<link rel="canonical" href="(https?:\/\/[a-z]+\.cc\/[^"]+)"/);
if (match) {
referer = decode_entities(match[1]);
}
Expand Down Expand Up @@ -112095,6 +112095,19 @@ var $$IMU_EXPORT$$;
return src.replace(/(\/history-images\/+)thumbnail\/+/, "$1preview/");
}

if (domain === "storage.pubble.nl") {
// thanks to anonymous for reporting:
// https://storage.pubble.nl/350eaab2/content/2023/1/f4b4e7f3-af5e-4500-948e-69b3920589b4_thumb1920.webp
// https://storage.pubble.nl/350eaab2/content/2023/1/f4b4e7f3-af5e-4500-948e-69b3920589b4.jpg
newsrc = src.replace(/(\/content\/.*)\.webp$/, "$1.jpg");
if (newsrc !== src)
return newsrc;

// https://storage.pubble.nl/350eaab2/content/2023/1/f4b4e7f3-af5e-4500-948e-69b3920589b4_thumb1920.jpg
// https://storage.pubble.nl/350eaab2/content/2023/1/f4b4e7f3-af5e-4500-948e-69b3920589b4.jpg
return src.replace(/(\/content\/.*)_thumb[0-9]+\./, "$1.");
}




Expand Down
15 changes: 13 additions & 2 deletions userscript.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -83852,14 +83852,14 @@ var $$IMU_EXPORT$$;
}
},
process: function(done, resp, cache_key) {
var match = resp.responseText.match(/<a[^>]+href=["'](https?:\/\/i\.pixxxels\.cc\/+[^"']+\?dl=1)["']/);
var match = resp.responseText.match(/<a[^>]+href=["'](https?:\/\/i\.[a-z]+\.cc\/+[^"']+\?dl=1)["']/);
if (!match) {
console_error(cache_key, "Unable to find download link for", resp);
return done(null, false);
}
var dllink = decode_entities(match[1]).replace(/[?#].*$/, "");
var referer = resp.finalUrl;
match = resp.responseText.match(/<link rel="canonical" href="(https?:\/\/pixxxels\.cc\/[^"]+)"/);
match = resp.responseText.match(/<link rel="canonical" href="(https?:\/\/[a-z]+\.cc\/[^"]+)"/);
if (match) {
referer = decode_entities(match[1]);
}
Expand Down Expand Up @@ -100614,6 +100614,17 @@ var $$IMU_EXPORT$$;
// https://www.lookandlearn.com/history-images/preview/YSA/YSA004/YSA004505.jpg
return src.replace(/(\/history-images\/+)thumbnail\/+/, "$1preview/");
}
if (domain === "storage.pubble.nl") {
// thanks to anonymous for reporting:
// https://storage.pubble.nl/350eaab2/content/2023/1/f4b4e7f3-af5e-4500-948e-69b3920589b4_thumb1920.webp
// https://storage.pubble.nl/350eaab2/content/2023/1/f4b4e7f3-af5e-4500-948e-69b3920589b4.jpg
newsrc = src.replace(/(\/content\/.*)\.webp$/, "$1.jpg");
if (newsrc !== src)
return newsrc;
// https://storage.pubble.nl/350eaab2/content/2023/1/f4b4e7f3-af5e-4500-948e-69b3920589b4_thumb1920.jpg
// https://storage.pubble.nl/350eaab2/content/2023/1/f4b4e7f3-af5e-4500-948e-69b3920589b4.jpg
return src.replace(/(\/content\/.*)_thumb[0-9]+\./, "$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
Expand Down

0 comments on commit 864f722

Please sign in to comment.