Drop unused common_searches code.

This commit is contained in:
evazion
2019-09-01 15:52:28 -05:00
parent dacb21b085
commit 95b8420ba2
4 changed files with 1 additions and 33 deletions

View File

@@ -114,7 +114,7 @@ class UsersController < ApplicationController
enable_sequential_post_navigation hide_deleted_posts style_usernames
enable_auto_complete show_deleted_children
disable_categorized_saved_searches disable_tagged_filenames
enable_recent_searches disable_cropped_thumbnails disable_mobile_gestures
disable_cropped_thumbnails disable_mobile_gestures
enable_safe_mode disable_responsive_mode disable_post_tooltips
enable_recommended_posts opt_out_tracking
]

View File

@@ -58,18 +58,6 @@ module PostsHelper
return render("posts/partials/show/view_count", msg: msg)
end
def common_searches_html(user)
return nil unless post_search_counts_enabled?
return nil unless user.is_platinum?
return nil unless user.enable_recent_searches?
key = "uid"
value = user.id
verifier = ActiveSupport::MessageVerifier.new(Danbooru.config.reportbooru_key, serializer: JSON, digest: "SHA256")
sig = verifier.generate("#{key},#{value}")
render("users/common_searches", user: user, sig: sig)
end
def post_source_tag(post)
if post.source =~ %r!\Ahttp://img\d+\.pixiv\.net/img/([^\/]+)/!i
text = "pixiv/<wbr>#{wordbreakify($1)}".html_safe

View File

@@ -1,19 +0,0 @@
<!--
<section id="outer-recent-searches" style="display: none;">
<h1>Recent Searches</h1>
<ul id="recent-searches">
</ul>
</section>
-->
<script type="text/javascript">
$(function() {
/*$.get("<%= Danbooru.config.reportbooru_server %>/user_searches", {
uid: <%= user.id %>,
sig: "<%= sig %>"
}, function(data) {
$("#recent-searches").html(data);
$("#outer-recent-searches").show();
});*/
});
</script>

View File

@@ -67,7 +67,6 @@
<%= f.input :disable_mobile_gestures, :as => :select, :hint => "Disable swipe left / swipe right gestures on mobile", :collection => [["No", "false"], ["Yes", "true"]], :include_blank => false %>
<%= f.input :disable_post_tooltips, :as => :select, :hint => "Disable advanced tooltips when hovering over thumbnails", :collection => [["No", "false"], ["Yes", "true"]], :include_blank => false %>
<%= f.input :disable_cropped_thumbnails, :as => :select, :hint => "Disable cropped (square) thumbnails on mobile", :collection => [["No", "false"], ["Yes", "true"]], :include_blank => false %>
<%= f.input :enable_recent_searches, :as => :select, :collection => [["No", "false"], ["Yes", "true"]], :include_blank => false %>
<%= f.input :disable_responsive_mode, :as => :select, :collection => [["No", "false"], ["Yes", "true"]], :include_blank => false, :hint => "Disable alternative layout for mobile and tablet" %>
<%= f.input :opt_out_tracking, :as => :select, :collection => [["No", "false"], ["Yes", "true"]], :include_blank => false, :hint => "Opt out of tracking" %>