diff --git a/omega-target-chromium-extension/src/module/options.coffee b/omega-target-chromium-extension/src/module/options.coffee index a3d0228..d08cd71 100644 --- a/omega-target-chromium-extension/src/module/options.coffee +++ b/omega-target-chromium-extension/src/module/options.coffee @@ -272,12 +272,17 @@ class ChromeOptions extends OmegaTarget.Options url: chrome.extension.getURL('options.html#/ui') ) - if quickSwitch + if quickSwitch or not chrome.browserAction.setPopup? chrome.browserAction.setPopup?({popup: ''}) if not @_quickSwitchInit @_quickSwitchInit = true chrome.browserAction.onClicked.addListener (tab) => @clearBadge() + if not @_options['-enableQuickSwitch'] + # If we reach here, then the browser does not support popup. + # Let's open the popup page in a tab. + chrome.tabs.create(url: 'popup/index.html') + return profiles = @_options['-quickSwitchProfiles'] index = profiles.indexOf(@_currentProfileName) index = (index + 1) % profiles.length @@ -290,7 +295,7 @@ class ChromeOptions extends OmegaTarget.Options return if url.substr(0, 4) == 'moz-' chrome.tabs.reload(tab.id) else - chrome.browserAction.setPopup?({popup: 'popup/index.html'}) + chrome.browserAction.setPopup({popup: 'popup/index.html'}) Promise.resolve() setInspect: (settings) -> diff --git a/omega-web/src/popup.jade b/omega-web/src/popup.jade index 5d9807f..aab0aff 100644 --- a/omega-web/src/popup.jade +++ b/omega-web/src/popup.jade @@ -21,6 +21,7 @@ html(lang='en' ng-app='omegaPopup' ng-controller='PopupCtrl' ng-csp) head meta(charset='utf-8') title {{'popup_title' | tr}} + meta(name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no') link(rel='stylesheet' href='lib/bootstrap/css/bootstrap.min.css') link(rel='stylesheet' href='css/popup.css') body(ng-class='{"with-condition-form": showConditionForm}') diff --git a/omega-web/src/popup/index.html b/omega-web/src/popup/index.html index b0826d3..dd194a0 100644 --- a/omega-web/src/popup/index.html +++ b/omega-web/src/popup/index.html @@ -3,6 +3,7 @@