blob: 108f1a4b703092f4c1d6401a26ffef7c302872a3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
function setup_swipes() {
$(window).off("swipeleft swiperight");
if (parent._has_touch) {
$(window).on("swiperight", function() {
parent.prev_page();
});
$(window).on("swipeleft", function() {
parent.next_page();
});
}
}
$(document).ready(function() {
$(window).on("click", function() {
if (parent.$(".header").is(":visible")) {
parent.show_ui(false);
parent.request_fullscreen();
} else {
parent.show_ui(true);
parent.disable_fullscreen();
}
});
$(window).on('touchstart', function touch_detect() {
$(window).off('touchstart', touch_detect);
parent._has_touch = true;
setup_swipes();
});
setup_swipes();
});
|