From 477a5a8ac3178e12e9bd060f88bf7c5cc8600292 Mon Sep 17 00:00:00 2001 From: r888888888 Date: Thu, 2 Aug 2018 23:52:03 -0700 Subject: [PATCH] fix recommended js --- app/javascript/src/javascripts/posts.js.erb | 30 --------------------- 1 file changed, 30 deletions(-) diff --git a/app/javascript/src/javascripts/posts.js.erb b/app/javascript/src/javascripts/posts.js.erb index ba9c5c3e5..3c506747a 100644 --- a/app/javascript/src/javascripts/posts.js.erb +++ b/app/javascript/src/javascripts/posts.js.erb @@ -486,36 +486,6 @@ Post.initialize_post_sections = function() { $("#post-sections li:first-child").addClass("active"); } -Post.initialize_post_sections = function() { - $("#post-sections li a").click(function(e) { - if (e.target.hash === "#comments") { - $("#comments").show(); - $("#edit").hide(); - $("#share").hide(); - } else if (e.target.hash === "#edit") { - $("#edit").show(); - $("#comments").hide(); - $("#share").hide(); - $("#post_tag_string").focus().selectEnd().height($("#post_tag_string")[0].scrollHeight); - $("#related-tags-button").trigger("click"); - $("#find-artist-button").trigger("click"); - } else { - $("#edit").hide(); - $("#comments").hide(); - $("#share").show(); - addthis.init(); - } - - $("#post-sections li").removeClass("active"); - $(e.target).parent("li").addClass("active"); - e.preventDefault(); - }); - - $("#post-sections li:first-child").addClass("active"); - $("#notes").hide(); - $("#edit").hide(); -} - Post.resize_ugoira_controls = function() { var $img = $("#image"); var width = Math.max($img.width(), 350);