]> git.sesse.net Git - pr0n/commitdiff
Fix text fading.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 3 Jan 2016 13:41:18 +0000 (14:41 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 3 Jan 2016 13:41:18 +0000 (14:41 +0100)
files/pr0n-fullscreen.js

index 7d5638adf06092cb07066de8905ab4df33face05..a01508a328c4c813512998b27cb7cc0eba4276e7 100644 (file)
@@ -378,7 +378,7 @@ function fade_text(opacity)
                if (opacity < 0.0) {
                        opacity = 0.0;
                }
-               setTimeout("fade_text(" + opacity + ")", 30);
+               setTimeout(function() { fade_text(opacity); }, 30);
        } else {
                var text = document.getElementById("text");
                if (text !== null) {
@@ -400,7 +400,7 @@ function select_image(evt, filename, selected)
        req.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
        req.send("event=" + evt + "&filename=" + filename + "&selected=" + selected);
 
-       setTimeout("fade_text(0.99)", 30);
+       setTimeout(function() { fade_text(0.99); }, 30);
 }
 
 function key_down(which)