From f6f4f3cfcd01d17c63ba6e68e0555eeff5423bb8 Mon Sep 17 00:00:00 2001 From: qsniyg Date: Sun, 22 Sep 2024 19:20:16 +0000 Subject: [PATCH] More websites/rules --- CHANGELOG.txt | 2 +- src/userscript.ts | 30 +++++++++++++++++++++++++++++- userscript.user.js | 26 +++++++++++++++++++++++++- 3 files changed, 55 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index e6995d2d..14758402 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -4,7 +4,7 @@ Improvements: * Various improvements/fixes to existing rules (including YouTube) -Special thanks to nimbuz, remlap, Solus, immewnity, Froktime, billkewl, Broly, fyhtma, vscum, acidzab, sn3akyb3ar, ValiumBear for their contributions and reports for this release +Special thanks to nimbuz, remlap, Solus, immewnity, Froktime, billkewl, Broly, fyhtma, vscum, acidzab, sn3akyb3ar, ValiumBear, fireattack for their contributions and reports for this release --- diff --git a/src/userscript.ts b/src/userscript.ts index 95ef688d..4d35eaf9 100644 --- a/src/userscript.ts +++ b/src/userscript.ts @@ -87295,7 +87295,20 @@ var $$IMU_EXPORT$$; return src.replace(/(\/userfiles\/+[0-9]{4}\/+[0-9]{2}\/+[0-9]{10,})s([0-9]*\.[^/.]*)(?:[?#].*)?$/, "$1$2"); } - if (false && domain_nowww === "nikkansports.com") { + if (domain_nowww === "nikkansports.com" || + // https://cache4.nipc.jp/baseball/column/analyst/news/img/202409220001984-w200_0.jpg + // https://cache4.nipc.jp/baseball/column/analyst/news/img/202409220001984-w1300_0.jpg + (domain_nosub === "nipc.jp" && /^cache[0-9]*\./.test(domain))) { + // thanks to fireattack on discord for reporting: + // https://cache2.nipc.jp/mod2015/img/common/blank.gif + // https://cache4.nipc.jp/mod/img/blank.gif + if (/\/(?:img\/+common|mod\/+img)\/+blank\.gif(?:[?#].*)?$/.test(src)) { + return { + url: src, + bad: "mask" + }; + } + // wip // https://www.nikkansports.com/entertainment/news/img/201801300000608-nsogp_0.jpg -- 800x1067 // https://www.nikkansports.com/entertainment/news/img/201903030000871-w1300_0.jpg -- 1300x1632 @@ -87323,6 +87336,14 @@ var $$IMU_EXPORT$$; // https://www.nikkansports.com/sports/athletics/seriku/2013/photo/article/img/seriku-hk130819-1-ns-big.jpg -- 245x500 // thanks to anonymous for reporting: // https://www.nikkansports.com/entertainment/akb48/news/img/202304220001315-w1300_2.jpg + + // thanks to fireattack on discord: + // https://www.nikkansports.com/entertainment/news/img/202409220001870-w500_0.jpg + // https://www.nikkansports.com/entertainment/news/img/202409220001870-w1300_0.jpg + // https://www.nikkansports.com/entertainment/news/img/202409220001870-w200_4.jpg + // https://www.nikkansports.com/entertainment/news/img/202409220001870-w1300_4.jpg + + return src.replace(/(\/news\/+img\/+[0-9]+)-w[1-5]00_/, "$1-w1300_"); } if (domain_nosub === "minkch.com" && /^imgs/.test(domain)) { @@ -116689,6 +116710,13 @@ var $$IMU_EXPORT$$; return src.replace(/(:\/\/)l(.*)\/opt\/+([^/]+)-[0-9]+w\./, "$1$2/$3.") } + if (domain === "c.fotka.com") { + // thanks to anonymous for reporting: + // https://c.fotka.com/a.fotka.pl/140/932/140932490_300_s.1726826522.jpg + // https://c.fotka.com/a.fotka.pl/140/932/140932490_1350_s.1726826522.jpg + return src.replace(/(\/[0-9]+)_300_s(\.[0-9]+\.[a-z]+)(?:[?#].*)?$/, "$1_1350_s$2"); + } + diff --git a/userscript.user.js b/userscript.user.js index f34ceb8d..51d3115a 100644 --- a/userscript.user.js +++ b/userscript.user.js @@ -78742,7 +78742,19 @@ var $$IMU_EXPORT$$; // http://mottokorea.com/mottoKoreaW/Business_list.do?bbsBasketType=R&seq=86214 return src.replace(/(\/userfiles\/+[0-9]{4}\/+[0-9]{2}\/+[0-9]{10,})s([0-9]*\.[^/.]*)(?:[?#].*)?$/, "$1$2"); } - if (false && domain_nowww === "nikkansports.com") { + if (domain_nowww === "nikkansports.com" || + // https://cache4.nipc.jp/baseball/column/analyst/news/img/202409220001984-w200_0.jpg + // https://cache4.nipc.jp/baseball/column/analyst/news/img/202409220001984-w1300_0.jpg + (domain_nosub === "nipc.jp" && /^cache[0-9]*\./.test(domain))) { + // thanks to fireattack on discord for reporting: + // https://cache2.nipc.jp/mod2015/img/common/blank.gif + // https://cache4.nipc.jp/mod/img/blank.gif + if (/\/(?:img\/+common|mod\/+img)\/+blank\.gif(?:[?#].*)?$/.test(src)) { + return { + url: src, + bad: "mask" + }; + } // wip // https://www.nikkansports.com/entertainment/news/img/201801300000608-nsogp_0.jpg -- 800x1067 // https://www.nikkansports.com/entertainment/news/img/201903030000871-w1300_0.jpg -- 1300x1632 @@ -78770,6 +78782,12 @@ var $$IMU_EXPORT$$; // https://www.nikkansports.com/sports/athletics/seriku/2013/photo/article/img/seriku-hk130819-1-ns-big.jpg -- 245x500 // thanks to anonymous for reporting: // https://www.nikkansports.com/entertainment/akb48/news/img/202304220001315-w1300_2.jpg + // thanks to fireattack on discord: + // https://www.nikkansports.com/entertainment/news/img/202409220001870-w500_0.jpg + // https://www.nikkansports.com/entertainment/news/img/202409220001870-w1300_0.jpg + // https://www.nikkansports.com/entertainment/news/img/202409220001870-w200_4.jpg + // https://www.nikkansports.com/entertainment/news/img/202409220001870-w1300_4.jpg + return src.replace(/(\/news\/+img\/+[0-9]+)-w[1-5]00_/, "$1-w1300_"); } if (domain_nosub === "minkch.com" && /^imgs/.test(domain)) { // https://imgsb.minkch.com/imgs/minkch/i_20140121081405s.jpg @@ -104864,6 +104882,12 @@ var $$IMU_EXPORT$$; // https://irp.cdn-website.com/15061b4e/dms3rep/multi/57408_05.jpg return src.replace(/(:\/\/)l(.*)\/opt\/+([^/]+)-[0-9]+w\./, "$1$2/$3."); } + if (domain === "c.fotka.com") { + // thanks to anonymous for reporting: + // https://c.fotka.com/a.fotka.pl/140/932/140932490_300_s.1726826522.jpg + // https://c.fotka.com/a.fotka.pl/140/932/140932490_1350_s.1726826522.jpg + return src.replace(/(\/[0-9]+)_300_s(\.[0-9]+\.[a-z]+)(?:[?#].*)?$/, "$1_1350_s$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