diff --git a/pagure/templates/pull_request.html b/pagure/templates/pull_request.html index 519ab26..56ba1c4 100644 --- a/pagure/templates/pull_request.html +++ b/pagure/templates/pull_request.html @@ -345,6 +345,28 @@ $( "#comment" ).val(_output.join("\n")); } ); + + var cur_hash = null; + + highlight_comment = function() { + var _hash = window.location.hash; + if (_hash != cur_hash) { + $( cur_hash ).css( + "background", "linear-gradient(to bottom, #ededed 0%, #fff 100%)" + ); + }; + cur_hash = _hash; + if ( _hash ) { + $( _hash ).css( + "background", "linear-gradient(to bottom, #eded98 0%, #fff 100%)" + ); + }; + return false; + }; + + $(window.onload=highlight_comment()); + $(window).on('hashchange', highlight_comment); + {% endif %} });