X-Git-Url: https://git.sesse.net/?p=pr0n;a=blobdiff_plain;f=files%2Fpr0n-fullscreen.js;h=49d20bd577968f0af1ee63c0b2c81e5d2438974a;hp=026c072e85fdc6ebebe6e158792b6402ebbece07;hb=5e3db0119518c865c40c5b96ab543dfefb6b2e90;hpb=6df5f831b013ea22665126e987076838c73b4bfe diff --git a/files/pr0n-fullscreen.js b/files/pr0n-fullscreen.js index 026c072..49d20bd 100644 --- a/files/pr0n-fullscreen.js +++ b/files/pr0n-fullscreen.js @@ -125,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; @@ -488,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(); };