X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=files%2Fpr0n-fullscreen.js;h=d4af19f1d1397978ad94c859f398f7bfdfc12e82;hb=c53dd5ce79ebfdcf01c3847149611ebafcebdd69;hp=d1101718d6b0bc68b58f972bd949ab115c14ab05;hpb=d5489e1aa91408c7b89766adfe269849d587cf9a;p=pr0n diff --git a/files/pr0n-fullscreen.js b/files/pr0n-fullscreen.js index d110171..d4af19f 100644 --- a/files/pr0n-fullscreen.js +++ b/files/pr0n-fullscreen.js @@ -169,21 +169,20 @@ function display_image(width, height, evt, filename, element_id) img.style.transformOrigin = "top left"; img.style.transform = "scale(" + (1.0 / dpr) + ")"; - if (global_infobox != 'nobox/') { - var url; - if (dpr == 1) { - url = window.location.origin + "/" + evt + "/" + width + "x" + height + "/box/" + filename; - } else { - url = window.location.origin + "/" + evt + "/" + width + "x" + height + "@" + dpr.toFixed(2) + "/box/" + filename; - } - var boximg = replace_image_element(url, element_id + "_box", main); - - boximg.style.position = "absolute"; - boximg.style.left = "0px"; - boximg.style.bottom = "-1px"; - boximg.style.transformOrigin = "bottom left"; - boximg.style.transform = "scale(" + (1.0 / dpr) + ")"; + // Infobox. + var url; + if (dpr == 1) { + url = window.location.origin + "/" + evt + "/" + width + "x" + height + "/box/" + filename; + } else { + url = window.location.origin + "/" + evt + "/" + width + "x" + height + "@" + dpr.toFixed(2) + "/box/" + filename; } + var boximg = replace_image_element(url, element_id + "_box", main); + + boximg.style.position = "absolute"; + boximg.style.left = "0px"; + boximg.style.bottom = "-1px"; + boximg.style.transformOrigin = "bottom left"; + boximg.style.transform = "scale(" + (1.0 / dpr) + ")"; return img; }