]> git.sesse.net Git - pr0n/commitdiff
Show the right link to download the original.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 28 Nov 2015 10:25:51 +0000 (11:25 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sat, 28 Nov 2015 10:28:27 +0000 (11:28 +0100)
files/pr0n-fullscreen.js

index 80977cebf1248fe4745002a9bcbde570e00c674e..f9a2ebc3bf50eea1a92c2f252f07aa7d8c249c8c 100644 (file)
@@ -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;