diff --git a/addon/webextension/selector/shooter.js b/addon/webextension/selector/shooter.js index 567af82512..81adc6e501 100644 --- a/addon/webextension/selector/shooter.js +++ b/addon/webextension/selector/shooter.js @@ -63,7 +63,7 @@ this.shooter = (function() { // eslint-disable-line no-unused-vars let isSaving = null; - exports.takeShot = function(captureType, selectedPos) { + exports.takeShot = function(captureType, selectedPos, url) { // isSaving indicates we're aleady in the middle of saving // we use a timeout so in the case of a failure the button will // still start working again @@ -92,7 +92,7 @@ this.shooter = (function() { // eslint-disable-line no-unused-vars if (buildSettings.captureText) { captureText = util.captureEnclosedText(selectedPos); } - let dataUrl = screenshotPage(selectedPos); + let dataUrl = url || screenshotPage(selectedPos); if (dataUrl) { shotObject.delAllClips(); shotObject.addClip({ diff --git a/addon/webextension/selector/uicontrol.js b/addon/webextension/selector/uicontrol.js index 1dacff5b80..cbf3a3711d 100644 --- a/addon/webextension/selector/uicontrol.js +++ b/addon/webextension/selector/uicontrol.js @@ -180,7 +180,7 @@ this.uicontrol = (function() { }, onSavePreview: () => { sendEvent(`save-${captureType.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase()}`, "save-preview-button"); - shooter.takeShot(captureType, selectedPos); + shooter.takeShot(captureType, selectedPos, dataUrl); }, onDownloadPreview: () => { sendEvent(`download-${captureType.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase()}`, "download-preview-button");