From 5596a462f531cde0ff1187b9b79b207f317d7c05 Mon Sep 17 00:00:00 2001 From: Luna D Date: Fri, 20 Dec 2019 17:37:50 -0500 Subject: [PATCH] less shit code --- assets/js/when-ready.js | 2 +- lib/philomena_web/templates/image/comment/index.html.slime | 2 +- .../templates/user_attribution/_anon_user.html.slime | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/assets/js/when-ready.js b/assets/js/when-ready.js index 4d5e230c..4f52a875 100644 --- a/assets/js/when-ready.js +++ b/assets/js/when-ready.js @@ -43,7 +43,7 @@ whenReady(() => { listenAutocomplete(); registerEvents(); setupBurgerMenu(); - bindCaptchaLinks(); + bindCaptchaLinks(); initImagesClientside(); setupComments(); setupDupeReports(); diff --git a/lib/philomena_web/templates/image/comment/index.html.slime b/lib/philomena_web/templates/image/comment/index.html.slime index 9cda5aba..7678a5da 100644 --- a/lib/philomena_web/templates/image/comment/index.html.slime +++ b/lib/philomena_web/templates/image/comment/index.html.slime @@ -13,7 +13,7 @@ elixir: i.fa.fa-sync span.hide-mobile<> Refresh -= for {comment, body} <- @comments, not comment.destroyed_content or (can?(@conn, :show, comment) and @conn.cookies["hide_staff_tools"] != "true") do += for {comment, body} <- @comments, not comment.destroyed_content or (can?(@conn, :show, comment) and not hide_staff_tools?(@conn)) do = render PhilomenaWeb.CommentView, "_comment.html", comment: comment, body: body, conn: @conn .block diff --git a/lib/philomena_web/templates/user_attribution/_anon_user.html.slime b/lib/philomena_web/templates/user_attribution/_anon_user.html.slime index 2f013374..b27abcb2 100644 --- a/lib/philomena_web/templates/user_attribution/_anon_user.html.slime +++ b/lib/philomena_web/templates/user_attribution/_anon_user.html.slime @@ -5,7 +5,7 @@ = if assigns[:awards] do = render PhilomenaWeb.ProfileView, "_awards.html", awards: @object.user.awards - - not is_nil(@object.user) and (can?(@conn, :reveal_anon, @object) and @conn.cookies["hide_staff_tools"] != "true") -> + - not is_nil(@object.user) and (can?(@conn, :reveal_anon, @object) and not hide_staff_tools?(@conn)) -> strong<> = link(anonymous_name(@object, true), to: Routes.profile_path(@conn, :show, @object.user))