Skip to content

Commit

Permalink
Merge branch 'master' of qsniyg.github.com:qsniyg/maxurl
Browse files Browse the repository at this point in the history
  • Loading branch information
qsniyg committed Apr 3, 2024
2 parents 085b4f8 + b593ed5 commit ff2ca7d
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
11 changes: 11 additions & 0 deletions src/userscript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}




Expand Down
8 changes: 8 additions & 0 deletions userscript.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ff2ca7d

Please sign in to comment.