Skip to content

Instantly share code, notes, and snippets.

@petebarnett
Created August 10, 2016 09:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save petebarnett/2f0db781a5e615b635ef85bf5caba9c7 to your computer and use it in GitHub Desktop.
Save petebarnett/2f0db781a5e615b635ef85bf5caba9c7 to your computer and use it in GitHub Desktop.
(function($) {
var beforeSend = Drupal.ajax.prototype.beforeSend;
Drupal.ajax.prototype.beforeSend = function(xmlhttprequest, options) {
// Do your thing here...
// And call the original
beforeSend.call(this, xmlhttprequest, options);
}
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment