mirror of
https://github.com/vale981/tridactyl
synced 2025-03-06 01:51:40 -05:00
Catch CSP exception when hijacking
This commit is contained in:
parent
786261d019
commit
04ae5b58a8
1 changed files with 8 additions and 3 deletions
|
@ -47,12 +47,17 @@ import * as keyseq from "./keyseq"
|
|||
l: prom => prom.then(console.log).catch(console.error),
|
||||
})
|
||||
|
||||
|
||||
// Don't hijack on the newtab page.
|
||||
if (webext.inContentScript()) {
|
||||
dom.setupFocusHandler()
|
||||
dom.hijackPageListenerFunctions()
|
||||
try {
|
||||
dom.setupFocusHandler()
|
||||
dom.hijackPageListenerFunctions()
|
||||
} catch (e) {
|
||||
console.log("Could not hijack due to CSP:", e)
|
||||
}
|
||||
} else {
|
||||
console.error("No export func")
|
||||
console.log("No export func")
|
||||
}
|
||||
|
||||
if (
|
||||
|
|
Loading…
Add table
Reference in a new issue