1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-06-11 04:00:54 +02:00

fallback to old method of options page bcoz of bug.

This commit is contained in:
Kushagra Gour
2016-05-17 01:29:25 +05:30
parent c2be7637ba
commit 01b3ad0c4f

View File

@ -211,12 +211,17 @@
});
settingsBtn.addEventListener('click', function(e) {
if (chrome.runtime.openOptionsPage) {
if (!chrome.runtime.openOptionsPage) {
// New way to open options pages, if supported (Chrome 42+).
// Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=601997
// Until this bug fixes, use the
// fallback.
chrome.runtime.openOptionsPage();
} else {
// Fallback.
window.open(chrome.runtime.getURL('options.html'));
chrome.tabs.create({
url: 'chrome://extensions?options=' + chrome.i18n.getMessage('@@extension_id')
});
}
return false;
});