Microsoft has acquired GitHub. Decentraleyes has left GitHub. Welcome to its new home!

To participate, please register, or sign in with an existing GitLab.com, Bitbucket, or GitHub account.

Past contributions on GitHub? Be sure to reclaim your Comments, Issues, and Pull Requests.

Fix #214 by revising popup panel logic

parent 4e9dcea6
......@@ -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) {
......
Markdown is supported
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