diff options
Diffstat (limited to 'js/vapi-background.js')
-rw-r--r-- | js/vapi-background.js | 22 |
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) { |