aboutsummaryrefslogtreecommitdiffstats
path: root/js/vapi-tabs.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/vapi-tabs.js')
-rw-r--r--js/vapi-tabs.js26
1 files changed, 13 insertions, 13 deletions
diff --git a/js/vapi-tabs.js b/js/vapi-tabs.js
index 4c9caf5..97d0f69 100644
--- a/js/vapi-tabs.js
+++ b/js/vapi-tabs.js
@@ -99,7 +99,7 @@
callback({
id: tabId,
- windowId: winWatcher.idFromWindow(win),
+ windowId: vAPI.window.idFromWindow(win),
active: tabBrowser !== null
&& browser === tabBrowser.selectedBrowser,
url: browser.currentURI.asciiSpec,
@@ -111,7 +111,7 @@
let win;
let tabs = [];
- for (let win of winWatcher.getWindows()) {
+ for (let win of vAPI.window.getWindows()) {
if (window && window !== win) {
continue;
}
@@ -229,7 +229,7 @@
return;
}
- let win = winWatcher.getCurrentWindow();
+ let win = vAPI.window.getCurrentWindow();
let tabBrowser = getTabBrowser(win);
if (tabBrowser === null) {
@@ -440,7 +440,7 @@
};
let currentBrowser = function () {
- let win = winWatcher.getCurrentWindow();
+ let win = vAPI.window.getCurrentWindow();
// https://github.com/gorhill/uBlock/issues/399
// getTabBrowser() can return null at browser launch time.
@@ -614,12 +614,12 @@
return false;
}
- return winWatcher.toBrowserWindow(window) !== null;
+ return vAPI.window.toBrowserWindow(window) !== null;
};
let onWindowLoad = function (win) {
- deferUntil(canAttachToTabBrowser.bind(null, win),
- attachToTabBrowser.bind(null, win));
+ vAPI.deferUntil(canAttachToTabBrowser.bind(null, win),
+ attachToTabBrowser.bind(null, win));
};
let onWindowUnload = function (win) {
@@ -679,7 +679,7 @@
let tabBrowser;
let tabs;
- for (let win of winWatcher.getWindows()) {
+ for (let win of vAPI.window.getWindows()) {
onWindowLoad(win);
tabBrowser = getTabBrowser(win);
@@ -694,8 +694,8 @@
}
}
- winWatcher.onOpenWindow = onWindowLoad;
- winWatcher.onCloseWindow = onWindowUnload;
+ vAPI.window.onOpenWindow = onWindowLoad;
+ vAPI.window.onCloseWindow = onWindowUnload;
vAPI.messaging.globalMessageManager
.addMessageListener(locationChangedMessageName,
@@ -703,14 +703,14 @@
};
let stop = function () {
- winWatcher.onOpenWindow = null;
- winWatcher.onCloseWindow = null;
+ vAPI.window.onOpenWindow = null;
+ vAPI.window.onCloseWindow = null;
vAPI.messaging.globalMessageManager
.removeMessageListener(locationChangedMessageName,
onLocationChanged);
- for (let win of winWatcher.getWindows()) {
+ for (let win of vAPI.window.getWindows()) {
onWindowUnload(win);
}