Skip to content

Commit

Permalink
More websites/rules
Browse files Browse the repository at this point in the history
Fixes #1323
  • Loading branch information
qsniyg committed May 9, 2024
1 parent 656b9fa commit 3b9e30b
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Bugfixes:
* Fix browser download replacing current page on non-same-origin URLs
* Fix GM_download headers for Tampermonkey and Violentmonkey

Special thanks to fireattack, nimbuz, Froktime, fyhtma, SakalliTavernaci, TheLastZombie, oifj34f34f, Solus, sn3akyb3ar, n0stal6ic, nyahgust, vscum, TristanWasTaken, BlindWanda, SUPER7X, n0099, remlap, CetaceanNation 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 for their contributions and reports for this release

---

Expand Down
37 changes: 34 additions & 3 deletions src/userscript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29157,9 +29157,14 @@ var $$IMU_EXPORT$$;
// http://media1.popsugar-assets.com/files/2016/05/22/156/n/1922398/c7b25a8fd8aaab98_GettyImages-533596620/i/Mila-Kunis-Ashton-Kutcher-Billboard-Music-Awards-2016.jpg
// https://media1.popsugar-assets.com/files/thumbor/t85Z6EqhDjIu8EaEzfzk5hOJ1Ck/0x360:2400x2394/fit-in/728xorig/filters:format_auto-!!-:strip_icc-!!-:watermark-!popsugar-watermark.png,-5,-5,0!-/2020/01/16/687/n/1922564/4606d55d5e20819816a430.09594567_/i/selena-gomez-style-for-new-album-release-2020.jpg
// https://media1.popsugar-assets.com/files/2020/01/16/687/n/1922564/4606d55d5e20819816a430.09594567_/i/selena-gomez-style-for-new-album-release-2020.jpg
newsrc = src.replace(/\/thumbor\/[^/]+\/(?:[0-9]+x[0-9]+:[0-9]+x[0-9]+\/)?(?:fit-in\/)?[^/]+\/(?:filters:[^/]+\/)?/, "/");
if (newsrc !== src)
return newsrc;
// thanks to bsydow on github: https://github.com/qsniyg/maxurl/issues/1323
// https://media1.popsugar-assets.com/files/thumbor/nABWpoAEkMbUUQ-0rBRznnHGnlQ=/fit-in/792x527/top/filters:format_auto():upscale()/2019/04/23/687/n/1922564/7aba47deaf9aef0f_GettyImages-1144527044.jpg
// https://media1.popsugar-assets.com/files/2019/04/23/687/n/1922564/7aba47deaf9aef0f_GettyImages-1144527044.jpg
if (string_indexof(src, "/thumbor/") >= 0) {
newsrc = src.replace(/\/thumbor\/.*/, "/" + common_functions["get_thumbor_url"](src.replace(/.*?\/thumbor\//, "/")));
if (newsrc !== src)
return newsrc;
}

// http://media1.popsugar-assets.com/files/2013/02/08/2/192/1922398/13bc50e021acd58e_wenn10840119.xxxlarge/i/Spring-Breakers-Berlin-Red-Carpet-Premiere-Pictures.jpg
// http://media1.popsugar-assets.com/files/2013/02/08/2/192/1922398/13bc50e021acd58e_wenn10840119/i/Spring-Breakers-Berlin-Red-Carpet-Premiere-Pictures.jpg
Expand Down Expand Up @@ -55102,6 +55107,15 @@ var $$IMU_EXPORT$$;

if (domain_nosub === "smugmug.com" ||
domain === "photos.smugmug.com") {
// thanks to anonymous for reporting:
// https://[subdomain].smugmug.com/img/spacer.gif
if (/\/img\/+spacer\.gif(?:[?#].*)?$/.test(src)) {
return {
url: src,
bad: "mask"
};
}

// thanks to /u/GarlicoinAccount on reddit for the example URLs and regex!
// https://photos.smugmug.com/Portfolio/i-FsKpjtH/0/bc0067fc/L/Dubai%20at%20Dusk-L.jpg
// https://photos.smugmug.com/Portfolio/i-FsKpjtH/0/bc0067fc/O/Dubai%20at%20Dusk-O.jpg
Expand Down Expand Up @@ -73629,6 +73643,15 @@ var $$IMU_EXPORT$$;
return newsrc;
}

if (domain === "thumbs.onlyfans.com") {
// thanks to anonymous for reporting:
// https://thumbs.onlyfans.com/public/files/thumbs/c144/a/au/auh/auhfdjr84ievanykemqluqjnptunqcsh1705101851/208521709/avatar.jpg
// https://public.onlyfans.com/files/a/au/auh/auhfdjr84ievanykemqluqjnptunqcsh1705101851/208521709/avatar.jpg
newsrc = src.replace(/:\/\/[^/]+\/+public\/+files\/+thumbs\/+[wc][0-9]+\/+/, "://public.onlyfans.com/files/");
if (newsrc !== src)
return newsrc;
}

if (host_domain_nosub === "onlyfans.com" &&
(domain_nosub === "onlyfans.com" ||
domain === "media.onlyfans.com" ||
Expand Down Expand Up @@ -113922,6 +113945,14 @@ var $$IMU_EXPORT$$;
.replace(/\/resize\/+(.*?)_[0-9]+x[0-9]+(\.[a-z]+)(?:[?#].*)?$/, "/modpub/$1$2");
}

if (domain === "files.structurae.net") {
// thanks to anonymous for reporting:
// https://files.structurae.net/files/300x200/1/219-jauntal-2-2000.jpg
// https://files.structurae.net/files/350high/1/219-jauntal-2-2000.jpg
// https://files.structurae.net/files/photos/1/219-jauntal-2-2000.jpg
return src.replace(/(\/files\/+)[0-9]+(?:x[0-9]+|high)\/+/, "$1photos/");
}




Expand Down
34 changes: 31 additions & 3 deletions userscript.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -26603,9 +26603,14 @@ var $$IMU_EXPORT$$;
// http://media1.popsugar-assets.com/files/2016/05/22/156/n/1922398/c7b25a8fd8aaab98_GettyImages-533596620/i/Mila-Kunis-Ashton-Kutcher-Billboard-Music-Awards-2016.jpg
// https://media1.popsugar-assets.com/files/thumbor/t85Z6EqhDjIu8EaEzfzk5hOJ1Ck/0x360:2400x2394/fit-in/728xorig/filters:format_auto-!!-:strip_icc-!!-:watermark-!popsugar-watermark.png,-5,-5,0!-/2020/01/16/687/n/1922564/4606d55d5e20819816a430.09594567_/i/selena-gomez-style-for-new-album-release-2020.jpg
// https://media1.popsugar-assets.com/files/2020/01/16/687/n/1922564/4606d55d5e20819816a430.09594567_/i/selena-gomez-style-for-new-album-release-2020.jpg
newsrc = src.replace(/\/thumbor\/[^/]+\/(?:[0-9]+x[0-9]+:[0-9]+x[0-9]+\/)?(?:fit-in\/)?[^/]+\/(?:filters:[^/]+\/)?/, "/");
if (newsrc !== src)
return newsrc;
// thanks to bsydow on github: https://github.com/qsniyg/maxurl/issues/1323
// https://media1.popsugar-assets.com/files/thumbor/nABWpoAEkMbUUQ-0rBRznnHGnlQ=/fit-in/792x527/top/filters:format_auto():upscale()/2019/04/23/687/n/1922564/7aba47deaf9aef0f_GettyImages-1144527044.jpg
// https://media1.popsugar-assets.com/files/2019/04/23/687/n/1922564/7aba47deaf9aef0f_GettyImages-1144527044.jpg
if (string_indexof(src, "/thumbor/") >= 0) {
newsrc = src.replace(/\/thumbor\/.*/, "/" + common_functions["get_thumbor_url"](src.replace(/.*?\/thumbor\//, "/")));
if (newsrc !== src)
return newsrc;
}
// http://media1.popsugar-assets.com/files/2013/02/08/2/192/1922398/13bc50e021acd58e_wenn10840119.xxxlarge/i/Spring-Breakers-Berlin-Red-Carpet-Premiere-Pictures.jpg
// http://media1.popsugar-assets.com/files/2013/02/08/2/192/1922398/13bc50e021acd58e_wenn10840119/i/Spring-Breakers-Berlin-Red-Carpet-Premiere-Pictures.jpg
// https://media1.popsugar-assets.com/files/2015/09/02/221/n/37139775/d391fe8f30364ef0_15._2007_GettyImages-81449203/i/Selena-Gomez.jpg
Expand Down Expand Up @@ -50172,6 +50177,14 @@ var $$IMU_EXPORT$$;
}
if (domain_nosub === "smugmug.com" ||
domain === "photos.smugmug.com") {
// thanks to anonymous for reporting:
// https://[subdomain].smugmug.com/img/spacer.gif
if (/\/img\/+spacer\.gif(?:[?#].*)?$/.test(src)) {
return {
url: src,
bad: "mask"
};
}
// thanks to /u/GarlicoinAccount on reddit for the example URLs and regex!
// https://photos.smugmug.com/Portfolio/i-FsKpjtH/0/bc0067fc/L/Dubai%20at%20Dusk-L.jpg
// https://photos.smugmug.com/Portfolio/i-FsKpjtH/0/bc0067fc/O/Dubai%20at%20Dusk-O.jpg
Expand Down Expand Up @@ -66653,6 +66666,14 @@ var $$IMU_EXPORT$$;
if (newsrc !== src)
return newsrc;
}
if (domain === "thumbs.onlyfans.com") {
// thanks to anonymous for reporting:
// https://thumbs.onlyfans.com/public/files/thumbs/c144/a/au/auh/auhfdjr84ievanykemqluqjnptunqcsh1705101851/208521709/avatar.jpg
// https://public.onlyfans.com/files/a/au/auh/auhfdjr84ievanykemqluqjnptunqcsh1705101851/208521709/avatar.jpg
newsrc = src.replace(/:\/\/[^/]+\/+public\/+files\/+thumbs\/+[wc][0-9]+\/+/, "://public.onlyfans.com/files/");
if (newsrc !== src)
return newsrc;
}
if (host_domain_nosub === "onlyfans.com" &&
(domain_nosub === "onlyfans.com" ||
domain === "media.onlyfans.com" ||
Expand Down Expand Up @@ -102280,6 +102301,13 @@ var $$IMU_EXPORT$$;
.replace(/(\/modpub\/.*)\.webp(?:[?#].*)?$/, "$1.jpg")
.replace(/\/resize\/+(.*?)_[0-9]+x[0-9]+(\.[a-z]+)(?:[?#].*)?$/, "/modpub/$1$2");
}
if (domain === "files.structurae.net") {
// thanks to anonymous for reporting:
// https://files.structurae.net/files/300x200/1/219-jauntal-2-2000.jpg
// https://files.structurae.net/files/350high/1/219-jauntal-2-2000.jpg
// https://files.structurae.net/files/photos/1/219-jauntal-2-2000.jpg
return src.replace(/(\/files\/+)[0-9]+(?:x[0-9]+|high)\/+/, "$1photos/");
}
// -- 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 3b9e30b

Please sign in to comment.