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:
lxhom 2023-04-25 18:22:37 +02:00 committed by GitHub
parent 2120cf1101
commit e3c6035624
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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();