From a4febd500f88ac6dea9908b5f95872f489a84dc4 Mon Sep 17 00:00:00 2001 From: qsniyg Date: Tue, 30 Apr 2024 19:57:39 +0000 Subject: [PATCH] More websites/rules --- src/userscript.ts | 26 ++++++++++++++++++++++++++ userscript.user.js | 23 +++++++++++++++++++++++ 2 files changed, 49 insertions(+) diff --git a/src/userscript.ts b/src/userscript.ts index 75ae123e..05e9482c 100644 --- a/src/userscript.ts +++ b/src/userscript.ts @@ -113682,6 +113682,32 @@ var $$IMU_EXPORT$$; } } + if (domain === "images.mnstatic.com") { + // thanks to anonymous for reporting: + // https://images.mnstatic.com/3e/f2/3ef2707ef405e4f31f95453f4217c23c.jpg?quality=86&format=pjpg&fit=crop&width=236&height=190&aspect_ratio=236%3A190 + // https://images.mnstatic.com/3e/f2/3ef2707ef405e4f31f95453f4217c23c.jpg?quality=100&format=png + return src.replace(/(?:\?.*)?$/, "?quality=100&format=png"); + } + + if (domain_nosub === "mnstatic.com" && /^photo[0-9]+x[0-9]+\./.test(domain)) { + // thanks to anonymous for reporting: + // https://photo620x400.mnstatic.com/3ef2707ef405e4f31f95453f4217c23c/abbaye-du-mont_saint_michel.jpg?quality=70&format=pjpg + // https://images.mnstatic.com/3e/f2/3ef2707ef405e4f31f95453f4217c23c.jpg?quality=100&format=png + match = src.match(/:\/\/[^/]+\/+([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{10,})\/+/); + if (match) { + return "https://images.mnstatic.com/" + match[1] + "/" + match[2] + "/" + match[1] + match[2] + match[3] + ".jpg?quality=100"; + } + } + + if (domain_nowww === "esprit-photo.com") { + // thanks to anonymous for reporting: + // https://esprit-photo.com/render/w640/02.celebrations/03.paques/081.chemin-de-croix-virtuel/EX15-0001_Expo-Chemin-de-Croix-G-SCHILLING-WEB_03_Copyright_N.JUNG_Photographie.Pro.jpg + // https://esprit-photo.com/content/02.celebrations/03.paques/081.chemin-de-croix-virtuel/EX15-0001_Expo-Chemin-de-Croix-G-SCHILLING-WEB_03_Copyright_N.JUNG_Photographie.Pro.jpg + // other: + // https://www.esprit-photo.com/content/09.vie_paroisses/11.paroisse-saint-jean-baptiste-libourne-bordeaux/06.veillees/01.Veillee-Sainte-Marie-Madeleine-a-St-Jean-Baptiste-de-Libourne/__Veillee-Sainte-Marie-Madeleine-a-St-Jean-Baptiste-de-Libourne.jpg -- 2114x3038 + return src.replace(/\/render\/+w[0-9]+\/+/, "/content/"); + } + diff --git a/userscript.user.js b/userscript.user.js index f75610c1..ea949298 100644 --- a/userscript.user.js +++ b/userscript.user.js @@ -102063,6 +102063,29 @@ var $$IMU_EXPORT$$; problems: { possibly_upscaled: true } }; } + if (domain === "images.mnstatic.com") { + // thanks to anonymous for reporting: + // https://images.mnstatic.com/3e/f2/3ef2707ef405e4f31f95453f4217c23c.jpg?quality=86&format=pjpg&fit=crop&width=236&height=190&aspect_ratio=236%3A190 + // https://images.mnstatic.com/3e/f2/3ef2707ef405e4f31f95453f4217c23c.jpg?quality=100&format=png + return src.replace(/(?:\?.*)?$/, "?quality=100&format=png"); + } + if (domain_nosub === "mnstatic.com" && /^photo[0-9]+x[0-9]+\./.test(domain)) { + // thanks to anonymous for reporting: + // https://photo620x400.mnstatic.com/3ef2707ef405e4f31f95453f4217c23c/abbaye-du-mont_saint_michel.jpg?quality=70&format=pjpg + // https://images.mnstatic.com/3e/f2/3ef2707ef405e4f31f95453f4217c23c.jpg?quality=100&format=png + match = src.match(/:\/\/[^/]+\/+([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{10,})\/+/); + if (match) { + return "https://images.mnstatic.com/" + match[1] + "/" + match[2] + "/" + match[1] + match[2] + match[3] + ".jpg?quality=100"; + } + } + if (domain_nowww === "esprit-photo.com") { + // thanks to anonymous for reporting: + // https://esprit-photo.com/render/w640/02.celebrations/03.paques/081.chemin-de-croix-virtuel/EX15-0001_Expo-Chemin-de-Croix-G-SCHILLING-WEB_03_Copyright_N.JUNG_Photographie.Pro.jpg + // https://esprit-photo.com/content/02.celebrations/03.paques/081.chemin-de-croix-virtuel/EX15-0001_Expo-Chemin-de-Croix-G-SCHILLING-WEB_03_Copyright_N.JUNG_Photographie.Pro.jpg + // other: + // https://www.esprit-photo.com/content/09.vie_paroisses/11.paroisse-saint-jean-baptiste-libourne-bordeaux/06.veillees/01.Veillee-Sainte-Marie-Madeleine-a-St-Jean-Baptiste-de-Libourne/__Veillee-Sainte-Marie-Madeleine-a-St-Jean-Baptiste-de-Libourne.jpg -- 2114x3038 + return src.replace(/\/render\/+w[0-9]+\/+/, "/content/"); + } // -- 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