From 35c97d0836d002c4d5415b875654f83d8ab0269e Mon Sep 17 00:00:00 2001 From: evazion Date: Sun, 21 Nov 2021 01:51:57 -0600 Subject: [PATCH] mode menu: remove upvote/downvote mode. Remove the upvote and downvote modes from the post mode menu. These are unnecessary now since you can use the vote buttons beneath the thumbnails. --- app/javascript/src/javascripts/post_mode_menu.js | 8 -------- app/views/posts/partials/index/_mode_menu.html.erb | 2 -- 2 files changed, 10 deletions(-) diff --git a/app/javascript/src/javascripts/post_mode_menu.js b/app/javascript/src/javascripts/post_mode_menu.js index 91f1a5480..bf42da5ad 100644 --- a/app/javascript/src/javascripts/post_mode_menu.js +++ b/app/javascript/src/javascripts/post_mode_menu.js @@ -25,10 +25,6 @@ PostModeMenu.show_notice = function(mode, tag_script_index = 0) { Utility.notice("Switched to unfavorite mode. Click a post to unfavorite it."); } else if (mode === "edit") { Utility.notice("Switched to edit mode. Click a post to edit it."); - } else if (mode === 'vote-down') { - Utility.notice("Switched to downvote mode. Click a post to downvote it."); - } else if (mode === 'vote-up') { - Utility.notice("Switched to upvote mode. Click a post to upvote it."); } else if (mode === "tag-script") { Utility.notice(`Switched to tag script #${tag_script_index}. To switch tag scripts, use the number keys.`); } @@ -149,10 +145,6 @@ PostModeMenu.click = function(e) { Post.tag(post_id, "-fav:me"); } else if (s === "edit") { PostModeMenu.open_edit(post_id); - } else if (s === 'vote-down') { - Post.tag(post_id, "downvote:me"); - } else if (s === 'vote-up') { - Post.tag(post_id, "upvote:me"); } else if (s === "tag-script") { var current_script_id = localStorage.getItem("current_tag_script_id"); var tag_script = localStorage.getItem("tag-script-" + current_script_id) ?? ""; diff --git a/app/views/posts/partials/index/_mode_menu.html.erb b/app/views/posts/partials/index/_mode_menu.html.erb index d7c5a9464..27532d96f 100644 --- a/app/views/posts/partials/index/_mode_menu.html.erb +++ b/app/views/posts/partials/index/_mode_menu.html.erb @@ -8,8 +8,6 @@ - -