X-Git-Url: https://git.sesse.net/?p=pr0n;a=blobdiff_plain;f=files%2Fpr0n-fullscreen.js;h=49d20bd577968f0af1ee63c0b2c81e5d2438974a;hp=a01508a328c4c813512998b27cb7cc0eba4276e7;hb=5e3db0119518c865c40c5b96ab543dfefb6b2e90;hpb=eac2adad0a49c50b3db6f96c3bd799e3ca2b8d24 diff --git a/files/pr0n-fullscreen.js b/files/pr0n-fullscreen.js index a01508a..49d20bd 100644 --- a/files/pr0n-fullscreen.js +++ b/files/pr0n-fullscreen.js @@ -26,6 +26,9 @@ function find_dpr() * pick_image_size, below. */ var fixed_sizes = [ + [ 3840, 2880 ], + [ 3200, 2400 ], + [ 2800, 2100 ], [ 2304, 1728 ], [ 2048, 1536 ], [ 1920, 1440 ], @@ -122,7 +125,7 @@ function rename_element(old_name, new_name) function display_image(width, height, evt, filename, element_id) { var url = window.location.origin + "/" + evt + "/" + width + "x" + height + "/" + filename; - var main = document.getElementById("iehack"); + var main = document.getElementById("main"); var preload = document.getElementById("preload"); var dpr = find_dpr(); var img; @@ -485,8 +488,8 @@ window.onload = function() { var body = document.body; body.onresize = function() { relayout(); }; - body.onkeydown = function() { key_down(event.keyCode); }; - body.onkeyup = function() { key_up(event.keyCode); }; + body.onkeydown = function(evt) { key_down(evt.keyCode); }; + body.onkeyup = function(evt) { key_up(evt.keyCode); }; body.onhashchange = function() { check_for_hash_change(); }; body.onclick = function() { check_for_hash_change(); };