jQuery(function() {
  jQuery(document).on('page:fetch',   function() { NProgress.start();  });
  jQuery(document).on('page:receive', function() { NProgress.set(0.7); });
  jQuery(document).on('page:change',  function() { NProgress.done();   });
  jQuery(document).on('page:restore', function() { NProgress.remove(); });
});

jQuery(function() {
  if (Turbolinks.ProgressBar) { Turbolinks.ProgressBar.disable(); }
  jQuery(document).on('page:fetch',   function() { NProgress.start();  });
  jQuery(document).on('page:receive', function() { NProgress.set(0.7); });
  jQuery(document).on('page:change',  function() { NProgress.done();   });
  jQuery(document).on('page:restore', function() { NProgress.remove(); });
});

Disable TurboLinks.ProgressBar if it exists
Disable TurboLinks.ProgressBar if it exists

Resolves #32, where TurboLinks' default progress bar loads in addition
to this one when using this project.
