remove jquery.hammer.min.js dependency
This commit is contained in:
@@ -1,7 +1 @@
|
|||||||
//= require jquery-1.10.1.min.js
|
|
||||||
//= require hammer.min.js
|
//= require hammer.min.js
|
||||||
//= require jquery.hammer.min.js
|
|
||||||
|
|
||||||
$(function() {
|
|
||||||
$(document).hammer();
|
|
||||||
});
|
|
||||||
|
|||||||
@@ -11,25 +11,20 @@
|
|||||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function() {
|
$(function() {
|
||||||
$(document)
|
var doc = new Hammer(document);
|
||||||
.hammer()
|
doc.on("swipeleft", function(e) {
|
||||||
.on("swipeleft", function(e) {
|
var href = $(".paginator a[rel=next]").attr("href");
|
||||||
if (e.gesture.distance > 125) {
|
if (href) {
|
||||||
var href = $(".paginator a[rel=next]").attr("href");
|
window.location = href;
|
||||||
if (href) {
|
}
|
||||||
window.location = href;
|
});
|
||||||
}
|
doc.on("swiperight", function(e) {
|
||||||
}
|
var href = $(".paginator a[rel=prev]").attr("href");
|
||||||
})
|
if (href) {
|
||||||
.on("swiperight", function(e) {
|
window.location = href;
|
||||||
if (e.gesture.distance > 125) {
|
}
|
||||||
var href = $(".paginator a[rel=prev]").attr("href");
|
});
|
||||||
if (href) {
|
});
|
||||||
window.location = href;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})
|
|
||||||
</script>
|
</script>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
|||||||
@@ -13,19 +13,16 @@
|
|||||||
<meta name="viewport" content="width=device-width,initial-scale=<%= @post.device_scale %>">
|
<meta name="viewport" content="width=device-width,initial-scale=<%= @post.device_scale %>">
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function() {
|
$(function() {
|
||||||
$(document).on("swipeleft", function(e) {
|
var doc = new Hammer(document);
|
||||||
if (e.gesture.distance > 150) {
|
doc.on("swipeleft", function(e) {
|
||||||
var href = $(".paginator a[rel=next]").attr("href");
|
var href = $(".paginator a[rel=next]").attr("href");
|
||||||
if (href) {
|
if (href) {
|
||||||
window.location = href;
|
window.location = href;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on("swiperight", function(e) {
|
doc.on("swiperight", function(e) {
|
||||||
if (e.gesture.distance > 150) {
|
window.history.back();
|
||||||
window.history.back();
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ module Danbooru
|
|||||||
class Configuration
|
class Configuration
|
||||||
# The version of this Danbooru.
|
# The version of this Danbooru.
|
||||||
def version
|
def version
|
||||||
"2.57.0"
|
"2.57.1"
|
||||||
end
|
end
|
||||||
|
|
||||||
# The name of this Danbooru.
|
# The name of this Danbooru.
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
/*! jQuery plugin for Hammer.JS - v1.1.3 - 2014-05-20
|
|
||||||
* http://eightmedia.github.com/hammer.js
|
|
||||||
*
|
|
||||||
* Copyright (c) 2014 Jorik Tangelder <j.tangelder@gmail.com>;
|
|
||||||
* Licensed under the MIT license */
|
|
||||||
|
|
||||||
!function(a,b){"use strict";function c(a,c){Date.now||(Date.now=function(){return(new Date).getTime()}),a.utils.each(["on","off"],function(d){a.utils[d]=function(a,e,f){c(a)[d](e,function(a){var d=c.extend({},a.originalEvent,a);d.button===b&&(d.button=a.which-1),f.call(this,d)})}}),a.Instance.prototype.trigger=function(a,b){var d=c(this.element);return d.has(b.target).length&&(d=c(b.target)),d.trigger({type:a,gesture:b})},c.fn.hammer=function(b){return this.each(function(){var d=c(this),e=d.data("hammer");e?e&&b&&a.utils.extend(e.options,b):d.data("hammer",new a(this,b||{}))})}}"function"==typeof define&&define.amd?define(["hammerjs","jquery"],c):c(a.Hammer,a.jQuery||a.Zepto)}(window);
|
|
||||||
//# sourceMappingURL=jquery.hammer.min.map
|
|
||||||
Reference in New Issue
Block a user