From afc2c4cd0abd29281873cb11252479613011eacd Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Jul 01 2015 10:32:45 +0000 Subject: No need to do anything about comments or SSE if we're not viewing a pull-request --- diff --git a/pagure/templates/pull_request.html b/pagure/templates/pull_request.html index 3af9834..b161d7f 100644 --- a/pagure/templates/pull_request.html +++ b/pagure/templates/pull_request.html @@ -511,7 +511,7 @@ }); -{% if authenticated %} +{% if authenticated and pull_request %} function try_async_comment(form, inline) { $.post( form.action + "?js=1", $(form).serialize() ) .done(function(data) { @@ -539,7 +539,7 @@ function try_async_comment(form, inline) { -{% if config['EVENTSOURCE_SOURCE'] %} +{% if config['EVENTSOURCE_SOURCE'] and pull_request %}