Skip to content
Snippets Groups Projects
Verified Commit 51183abe authored by Thomas Rientjes's avatar Thomas Rientjes
Browse files

Fix #214 by revising popup panel logic

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