Use webextension-polyfill in popup
This commit is contained in:
parent
b69a03d42f
commit
9d2b480f3f
@ -222,6 +222,7 @@ import AboutPanel from './panels/AboutPanel';
|
||||
import ExtensionMode from '../common/enums/ExtensionMode.enum';
|
||||
import Logger from '../ext/lib/Logger';
|
||||
import {ChromeShittinessMitigations as CSM} from '../common/js/ChromeShittinessMitigations';
|
||||
import { browser } from 'webextension-polyfill-ts';
|
||||
|
||||
export default {
|
||||
data () {
|
||||
@ -260,7 +261,8 @@ export default {
|
||||
await this.settings.init();
|
||||
this.settingsInitialized = true;
|
||||
|
||||
const port = BrowserDetect.firefox ? browser.runtime.connect({name: 'popup-port'}) : chrome.runtime.connect({name: 'popup-port'});
|
||||
// const port = BrowserDetect.firefox ? browser.runtime.connect({name: 'popup-port'}) : chrome.runtime.connect({name: 'popup-port'});
|
||||
const port = browser.runtime.connect({name: 'popup-port'});
|
||||
port.onMessage.addListener( (m,p) => this.processReceivedMessage(m,p));
|
||||
CSM.setProperty('port', port);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user