Skip to content

Commit

Permalink
Merge branch 'carlinmack-svg-2055'
Browse files Browse the repository at this point in the history
  • Loading branch information
fnielsen committed Sep 26, 2022
2 parents 6562b7c + ddf7e03 commit e18737e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scholia/app/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,11 @@
var imageURL = "https://upload.wikimedia.org/wikipedia/commons/thumb/"
imageURL += imageNameMd5[0] + "/" + imageNameMd5.slice(0,2) + "/"
var filetype = imageName.match(/\.(\w+)$/);
if (filetype[1] === "tif" || filetype[1] === "tiff") {
var extension = filetype[1].toLowerCase()
if (extension === "tif" || extension === "tiff") {
imageURL += encodeURIComponent(imageName) + "/lossy-page1-500px-" + encodeURIComponent(imageName) + ".jpg";
} else if (extension === "svg") {
imageURL += encodeURIComponent(imageName) + "/500px-" + encodeURIComponent(imageName) + ".png";
} else {
imageURL += encodeURIComponent(imageName) + "/500px-" + encodeURIComponent(imageName);
}
Expand Down

0 comments on commit e18737e

Please sign in to comment.