Verified Commit 51183abe authored by Thomas Rientjes's avatar Thomas Rientjes
Browse files

Fix #214 by revising popup panel logic

parent 4e9dcea6
...@@ -27,7 +27,7 @@ document.addEventListener('DOMContentLoaded', function () { ...@@ -27,7 +27,7 @@ document.addEventListener('DOMContentLoaded', function () {
let version, optionsButtonElement, scriptDirection; let version, optionsButtonElement, scriptDirection;
version = helpers.formatVersion(browser.runtime.getManifest().version); version = helpers.formatVersion(chrome.runtime.getManifest().version);
document.getElementById('version-label').innerText = version; document.getElementById('version-label').innerText = version;
scriptDirection = helpers.determineScriptDirection(navigator.language); scriptDirection = helpers.determineScriptDirection(navigator.language);
...@@ -223,9 +223,11 @@ document.addEventListener('DOMContentLoaded', function () { ...@@ -223,9 +223,11 @@ document.addEventListener('DOMContentLoaded', function () {
}); });
}); });
chrome.runtime.getPlatformInfo(function (information) {
optionsButtonElement.addEventListener('mouseup', function () { optionsButtonElement.addEventListener('mouseup', function () {
if (popup.backgroundPage.main.operatingSystem === chrome.runtime.PlatformOs.ANDROID) { if (information.os === chrome.runtime.PlatformOs.ANDROID) {
return chrome.tabs.create({ return chrome.tabs.create({
'url': chrome.extension.getURL('pages/options/options.html') 'url': chrome.extension.getURL('pages/options/options.html')
...@@ -235,6 +237,7 @@ document.addEventListener('DOMContentLoaded', function () { ...@@ -235,6 +237,7 @@ document.addEventListener('DOMContentLoaded', function () {
chrome.runtime.openOptionsPage(); chrome.runtime.openOptionsPage();
return window.close(); return window.close();
}); });
});
document.getElementById('testing-utility-link').addEventListener('mouseup', function (event) { document.getElementById('testing-utility-link').addEventListener('mouseup', function (event) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment