From b6798ccfe3d916f2e3b6678a1ca2e47fea0272ed Mon Sep 17 00:00:00 2001 From: qsniyg Date: Mon, 18 Sep 2023 07:50:43 +0000 Subject: [PATCH] Support images.gamebanana.com --- CHANGELOG.txt | 2 +- src/userscript.ts | 7 +++++++ userscript.user.js | 6 ++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 0bb258f1..db78a7d0 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -16,7 +16,7 @@ Bugfixes: * Fix subtitles for HLS/DASH streams * Fix iframes crashing when the userscript is enabled on some websites (#1213, thanks to fireattack on discord for reporting) -Special thanks to Flame, TheOne, fyhtma, Tenome, Freso, IZeeLikeEyeZee, TristanWasTaken, sn3akyb3ar, remlap, fireattack, ValiumBear, sn3akyb3ar, desdesifre, karpuzikov for their contributions and reports for this release +Special thanks to Flame, TheOne, fyhtma, Tenome, Freso, IZeeLikeEyeZee, TristanWasTaken, sn3akyb3ar, remlap, fireattack, ValiumBear, sn3akyb3ar, desdesifre, karpuzikov, jonestly for their contributions and reports for this release --- diff --git a/src/userscript.ts b/src/userscript.ts index 51c2bee0..a81f400d 100644 --- a/src/userscript.ts +++ b/src/userscript.ts @@ -107773,6 +107773,13 @@ var $$IMU_EXPORT$$; return src.replace(/(\/i\/+)[sm](\/+[0-9]+\/+)/, "$1l$2"); } + if (domain === "images.gamebanana.com") { + // thanks to jonestly on discord: + // https://images.gamebanana.com/img/ss/mods/530-90_65038aaa0770c.jpg + // https://images.gamebanana.com/img/ss/mods/65038aaa0770c.jpg + return src.replace(/(\/img\/+ss\/+[^/]+\/+)[0-9]+-[0-9]+_([0-9a-f]+\.)/, "$1$2"); + } + diff --git a/userscript.user.js b/userscript.user.js index 7af31588..426290ab 100644 --- a/userscript.user.js +++ b/userscript.user.js @@ -96648,6 +96648,12 @@ var $$IMU_EXPORT$$; // https://qpzgjzffeg4d.merlincdn.net/i/l/007/0073111.jpeg return src.replace(/(\/i\/+)[sm](\/+[0-9]+\/+)/, "$1l$2"); } + if (domain === "images.gamebanana.com") { + // thanks to jonestly on discord: + // https://images.gamebanana.com/img/ss/mods/530-90_65038aaa0770c.jpg + // https://images.gamebanana.com/img/ss/mods/65038aaa0770c.jpg + return src.replace(/(\/img\/+ss\/+[^/]+\/+)[0-9]+-[0-9]+_([0-9a-f]+\.)/, "$1$2"); + } // -- 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