Better scoping.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 27 Nov 2015 22:04:04 +0000 (23:04 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 27 Nov 2015 22:04:04 +0000 (23:04 +0100)
files/pr0n-fullscreen.js
templates/default/fullscreen-footer

index 1557881f733a5ee260349520e19a4bd506ecd501..293f9a0d63343add4bd414046a210673175675d2 100644 (file)
@@ -1,3 +1,10 @@
+(function() {
+
+var global_disabled_opacity = 0.1;
+var global_default_opacity = 0.7;
+var global_highlight_opacity = 1.0;
+var global_infobox = true;
+
 function find_width()
 {
        var dpr = find_dpr();
@@ -429,6 +436,7 @@ function parse_image_num(default_value) {
                return default_value;
        }
 }
+window['parse_image_num'] = parse_image_num;
 
 function check_for_hash_change() {
        var num = parse_image_num(-1);
@@ -486,3 +494,5 @@ window.onload = function() {
        options.onmouseup = function() { set_opacity('options', global_default_opacity); toggle_optionmenu(); };
        options.onmouseout = function() { set_opacity('options', global_default_opacity); };
 };
+
+})();
index 04da855ccd86cfe5e076184ce9998bfd137aa132..264d7bd4b2aa4a5268c76f2690d5e8e0f2ec1a26 100644 (file)
@@ -2,10 +2,6 @@
 var global_return_url = "%RETURNURL%";
 var global_image_num = parse_image_num(%START%);
 var global_select = %SEL%;
-var global_disabled_opacity = 0.1;
-var global_default_opacity = 0.7;
-var global_highlight_opacity = 1.0;
-var global_infobox = true;
 // end generated
     </script>
   </head>