From 059616585c9d026ac96bf6d5a490a9b4a3779de5 Mon Sep 17 00:00:00 2001 From: Julen Landa Alustiza Date: Jul 10 2019 19:16:13 +0000 Subject: Fix emojis loading on unauthenticated sessions --- diff --git a/pagure/templates/repo_pull_request.html b/pagure/templates/repo_pull_request.html index 4fdd249..e192afa 100644 --- a/pagure/templates/repo_pull_request.html +++ b/pagure/templates/repo_pull_request.html @@ -1041,6 +1041,17 @@ $(document).ready(function() { return window.confirm("Are you sure you want to reopen this requested pull?"); }); + $(".comment_body").each(function(ind, obj) { + var source = $(obj).html(); + var preview = emojione.toImage(source); + $(obj).html(preview); + }); + $(".pr_comment").each(function(ind, obj) { + var source = $(obj).html(); + var preview = emojione.toImage(source); + $(obj).html(preview); + }); + {% if g.authenticated %} $( ".code_table tr" ).hover( @@ -1103,17 +1114,6 @@ $(document).ready(function() { setup_edit_btns(); setup_reply_btns(); - $(".comment_body").each(function(ind, obj) { - var source = $(obj).html(); - var preview = emojione.toImage(source); - $(obj).html(preview); - }); - $(".pr_comment").each(function(ind, obj) { - var source = $(obj).html(); - var preview = emojione.toImage(source); - $(obj).html(preview); - }); - {% endif %} {% if pull_request.status == 'Open' %}