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:
parent
c504d5594c
commit
338b219142
@ -126,6 +126,7 @@ import KeyboardShortcutParser from '../../common/js/KeyboardShortcutParser';
|
|||||||
import ShortcutButton from '../../common/components/ShortcutButton';
|
import ShortcutButton from '../../common/components/ShortcutButton';
|
||||||
import ComputeActionsMixin from '../../common/mixins/ComputeActionsMixin';
|
import ComputeActionsMixin from '../../common/mixins/ComputeActionsMixin';
|
||||||
import CropModePersistence from '../../common/enums/CropModePersistence.enum';
|
import CropModePersistence from '../../common/enums/CropModePersistence.enum';
|
||||||
|
import BrowserDetect from '../../ext/conf/BrowserDetect';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
@ -157,7 +158,11 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async openOptionsPage() {
|
async openOptionsPage() {
|
||||||
(browser ?? chrome).runtime.openOptionsPage();
|
if (BrowserDetect.firefox) {
|
||||||
|
browser.runtime.openOptionsPage();
|
||||||
|
} else {
|
||||||
|
chrome.runtime.openOptionsPage();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
execAction(action) {
|
execAction(action) {
|
||||||
this.exec.exec(action, 'page', this.frame);
|
this.exec.exec(action, 'page', this.frame);
|
||||||
|
Loading…
Reference in New Issue
Block a user