Handle non-integral device pixel ratios.
[pr0n] / files / pr0n-fullscreen.js
index 79c174b72c35f36c0918bc8a0ec1f073c56f6c5b..789cda741f5c15ab6f4c88e31dba5489ff0025a5 100644 (file)
@@ -174,7 +174,7 @@ function display_image(width, height, evt, filename, element_id)
                if (dpr == 1) {
                        url = "http://" + global_vhost + "/" + evt + "/" + width + "x" + height + "/box/" + filename;
                } else {
-                       url = "http://" + global_vhost + "/" + evt + "/" + width + "x" + height + "@" + dpr + "/box/" + filename;
+                       url = "http://" + global_vhost + "/" + evt + "/" + width + "x" + height + "@" + dpr.toFixed(2) + "/box/" + filename;
                }
                var boximg = replace_image_element(url, element_id + "_box", main);