1
0
mirror of https://github.com/maximebf/php-debugbar.git synced 2025-01-17 05:18:32 +01:00

Skip openhandler urls

Check if openHandler is set, skip handling of the XHR for that url.
This commit is contained in:
Barry vd. Heuvel 2014-10-28 22:12:25 +01:00
parent fb364c73c3
commit 7d13728bdf

View File

@ -1091,7 +1091,8 @@ if (typeof(PhpDebugBar) == 'undefined') {
XMLHttpRequest.prototype.open = function(method, url, async, user, pass) {
var xhr = this;
this.addEventListener("readystatechange", function() {
if (xhr.readyState == 4) {
var skipUrl = self.debugbar.openHandler ? self.debugbar.openHandler.get('url') : null;
if (xhr.readyState == 4 && url.indexOf(skipUrl) !== 0) {
self.handle(xhr);
}
}, false);