aboutsummaryrefslogtreecommitdiffstats
path: root/js/vapi-background.js
diff options
context:
space:
mode:
authorAlessio Vanni <vannilla@firemail.cc>2019-06-19 18:59:25 +0200
committerAlessio Vanni <vannilla@firemail.cc>2019-06-19 18:59:25 +0200
commit52603bc5bc8831d0ec0f901f1279871599f877d9 (patch)
treef1740c6213ad120e242dd79069b1395c45cb21b9 /js/vapi-background.js
parent8c0a0024ebe2a355aa411ab557663f5c0031dcf6 (diff)
downloadematrix-52603bc5bc8831d0ec0f901f1279871599f877d9.tar.lz
ematrix-52603bc5bc8831d0ec0f901f1279871599f877d9.tar.xz
ematrix-52603bc5bc8831d0ec0f901f1279871599f877d9.zip
Fix typos and reinstate some old declarations
Diffstat (limited to 'js/vapi-background.js')
-rw-r--r--js/vapi-background.js22
1 files changed, 11 insertions, 11 deletions
diff --git a/js/vapi-background.js b/js/vapi-background.js
index 6888317..3753b0b 100644
--- a/js/vapi-background.js
+++ b/js/vapi-background.js
@@ -45,7 +45,7 @@
let dtls = (typeof details !== 'object') ? {} : details;
let now = 0;
let next = dtls.next || 200;
- let until = dtsl.until || 2000;
+ let until = dtls.until || 2000;
let check = function () {
if (testFn() === true || now >= until) {
@@ -1237,18 +1237,18 @@
// });
// };
- var onShow = function (target) {
+ var onShow = function ({target}) {
tabIdFromTarget(target);
};
- var onClose = function (target) {
+ var onClose = function ({target}) {
// target is tab in Firefox, browser in Fennec
let browser = browserFromTarget(target);
let tabId = browserToTabIdMap.get(browser);
removeBrowserEntry(tabId, browser);
};
- var onSelect = function (target) {
+ var onSelect = function ({target}) {
// This is an entry point: when creating a new tab, it is
// not always reported through onLocationChanged...
// Sigh. It is "reported" here however.
@@ -1524,7 +1524,7 @@
this.listeners[listenerName] = callback;
};
- vAPI.messaging.onMessage = function (target, data) {
+ vAPI.messaging.onMessage = function ({target, data}) {
let messageManager = target.messageManager;
if (!messageManager) {
@@ -1946,7 +1946,7 @@
let onBeforeRequest = vAPI.net.onBeforeRequest;
if (onBeforeRequest.types === null
|| onBeforeRequest.types.has(type)) {
- letresult = onBeforeRequest.callback({
+ let result = onBeforeRequest.callback({
parentFrameId: type === 'main_frame' ? -1 : 0,
tabId: tabId,
type: type,
@@ -2276,12 +2276,12 @@
let popupCommittedWidth = 0;
let popupCommittedHeight = 0;
- tbb.onViewShowing = function (target) {
+ tbb.onViewShowing = function ({target}) {
popupCommittedWidth = popupCommittedHeight = 0;
target.firstChild.setAttribute('src', vAPI.getURL('popup.html'));
};
- tbb.onViewHiding = function (target) {
+ tbb.onViewHiding = function ({target}) {
target.parentNode.style.maxWidth = '';
target.firstChild.setAttribute('src', 'about:blank');
};
@@ -2612,7 +2612,7 @@
return toolbox !== null && !!toolbox.palette;
};
- let onPopupCloseRequested = function (target) {
+ let onPopupCloseRequested = function ({target}) {
let document = target.ownerDocument;
if (!document) {
return;
@@ -2888,7 +2888,7 @@
CUIEvents.onWidgetAdded = updateBadge;
CUIEvents.onWidgetUnderflow = updateBadge;
- let onPopupCloseRequested = function (target) {
+ let onPopupCloseRequested = function ({target}) {
if (typeof tbb.closePopup === 'function') {
tbb.closePopup(target);
}
@@ -3018,7 +3018,7 @@
}
};
- vAPI.contextMenu.displayMenuItem = function (target) {
+ vAPI.contextMenu.displayMenuItem = function ({target}) {
let doc = target.ownerDocument;
let gContextMenu = doc.defaultView.gContextMenu;
if (!gContextMenu.browser) {