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>
<li class="om-divider"></li> <li class="om-divider"></li>
<li class="om-nav-item"> <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 class="glyphicon glyphicon-wrench"></span>
<span id="js-option-label"></span> <span id="js-option-label"></span>
</a> </a>

View File

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