revert hammer js changes

This commit is contained in:
r888888888
2014-08-20 16:49:20 -07:00
parent f0ab7ae937
commit 81c5c15758
39 changed files with 49 additions and 52 deletions

View File

@@ -0,0 +1,41 @@
(function() {
Danbooru.PostPopular = {};
Danbooru.PostPopular.nav_prev = function() {
if ($("#popular-nav-links").length) {
var href = $("#popular-nav-links a[rel=prev]").attr("href");
if (href) {
location.href = href;
}
}
}
Danbooru.PostPopular.nav_next = function() {
if ($("#popular-nav-links").length) {
var href = $("#popular-nav-links a[rel=next]").attr("href");
if (href) {
location.href = href;
}
}
}
Danbooru.PostPopular.initialize_all = function() {
if ($("#c-explore-posts").length) {
if (Danbooru.meta("enable-js-navigation") === "true") {
$(document).bind("keypress", "a", function(e) {
Danbooru.PostPopular.nav_prev();
e.preventDefault();
});
$(document).bind("keypress", "d", function(e) {
Danbooru.PostPopular.nav_next();
e.preventDefault();
});
}
}
}
})();
$(document).ready(function() {
Danbooru.PostPopular.initialize_all();
});