mirror of
https://github.com/imputnet/cobalt.git
synced 2025-07-14 01:08:27 +00:00
allow url loading via query param without u=
for example https://co.wukko.me/?u=https://www.reddit.com/r/196/comments/12yeg91/rule/ worked before, but https://co.wukko.me/?https://www.reddit.com/r/196/comments/12yeg91/rule/ didnt load the url. this checks the search string without query params if the query param u isn't found, allowing the 2nd url to work
This commit is contained in:
parent
2120cf1101
commit
e3c6035624
@ -432,7 +432,7 @@ window.onload = () => {
|
||||
eid("url-input-area").value = "";
|
||||
notificationCheck();
|
||||
if (isIOS) sSet("downloadPopup", "true");
|
||||
let urlQuery = new URLSearchParams(window.location.search).get("u");
|
||||
let urlQuery = new URLSearchParams(window.location.search).get("u") || window.location.search.substring(1);
|
||||
if (urlQuery !== null && regex.test(urlQuery)) {
|
||||
eid("url-input-area").value = urlQuery;
|
||||
button();
|
||||
|
Loading…
Reference in New Issue
Block a user