Since webExt polyfill ensures 'browser' is also present in Chrome, code for opening settings page from popup stopped working in Chrome

This commit is contained in:
Tamius Han 2021-04-12 20:36:42 +02:00
parent c504d5594c
commit 338b219142

View File

@ -126,6 +126,7 @@ import KeyboardShortcutParser from '../../common/js/KeyboardShortcutParser';
import ShortcutButton from '../../common/components/ShortcutButton';
import ComputeActionsMixin from '../../common/mixins/ComputeActionsMixin';
import CropModePersistence from '../../common/enums/CropModePersistence.enum';
import BrowserDetect from '../../ext/conf/BrowserDetect';
export default {
data() {
@ -157,7 +158,11 @@ export default {
},
methods: {
async openOptionsPage() {
(browser ?? chrome).runtime.openOptionsPage();
if (BrowserDetect.firefox) {
browser.runtime.openOptionsPage();
} else {
chrome.runtime.openOptionsPage();
}
},
execAction(action) {
this.exec.exec(action, 'page', this.frame);