From: Steinar H. Gunderson Date: Sat, 28 Nov 2015 10:25:51 +0000 (+0100) Subject: Show the right link to download the original. X-Git-Url: https://git.sesse.net/?p=pr0n;a=commitdiff_plain;h=a58ea26b2871cd936760fa59c1b7aa44dbfa581e Show the right link to download the original. --- diff --git a/files/pr0n-fullscreen.js b/files/pr0n-fullscreen.js index 80977ce..f9a2ebc 100644 --- a/files/pr0n-fullscreen.js +++ b/files/pr0n-fullscreen.js @@ -139,9 +139,11 @@ function display_image(width, height, evt, filename, element_id) img.style.transformOrigin = "top left"; img.style.transform = "scale(" + (1.0 / dpr) + ")"; - // Update the "download original" link. - var original_url = window.location.origin + "/" + evt + "/original/" + filename; - document.getElementById("origdownload").href = original_url; + if (element_id == "image") { + // Update the "download original" link. + var original_url = window.location.origin + "/" + evt + "/original/" + filename; + document.getElementById("origdownload").href = original_url; + } if (global_infobox) { var url;