Merge pull request #719 from GlenLowland/fix_search_from_context_menu_chrome

Fix "Search LibRedirect" from context menu on Chrome
This commit is contained in:
ManeraKai 2023-05-25 20:40:23 +03:00 committed by GitHub
commit b26f510616
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@ browser.webRequest.onBeforeRequest.addListener(
let initiator let initiator
try { try {
if (details.originUrl) initiator = new URL(details.originUrl) if (details.originUrl) initiator = new URL(details.originUrl)
else if (details.initiator) initiator = new URL(details.initiator) else if (details.initiator && details.initiator !== "null") initiator = new URL(details.initiator)
} catch { } catch {
return null return null
} }