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:
@@ -8,6 +8,8 @@
|
||||
|
||||
* Removed the option to disable the next/previous post navbar.
|
||||
|
||||
* Removed the option to disable keyboard shortcuts.
|
||||
|
||||
## 2021-01-12
|
||||
|
||||
### Changes
|
||||
|
||||
@@ -290,8 +290,8 @@ module ApplicationHelper
|
||||
id name level level_string theme always_resize_images can_upload_free
|
||||
can_approve_posts disable_categorized_saved_searches
|
||||
disable_mobile_gestures disable_post_tooltips enable_auto_complete
|
||||
enable_post_navigation enable_safe_mode hide_deleted_posts
|
||||
show_deleted_children style_usernames default_image_size
|
||||
enable_safe_mode hide_deleted_posts show_deleted_children style_usernames
|
||||
default_image_size
|
||||
] + User::Roles.map { |role| :"is_#{role}?" }
|
||||
end
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
Utility.is_subset = function(array, subarray) {
|
||||
|
||||
@@ -669,7 +669,6 @@ class User < ApplicationRecord
|
||||
extend SearchMethods
|
||||
|
||||
def initialize_attributes
|
||||
self.enable_post_navigation = true
|
||||
self.new_post_navigation_layout = true
|
||||
self.enable_auto_complete = true
|
||||
self.always_resize_images = true
|
||||
|
||||
@@ -44,12 +44,12 @@ class UserPolicy < ApplicationPolicy
|
||||
:comment_threshold, :default_image_size, :favorite_tags,
|
||||
:blacklisted_tags, :time_zone, :per_page, :custom_style, :theme,
|
||||
:receive_email_notifications, :always_resize_images,
|
||||
:enable_post_navigation, :new_post_navigation_layout,
|
||||
:enable_private_favorites, :hide_deleted_posts, :style_usernames,
|
||||
:enable_auto_complete, :show_deleted_children,
|
||||
:disable_categorized_saved_searches, :disable_tagged_filenames,
|
||||
:disable_cropped_thumbnails, :disable_mobile_gestures, :enable_safe_mode,
|
||||
:enable_desktop_mode, :disable_post_tooltips,
|
||||
:new_post_navigation_layout, :enable_private_favorites,
|
||||
:hide_deleted_posts, :style_usernames, :enable_auto_complete,
|
||||
:show_deleted_children, :disable_categorized_saved_searches,
|
||||
:disable_tagged_filenames, :disable_cropped_thumbnails,
|
||||
:disable_mobile_gestures, :enable_safe_mode, :enable_desktop_mode,
|
||||
:disable_post_tooltips,
|
||||
].compact
|
||||
end
|
||||
|
||||
|
||||
@@ -59,7 +59,6 @@
|
||||
</div>
|
||||
|
||||
<%= f.input :style_usernames, :as => :select, :label => "Colored usernames", :hint => "Color users according to their user level", :include_blank => false, :collection => [["Yes", "true"], ["No", "false"]] %>
|
||||
<%= f.input :enable_post_navigation, :as => :select, :include_blank => false, :label => "Enable keyboard shortcuts", :hint => "Enable keyboard shortcuts", :collection => [["Yes", "true"], ["No", "false"]] %>
|
||||
<%= f.input :new_post_navigation_layout, :as => :select, :label => "Navigation bar position", :include_blank => false, :collection => [["Below", "true"], ["Above", "false"]], :hint => "When browsing pools or posts, place navigation links above or below the image" %>
|
||||
<%= f.input :hide_deleted_posts, :as => :select, :label => "Deleted post filter", :hint => "Remove deleted posts from search results", :include_blank => false, :collection => [["Yes", "true"], ["No", "false"]] %>
|
||||
<%= f.input :show_deleted_children, :as => :select, :label => "Show deleted children", :hint => "Show thumbnail borders on parent posts even if the children are deleted", :include_blank => false, :collection => [["Yes", "true"], ["No", "false"]] %>
|
||||
|
||||
Reference in New Issue
Block a user