mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-10 09:07:54 +01:00
Merge branch 'temp'
This commit is contained in:
commit
5a63dc3184
1 changed files with 13 additions and 1 deletions
|
@ -3278,7 +3278,19 @@ var optionsObserver = {
|
||||||
cleanupTasks.push(this.unregister.bind(this));
|
cleanupTasks.push(this.unregister.bind(this));
|
||||||
|
|
||||||
var browser = tabWatcher.currentBrowser();
|
var browser = tabWatcher.currentBrowser();
|
||||||
if ( browser && browser.currentURI && browser.currentURI.spec === 'about:addons' ) {
|
if ( !browser ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// https://github.com/gorhill/uBlock/issues/948
|
||||||
|
// Older versions of Firefox can throw here when looking up `currentURI`.
|
||||||
|
var currentURI;
|
||||||
|
try {
|
||||||
|
currentURI = browser.currentURI;
|
||||||
|
} catch (ex) {
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( currentURI && currentURI.spec === 'about:addons' ) {
|
||||||
this.observe(browser.contentDocument, 'addon-enabled', this.addonId);
|
this.observe(browser.contentDocument, 'addon-enabled', this.addonId);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue