mirror of
https://github.com/vale981/tridactyl
synced 2025-03-06 10:01:39 -05:00
messaging: don't use browserProxy on ext pages
This commit is contained in:
parent
71484e9873
commit
692cdeb5d7
3 changed files with 5 additions and 5 deletions
|
@ -11,10 +11,11 @@ import "./hinting"
|
|||
console.log("Tridactyl content script loaded, boss!")
|
||||
|
||||
// Add various useful modules to the window for debugging
|
||||
import browserBg from './lib/browser_proxy'
|
||||
import * as webext from './lib/webext'
|
||||
import * as messaging from './messaging'
|
||||
|
||||
(window as any).tri = Object.assign(Object.create(null), {
|
||||
browserBg,
|
||||
browserBg: webext.browserBg,
|
||||
webext,
|
||||
messaging,
|
||||
})
|
||||
|
|
|
@ -251,8 +251,7 @@ select,
|
|||
[tabindex]
|
||||
`
|
||||
|
||||
import browserBg from './lib/browser_proxy'
|
||||
import {activeTab, l, firefoxVersionAtLeast} from './lib/webext'
|
||||
import {activeTab, browserBg, l, firefoxVersionAtLeast} from './lib/webext'
|
||||
|
||||
async function openInBackground(url: string) {
|
||||
const thisTab = await activeTab()
|
||||
|
|
|
@ -5,7 +5,7 @@ export function inContentScript() {
|
|||
return ! ('tabs' in browser)
|
||||
}
|
||||
|
||||
let browserBg
|
||||
export let browserBg
|
||||
|
||||
// Make this library work for both content and background.
|
||||
if (inContentScript()) {
|
||||
|
|
Loading…
Add table
Reference in a new issue