Fall back to link if openOptions fails in popup.

This commit is contained in:
FelisCatus 2017-07-26 12:45:46 -04:00 committed by Felis Catus
parent db2d2e4d00
commit e23db1771d
2 changed files with 9 additions and 5 deletions

View File

@ -44,7 +44,7 @@
</li>
<li class="om-divider"></li>
<li class="om-nav-item">
<a href="#" id="js-option" role="button">
<a href="../options.html" target="_blank" id="js-option" role="button">
<span class="glyphicon glyphicon-wrench"></span>
<span id="js-option-label"></span>
</a>

View File

@ -16,10 +16,14 @@
window.close();
}
function showOptions() {
$script.ready('om-target', function() {
function showOptions(e) {
if (typeof OmegaTargetPopup !== 'undefined') {
try {
OmegaTargetPopup.openOptions(null, closePopup);
});
e.preventDefault();
} catch (_) {
}
}
}
function applyProfile(profileName) {