diff --git a/app/components/post_navbar_component/post_navbar_component.html.erb b/app/components/post_navbar_component/post_navbar_component.html.erb
index 43fb04c3b..138228d83 100644
--- a/app/components/post_navbar_component/post_navbar_component.html.erb
+++ b/app/components/post_navbar_component/post_navbar_component.html.erb
@@ -1,9 +1,9 @@
<% if has_search_navbar? %>
-
- <%= link_to "‹ prev", show_seq_post_path(post, q: search, seq: "prev"), rel: "nofollow prev", class: "prev" %>
+ <%= link_to "‹ prev", show_seq_post_path(post, q: search, seq: "prev"), rel: "nofollow prev", class: "prev", "data-shortcut": "a" %>
Search: <%= link_to search, posts_path(tags: search), rel: "nofollow" %>
- <%= link_to "next ›", show_seq_post_path(post, q: search, seq: "next"), rel: "nofollow next", class: "next" %>
+ <%= link_to "next ›", show_seq_post_path(post, q: search, seq: "next"), rel: "nofollow next", class: "next", "data-shortcut": "d" %>
<% end %>
@@ -20,7 +20,7 @@
- <%= link_to_if previous_post_id, "‹ prev", post_path(previous_post_id.to_i, q: "pool:#{pool.id}"), rel: ["nofollow", ("prev" if selected)], title: "to page #{pool.page_number(previous_post_id)}" %>
+ <%= link_to_if previous_post_id, "‹ prev", post_path(previous_post_id.to_i, q: "pool:#{pool.id}"), rel: ["nofollow", ("prev" if selected)], title: "to page #{pool.page_number(previous_post_id)}", "data-shortcut": ("a" if selected) %>
@@ -28,7 +28,7 @@
- <%= link_to_if next_post_id, "next ›", post_path(next_post_id.to_i, q: "pool:#{pool.id}"), rel: ["nofollow", ("next" if selected)], title: "to page #{pool.page_number(next_post_id)}" %>
+ <%= link_to_if next_post_id, "next ›", post_path(next_post_id.to_i, q: "pool:#{pool.id}"), rel: ["nofollow", ("next" if selected)], title: "to page #{pool.page_number(next_post_id)}", "data-shortcut": ("d" if selected) %>
@@ -50,7 +50,7 @@
- <%= link_to_if previous_post_id, "‹ prev", post_path(previous_post_id.to_i, q: "favgroup:#{favgroup.id}"), rel: ["nofollow", ("prev" if selected)] %>
+ <%= link_to_if previous_post_id, "‹ prev", post_path(previous_post_id.to_i, q: "favgroup:#{favgroup.id}"), rel: ["nofollow", ("prev" if selected)], "data-shortcut": ("a" if selected) %>
@@ -58,7 +58,7 @@
- <%= link_to_if next_post_id, "next ›", post_path(next_post_id.to_i, q: "favgroup:#{favgroup.id}"), rel: ["nofollow", ("next" if selected)] %>
+ <%= link_to_if next_post_id, "next ›", post_path(next_post_id.to_i, q: "favgroup:#{favgroup.id}"), rel: ["nofollow", ("next" if selected)], "data-shortcut": ("d" if selected) %>
diff --git a/app/javascript/src/javascripts/posts.js.erb b/app/javascript/src/javascripts/posts.js.erb
index a6587e8a9..06beaf231 100644
--- a/app/javascript/src/javascripts/posts.js.erb
+++ b/app/javascript/src/javascripts/posts.js.erb
@@ -19,7 +19,6 @@ Post.EDIT_DIALOG_WIDTH = 720;
Post.initialize_all = function() {
if ($("#c-posts").length) {
- this.initialize_shortcuts();
this.initialize_saved_searches();
}
@@ -175,26 +174,6 @@ Post.swipe_prev = function(e) {
e.preventDefault();
}
-Post.nav_prev = function(e) {
- var href = "";
-
- if ($(".paginator a[rel~=prev], .post-notice-search a[rel~=prev]").length) {
- location.href = $("a[rel~=prev]").attr("href");
- }
-
- e.preventDefault();
-}
-
-Post.nav_next = function(e) {
- var href = "";
-
- if ($(".paginator a[rel~=next], .post-notice-search a[rel~=next]").length) {
- location.href = $("a[rel~=next]").attr("href");
- }
-
- e.preventDefault();
-}
-
Post.swipe_next = function(e) {
if ($(".paginator a[rel~=next ]").length) {
location.href = $(".paginator a[rel~=next]").attr("href");
@@ -203,13 +182,6 @@ Post.swipe_next = function(e) {
e.preventDefault();
}
-Post.initialize_shortcuts = function() {
- if ($("#a-show").length) {
- Utility.keydown("a", "prev_page", Post.nav_prev);
- Utility.keydown("d", "next_page", Post.nav_next);
- }
-}
-
Post.initialize_links = function() {
$("#copy-notes").on("click.danbooru", function(e) {
var current_post_id = $("meta[name=post-id]").attr("content");