refactor gestures

This commit is contained in:
r888888888
2017-10-11 12:59:57 -07:00
parent 4905d035b7
commit 3797c9ec2e
3 changed files with 28 additions and 29 deletions

View File

@@ -3,6 +3,14 @@
return $("meta[name=" + key + "]").attr("content");
}
Danbooru.test_max_width = function(width) {
if (!window.matchMedia) {
return false;
}
var mq = window.matchMedia('(max-width: ' + width + 'px)');
return mq.matches;
}
Danbooru.scrolling = false;
Danbooru.scroll_to = function(element) {