users: remove option to disable keyboard shortcuts.

Remove the enable_post_navigation option. This option was originally
added to disable the next/prev post navbar beneath posts. It was later
repurposed to disable keyboard shortcuts.

Users who don't want keyboard shortcuts are advised to not press random
buttons on the keyboard like a caveman.

Only ~1200 users disabled this option and only ~600 were seen in the
last year.
This commit is contained in:
evazion
2021-01-14 16:37:29 -06:00
parent b6fef7f3f3
commit 99d447279b
6 changed files with 11 additions and 14 deletions

View File

@@ -1,4 +1,3 @@
import CurrentUser from "./current_user";
import Rails from '@rails/ujs';
let Utility = {};
@@ -74,9 +73,7 @@ Utility.dialog = function(title, html) {
}
Utility.keydown = function(keys, namespace, handler, selector = document) {
if (CurrentUser.data("enable-post-navigation")) {
$(selector).on("keydown.danbooru." + namespace, null, keys, handler);
}
$(selector).on("keydown.danbooru." + namespace, null, keys, handler);
};
Utility.is_subset = function(array, subarray) {