From dac87c2a7654a54f36df4df9fe320d2fb5f24ab2 Mon Sep 17 00:00:00 2001 From: qsniyg Date: Fri, 16 Aug 2024 17:41:00 +0000 Subject: [PATCH] Support zvuk (fixes #1348) --- src/userscript.ts | 9 +++++++++ userscript.user.js | 8 ++++++++ 2 files changed, 17 insertions(+) diff --git a/src/userscript.ts b/src/userscript.ts index 52766587..10e80581 100644 --- a/src/userscript.ts +++ b/src/userscript.ts @@ -115458,6 +115458,15 @@ var $$IMU_EXPORT$$; return src.replace(/(\/content\/+[0-9A-Z]+\/+)[0-9]+x[0-9]+\./, "$1original."); } + if (domain === "cdn-image.zvuk.com") { + // thanks to karpuzikov on github: https://github.com/qsniyg/maxurl/issues/1348 + // https://cdn-image.zvuk.com/pic?type=release&id=2040642&size=1920x1920&hash=... + // https://cdn-image.zvuk.com/pic?type=release&id=2040642 + if (/:\/\/[^/]+\/+pic\?/.test(src)) { + return keep_queries(src, ["type", "id"]); + } + } + diff --git a/userscript.user.js b/userscript.user.js index 1f021a0e..e4d4810f 100644 --- a/userscript.user.js +++ b/userscript.user.js @@ -103668,6 +103668,14 @@ var $$IMU_EXPORT$$; // https://blockdaemon-audius-content-07.bdnodes.net/content/01J4WQW2KK0DSVWJG461AVD7ZH/original.jpg return src.replace(/(\/content\/+[0-9A-Z]+\/+)[0-9]+x[0-9]+\./, "$1original."); } + if (domain === "cdn-image.zvuk.com") { + // thanks to karpuzikov on github: https://github.com/qsniyg/maxurl/issues/1348 + // https://cdn-image.zvuk.com/pic?type=release&id=2040642&size=1920x1920&hash=... + // https://cdn-image.zvuk.com/pic?type=release&id=2040642 + if (/:\/\/[^/]+\/+pic\?/.test(src)) { + return keep_queries(src, ["type", "id"]); + } + } // -- 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