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:
@ -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;
|
||||
});
|
||||
|
Reference in New Issue
Block a user