messaging: don't use browserProxy on ext pages

This commit is contained in:
Colin Caine 2017-11-19 06:44:55 +00:00
parent 71484e9873
commit 692cdeb5d7
3 changed files with 5 additions and 5 deletions

View file

@ -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,
})

View file

@ -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()

View file

@ -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()) {