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:
commit
b26f510616
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue