mirror of
https://github.com/gorhill/uMatrix.git
synced 2024-06-01 18:10:17 +12:00
fix #706
This commit is contained in:
parent
a4fb878b08
commit
bf7acf678a
|
@ -73,8 +73,11 @@ var contentObserver = {
|
|||
contentBaseURI: 'chrome://' + hostName + '/content/js/',
|
||||
cpMessageName: hostName + ':shouldLoad',
|
||||
uniqueSandboxId: 1,
|
||||
modernFirefox: Services.appinfo.ID === '{ec8030f7-c20a-464f-9b0e-13a3a9e97384}' &&
|
||||
Services.vc.compare(Services.appinfo.platformVersion, '44') > 0,
|
||||
modernFirefox:
|
||||
Services.vc.compare(Services.appinfo.platformVersion, '44') > 0 && (
|
||||
Services.appinfo.ID === '{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}' ||
|
||||
Services.appinfo.ID === '{ec8030f7-c20a-464f-9b0e-13a3a9e97384}'
|
||||
),
|
||||
|
||||
get componentRegistrar() {
|
||||
return Components.manager.QueryInterface(Ci.nsIComponentRegistrar);
|
||||
|
@ -156,6 +159,11 @@ var contentObserver = {
|
|||
contextWindow = (context.ownerDocument || context).defaultView;
|
||||
}
|
||||
|
||||
// https://github.com/gorhill/uMatrix/issues/706
|
||||
if ( !contextWindow ) {
|
||||
return this.ACCEPT;
|
||||
}
|
||||
|
||||
// The context for the toolbar popup is an iframe element here,
|
||||
// so check context.top instead of context
|
||||
if ( !contextWindow.top || !contextWindow.location ) {
|
||||
|
|
Loading…
Reference in a new issue