]> git.sesse.net Git - pr0n/blobdiff - pr0n-fullscreen.js
Add an option to enter the new fullscreen mode.
[pr0n] / pr0n-fullscreen.js
index d28c2a4421ccbacbcec99d7266c3be6cf01ab4fb..4092ea235ac69f50e1072950e436f0d5118d94ca 100644 (file)
@@ -5,12 +5,12 @@ function find_width()
                return [window.innerWidth, window.innerHeight];
        } else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
                // IE 6+ in 'standards compliant mode'
-               return [document.documentElement.clientWidth, document.documentElement.clientHeight - 42];
+               return [document.documentElement.clientWidth, document.documentElement.clientHeight];
        } else if (document.body && (document.body.clientWidth || document.body.clientHeight)) {
                // IE 4-compatible
                return [document.body.clientWidth, document.body.clientHeight];
        }
-       return (null,null);
+       return [null,null];
 }
 
 /*
@@ -95,12 +95,10 @@ function relayout()
        main.style.width = adjusted_size[0] + "px";
        main.style.height = adjusted_size[1] + "px";
        main.style.lineHeight = adjusted_size[1] + "px"; 
-       if (document.all) {  // IE-specific
-               main.style.fontSize = adjusted_size[1] + "px";
-       }
 
        set_opacity("previous", can_go_previous() ? 0.7 : 0.1);
        set_opacity("next", can_go_next() ? 0.7 : 0.1);
+       set_opacity("close", 0.7);
 }
 
 function set_opacity(id, amount)
@@ -207,6 +205,11 @@ function key_up(which) {
        }
 }
 
+function do_close()
+{
+       window.location = global_return_url;
+}
+
 // enable the horrible horrible IE PNG hack
 function ie_png_hack()
 {