diff options
Diffstat (limited to 'ext/bg/js/context-main.js')
| -rw-r--r-- | ext/bg/js/context-main.js | 4 | 
1 files changed, 3 insertions, 1 deletions
| diff --git a/ext/bg/js/context-main.js b/ext/bg/js/context-main.js index 93eebe72..b6736fd8 100644 --- a/ext/bg/js/context-main.js +++ b/ext/bg/js/context-main.js @@ -30,12 +30,14 @@ class DisplayController {          this._showExtensionInfo(manifest);          this._setupEnvironment();          this._setupButtonEvents('.action-open-search', 'search', chrome.runtime.getURL('/bg/search.html')); -        this._setupButtonEvents('.action-open-options', 'options', chrome.runtime.getURL(manifest.options_ui.page));          this._setupButtonEvents('.action-open-help', 'help', 'https://foosoft.net/projects/yomichan/');          const optionsFull = await api.optionsGetFull();          this._optionsFull = optionsFull; +        const optionsPageUrl = optionsFull.global.useSettingsV2 ? '/bg/settings2.html' : manifest.options_ui.page; +        this._setupButtonEvents('.action-open-options', 'options', chrome.runtime.getURL(optionsPageUrl)); +          const {profiles, profileCurrent} = optionsFull;          const primaryProfile = (profileCurrent >= 0 && profileCurrent < profiles.length) ? profiles[profileCurrent] : null;          if (primaryProfile !== null) { |