]> git.sesse.net Git - pr0n/blobdiff - files/pr0n-fullscreen.js
/select XHR does not need to be sync.
[pr0n] / files / pr0n-fullscreen.js
index 7ab77cd3155b4ad28320b4c54ed0af8121a4373f..9edac701a6be896aa0a53ab0c2221b1b2f1166f2 100644 (file)
@@ -414,7 +414,7 @@ function select_image(evt, filename, selected)
        }
        
        var req = new XMLHttpRequest();
-       req.open("POST", window.location.origin + "/select", false);
+       req.open("POST", window.location.origin + "/select", true);
        req.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
        req.send("event=" + evt + "&filename=" + filename + "&selected=" + selected);
 
@@ -560,7 +560,6 @@ function swipe(e)
                var new_x = (e.changedTouches[0].pageX - swipe_start_x);
                set_swipe_pos(new_x, null);
        }
-       e.preventDefault();
 }
 
 window.onload = function() {