Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Commit

Permalink
Check capture type before it's potentially changed. (#3968)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenba committed Jan 25, 2018
1 parent 43ad2df commit b9ce266
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions addon/webextension/selector/uicontrol.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,15 +201,15 @@ this.uicontrol = (function() {
onDownloadPreview: () => {
sendEvent(`download-${captureType.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase()}`, "download-preview-button");
// Downloaded shots don't have dimension limits
removeDimensionLimitsOnFullPageShot();
let previewDataUrl = (captureType === "fullPageTruncated") ? null : dataUrl;
removeDimensionLimitsOnFullPageShot();
shooter.downloadShot(selectedPos, previewDataUrl);
},
onCopyPreview: () => {
sendEvent(`copy-${captureType.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase()}`, "copy-preview-button");
// Copied shots don't have dimension limits
removeDimensionLimitsOnFullPageShot();
let previewDataUrl = (captureType === "fullPageTruncated") ? null : dataUrl;
removeDimensionLimitsOnFullPageShot();
shooter.copyShot(selectedPos, previewDataUrl);
}
};
Expand Down

0 comments on commit b9ce266

Please sign in to comment.