$(document).ready(function() {

  if ($("#url").length > 0) {
    $("#title").on('focus', function() {
      var url = $("#url").val();
      $.get("/news/summarize?url=" + url, function(response) {
        if (response) {
		  if(typeof response.title !== "undefined"){
			$("#title").val(response.title);
		  }
		  
		  if(typeof response.source !== "undefined"){
			$("#source").val(response.source);
		  }
		  else $("#source").val(url);
		  
		  if(typeof response.summary !== "undefined"){
			$("#summary").val(response.summary.join(" "));
		  }
        
		}
      });
    })
    $('input[autofocus]').trigger('focus');//force fire it on the autofocus element
  }

  if($(".show-summary").length > 0) {
    $(".show-summary").on('click', function(e) {
      e.preventDefault();
      $(this).siblings("p").toggleClass('hidden');
    })
  }

  $("#copyright").text(new Date().getFullYear());

  (function hideNavMenuOnBodyClick() {
    $('body').on('click', function() {
      $('.navbar-collapse.in').collapse('hide');
    });

    $('.navbar-collapse').on('click', function(event) {
      event.stopPropagation();
    });
  }());

});

@@ -956,32 +956,33 @@
 lick', function(
+e
 ) %7B%0A      $('.na
@@ -974,16 +974,22 @@
  %7B%0A     
+ if (!
  $('.nav
@@ -995,136 +995,93 @@
 vbar
--collapse.in').collapse('hide');%0A    %7D);%0A%0A    $('.navbar-collapse').on('click', function(event) %7B%0A      event.stopPropagation();
+').has(e.target).length) %7B%0A        $('.navbar-collapse.in').collapse('hide');%0A      %7D
 %0A   

Fix dropdown hiding. Resolves issue #104