Fix opening NookLink deep links

This commit is contained in:
Samuel Elliott
2022-09-19 19:12:44 +01:00
parent 8012dba821
commit 99423f263b

View File

@@ -14,6 +14,13 @@ if (webservice.id === NOOKLINK_WEBSERVICE_ID) {
const url = new URL(location.href);
const initurl = new URL(webserviceurl);
for (const key of [...url.searchParams.keys()]) {
if (!initurl.searchParams.has(key)) {
// Allow any extra query string parameters for deep links
url.searchParams.delete(key);
}
}
debug('URL', url, initurl);
if (url.origin === initurl.origin && url.href !== initurl.href) {