diff options
Diffstat (limited to 'browser/extensions/screenshots')
8 files changed, 14 insertions, 14 deletions
diff --git a/browser/extensions/screenshots/background/main.js b/browser/extensions/screenshots/background/main.js index 594ba798ee..c39590799d 100644 --- a/browser/extensions/screenshots/background/main.js +++ b/browser/extensions/screenshots/background/main.js @@ -64,7 +64,7 @@ this.main = (function () { _startShotFlow(tab, "keyboard-shortcut"); }); - const _startShotFlow = (tab, inputType) => { + const _startShotFlow = tab => { if (!tab) { // Not in a page/tab context, ignore return; @@ -137,7 +137,7 @@ this.main = (function () { catcher.watchPromise(incrementCount(...args)); }); - communication.register("openShot", async (sender, { url, copied }) => { + communication.register("openShot", async (sender, { copied }) => { if (copied) { const id = crypto.randomUUID(); const [title, message] = await getStrings([ diff --git a/browser/extensions/screenshots/background/takeshot.js b/browser/extensions/screenshots/background/takeshot.js index cde7d9df70..e8be5d9a80 100644 --- a/browser/extensions/screenshots/background/takeshot.js +++ b/browser/extensions/screenshots/background/takeshot.js @@ -17,7 +17,7 @@ this.takeshot = (function () { } ); - communication.register("getZoomFactor", sender => { + communication.register("getZoomFactor", () => { return getZoomFactor(); }); @@ -54,7 +54,7 @@ this.takeshot = (function () { browser.tabs.captureTab(null, options).then(dataUrl => { const image = new Image(); image.src = dataUrl; - return new Promise((resolve, reject) => { + return new Promise(resolve => { image.onload = catcher.watchFunction(() => { const xScale = devicePixelRatio; const yScale = devicePixelRatio; diff --git a/browser/extensions/screenshots/blobConverters.js b/browser/extensions/screenshots/blobConverters.js index 4e727ff271..6376709984 100644 --- a/browser/extensions/screenshots/blobConverters.js +++ b/browser/extensions/screenshots/blobConverters.js @@ -24,7 +24,7 @@ this.blobConverters = (function () { }; exports.blobToArray = function (blob) { - return new Promise((resolve, reject) => { + return new Promise(resolve => { const reader = new FileReader(); reader.addEventListener("loadend", function () { resolve(reader.result); @@ -34,7 +34,7 @@ this.blobConverters = (function () { }; exports.blobToDataUrl = function (blob) { - return new Promise((resolve, reject) => { + return new Promise(resolve => { const reader = new FileReader(); reader.addEventListener("loadend", function () { resolve(reader.result); diff --git a/browser/extensions/screenshots/build/thumbnailGenerator.js b/browser/extensions/screenshots/build/thumbnailGenerator.js index c80ccb6bac..b193378a43 100644 --- a/browser/extensions/screenshots/build/thumbnailGenerator.js +++ b/browser/extensions/screenshots/build/thumbnailGenerator.js @@ -90,7 +90,7 @@ this.thumbnailGenerator = (function () { const thumbnailDimensions = getThumbnailDimensions(imageWidth, imageHeight); - return new Promise((resolve, reject) => { + return new Promise(resolve => { const thumbnailImage = new Image(); let srcWidth = imageWidth; let srcHeight = imageHeight; diff --git a/browser/extensions/screenshots/clipboard.js b/browser/extensions/screenshots/clipboard.js index d4dbc38a14..6c133e124a 100644 --- a/browser/extensions/screenshots/clipboard.js +++ b/browser/extensions/screenshots/clipboard.js @@ -10,7 +10,7 @@ this.clipboard = (function () { const exports = {}; exports.copy = function (text) { - return new Promise((resolve, reject) => { + return new Promise(resolve => { const element = document.createElement("iframe"); element.src = browser.runtime.getURL("blank.html"); // We can't actually hide the iframe while copying, but we can make diff --git a/browser/extensions/screenshots/selector/ui.js b/browser/extensions/screenshots/selector/ui.js index c8433a8f84..9e54a1dfb2 100644 --- a/browser/extensions/screenshots/selector/ui.js +++ b/browser/extensions/screenshots/selector/ui.js @@ -85,7 +85,7 @@ this.ui = (function () { document: null, window: null, display(installHandlerOnDocument) { - return new Promise((resolve, reject) => { + return new Promise(resolve => { if (!this.element) { this.element = initializeIframe(); this.element.id = "firefox-screenshots-selection-iframe"; @@ -240,7 +240,7 @@ this.ui = (function () { document: null, window: null, display(installHandlerOnDocument, standardOverlayCallbacks) { - return new Promise((resolve, reject) => { + return new Promise(resolve => { if (!this.element) { this.element = initializeIframe(); this.element.id = "firefox-screenshots-preselection-iframe"; @@ -381,7 +381,7 @@ this.ui = (function () { document: null, window: null, display(installHandlerOnDocument, standardOverlayCallbacks) { - return new Promise((resolve, reject) => { + return new Promise(resolve => { if (!this.element) { this.element = initializeIframe(); this.element.id = "firefox-screenshots-preview-iframe"; diff --git a/browser/extensions/screenshots/selector/uicontrol.js b/browser/extensions/screenshots/selector/uicontrol.js index b690281083..0fc44bd433 100644 --- a/browser/extensions/screenshots/selector/uicontrol.js +++ b/browser/extensions/screenshots/selector/uicontrol.js @@ -445,7 +445,7 @@ this.uicontrol = (function () { }, /** When we find an element, maybe there's one that's just a little bit better... */ - evenBetterElement(node, origRect) { + evenBetterElement(node) { let el = node.parentNode; const ELEMENT_NODE = document.ELEMENT_NODE; while (el && el.nodeType === ELEMENT_NODE) { @@ -541,7 +541,7 @@ this.uicontrol = (function () { } }, - mouseup(event) { + mouseup() { // If we don't get into "dragging" then we attempt an autoselect if (mouseupNoAutoselect) { sendEvent("cancel-selection", "selection-background-mousedown"); diff --git a/browser/extensions/screenshots/sitehelper.js b/browser/extensions/screenshots/sitehelper.js index 719e76dad2..e25f510070 100644 --- a/browser/extensions/screenshots/sitehelper.js +++ b/browser/extensions/screenshots/sitehelper.js @@ -30,7 +30,7 @@ this.sitehelper = (function () { registerListener( "delete-everything", - catcher.watchFunction(event => { + catcher.watchFunction(() => { // FIXME: reset some data in the add-on }, false) ); |