diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b43e0e7d..3ba96a68 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -60,11 +60,11 @@ perfect though, I often get it wrong myself :) I can fix it up if you make a mis - `get_queries("https://example.com/?a=5&b=10")` -> `{a: 5, b: 10}` - `remove_queries`: Removes the specified queries: - - `remove_queries("https://example.com/?a=5&b=10&c=20", ["b, c"])` -> `"https://example.com/?a=5"` + - `remove_queries("https://example.com/?a=5&b=10&c=20", ["b", "c"])` -> `"https://example.com/?a=5"` - `remove_queries("https://example.com/?a=5&b=10&c=20", "b")` -> `"https://example.com/?a=5&c=20"` - `keep_queries`: Removes every query except for the specified queries: - - `keep_queries("https://example.com/?a=5&b=10&c=20", ["b", c"])` -> `"https://example.com/?b=10&c=20"` + - `keep_queries("https://example.com/?a=5&b=10&c=20", ["b", "c"])` -> `"https://example.com/?b=10&c=20"` - `keep_queries("https://example.com/?a=5&b=10&c=20", "b")` -> `"https://example.com/?b=10"` - `keep_queries("https://example.com/?a=5&b=10&c=20", ["b", "c"], {overwrite: {"c": 1, "d": 2}})` -> `"https://example.com/?b=10&c=1&d=2"` - `keep_queries("https://example.com/?a=5&b=10", ["b", "c"], {required: ["c"]})` -> `"https://example.com/?a=5&b=10"` diff --git a/src/userscript.ts b/src/userscript.ts index ddbab751..0ac0c8ed 100644 --- a/src/userscript.ts +++ b/src/userscript.ts @@ -113504,6 +113504,17 @@ var $$IMU_EXPORT$$; }; } + if (domain === "imageflow.rausgegangen.de") { + // https://imageflow.rausgegangen.de/url/https%3A//s3.eu-central-1.amazonaws.com/rausgegangen/KBEXIUNKRoqU9HgdGk5z_marz-11png?width=1200&height=900&mode=crop + // https://s3.eu-central-1.amazonaws.com/rausgegangen/KBEXIUNKRoqU9HgdGk5z_marz-11png + + newsrc = src.replace(/^.*?\/url\//, ""); + newsrc = decodeuri_ifneeded(newsrc); + newsrc = remove_queries(newsrc, ["width", "height", "mode"]); + + return newsrc; + } + diff --git a/userscript.user.js b/userscript.user.js index 5f1761be..492d7d9c 100644 --- a/userscript.user.js +++ b/userscript.user.js @@ -101898,6 +101898,14 @@ var $$IMU_EXPORT$$; can_head: false }; } + if (domain === "imageflow.rausgegangen.de") { + // https://imageflow.rausgegangen.de/url/https%3A//s3.eu-central-1.amazonaws.com/rausgegangen/KBEXIUNKRoqU9HgdGk5z_marz-11png?width=1200&height=900&mode=crop + // https://s3.eu-central-1.amazonaws.com/rausgegangen/KBEXIUNKRoqU9HgdGk5z_marz-11png + newsrc = src.replace(/^.*?\/url\//, ""); + newsrc = decodeuri_ifneeded(newsrc); + newsrc = remove_queries(newsrc, ["width", "height", "mode"]); + return newsrc; + } // -- 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