1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-10-04 16:47:15 +02:00

better fix #3057, as suggested

This commit is contained in:
gorhill 2017-09-26 16:35:06 -04:00
parent 65f1d152f7
commit d6173b5d93
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
2 changed files with 9 additions and 9 deletions

View File

@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "uBlock Origin",
"version": "1.14.11.102",
"version": "1.14.11.103",
"commands": {
"launch-element-zapper": {

View File

@ -79,21 +79,21 @@ setScriptDirection(vAPI.i18n('@@ui_locale'));
// https://github.com/gorhill/uBlock/issues/3057
// - webNavigation.onCreatedNavigationTarget become broken on Firefox when we
// try to make the popup panel close itself.
// try to make the popup panel close itself using the original
// `window.open('', '_self').close()`.
vAPI.closePopup = function() {
if (
self.browser instanceof Object &&
typeof self.browser.runtime.getBrowserInfo === 'function'
) {
self.browser.runtime.getBrowserInfo().then(function(info) {
if ( info.name !== 'Firefox' ) {
window.open('', '_self').close();
window.close();
return;
}
});
} else {
// TODO: try to figure why this was used instead of a plain window.close().
// https://github.com/gorhill/uBlock/commit/b301ac031e0c2e9a99cb6f8953319d44e22f33d2#diff-bc664f26b9c453e0d43a9379e8135c6a
window.open('', '_self').close();
}
};
/******************************************************************************/