#4526 Fix emojis loading on unauthenticated sessions
Merged 4 years ago by pingou. Opened 4 years ago by jlanda.
jlanda/pagure fix-anonymous-pr-emojis  into  master

@@ -1041,6 +1041,17 @@ 

      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 @@ 

    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' %}

no initial comment

rebased onto 0596165

4 years ago

rebased onto 0596165

4 years ago

Ahah, good one :)

Since it's not covered in the unit-tests, I'm going to merge this directly.

Thanks!

Pull-Request has been merged by pingou

4 years ago