BlockingObserver: Remove platformMajorVersion check
This commit is contained in:
parent
5099da355c
commit
35f5b19ffd
1 changed files with 3 additions and 3 deletions
|
@ -51,7 +51,7 @@ class BlockingObserver {
|
||||||
}
|
}
|
||||||
|
|
||||||
register(browser) {
|
register(browser) {
|
||||||
let id = Zotero.platformMajorVersion > 102 ? browser.browserId : browser.browsingContext.top.id;
|
let id = browser.browserId;
|
||||||
if (id === 0) {
|
if (id === 0) {
|
||||||
throw new Error('BlockingObserver: Browser is not initialized');
|
throw new Error('BlockingObserver: Browser is not initialized');
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,7 @@ class BlockingObserver {
|
||||||
}
|
}
|
||||||
|
|
||||||
unregister(browser) {
|
unregister(browser) {
|
||||||
let id = Zotero.platformMajorVersion > 102 ? browser.browserId : browser.browsingContext.top.id;
|
let id = browser.browserId;
|
||||||
if (id === 0) {
|
if (id === 0) {
|
||||||
throw new Error('BlockingObserver: Browser is not initialized');
|
throw new Error('BlockingObserver: Browser is not initialized');
|
||||||
}
|
}
|
||||||
|
@ -87,7 +87,7 @@ class BlockingObserver {
|
||||||
|
|
||||||
observe(subject) {
|
observe(subject) {
|
||||||
let channel = subject.QueryInterface(Ci.nsIHttpChannel);
|
let channel = subject.QueryInterface(Ci.nsIHttpChannel);
|
||||||
let id = Zotero.platformMajorVersion > 102 ? channel.browserId : channel.topBrowsingContextId;
|
let id = channel.browserId;
|
||||||
if (id === 0) {
|
if (id === 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue