Skip to content

Commit

Permalink
Merge pull request #651 from GrosPoulet/master
Browse files Browse the repository at this point in the history
Download fix for empty filenames (like in Google Maps)
  • Loading branch information
GrosPoulet authored Jan 8, 2021
2 parents b86b70b + b14856c commit 6c0769b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions js/hoverzoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -1466,6 +1466,7 @@ var hoverZoom = {

function saveImage() {
var filename = imgDetails.url.split('/').pop().split('?')[0];
if (filename == '') filename = 'image';
if (filename.indexOf('.') === -1)
filename = filename + '.jpg';
downloadResource(imgDetails.url, filename);
Expand Down

0 comments on commit 6c0769b

Please sign in to comment.