Skip to content
This repository has been archived by the owner on Jun 8, 2018. It is now read-only.

Commit

Permalink
Fix #214 by revising popup panel logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Synzvato committed Nov 7, 2017
1 parent 4e9dcea commit 51183ab
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions pages/popup/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 51183ab

Please sign in to comment.