1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-07-05 11:37:01 +02:00

Also dispatch loadend event in case of match

Related issue:
- https://github.com/AdguardTeam/Scriptlets/issues/199
This commit is contained in:
Raymond Hill 2022-05-08 11:22:32 -04:00
parent cef36518ed
commit b76d7c6af6
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -1253,18 +1253,9 @@
status: { value: 200, writable: false },
statusText: { value: 'OK', writable: false },
});
if ( this.onreadystatechange !== null ) {
setTimeout(( ) => {
const ev = new Event('readystatechange');
this.onreadystatechange.call(this, ev);
}, 1);
}
if ( this.onload !== null ) {
setTimeout(( ) => {
const ev = new Event('load');
this.onload.call(this, ev);
}, 1);
}
this.dispatchEvent(new Event('readystatechange'));
this.dispatchEvent(new Event('load'));
this.dispatchEvent(new Event('loadend'));
}
};
})();
@ -1364,9 +1355,11 @@
// https://github.com/uBlockOrigin/uAssets/issues/8
/// alert-buster.js
(function() {
window.alert = function(a) {
console.info(a);
};
window.alert = new Proxy(window.alert, {
apply: function(a) {
console.info(a);
},
});
})();