js error handler

This commit is contained in:
troy
2022-01-08 01:01:09 +01:00
parent 0b888cd234
commit 28e68b094c
3 changed files with 18 additions and 0 deletions

2
js-error-logger.min.js vendored Normal file
View File

@@ -0,0 +1,2 @@
window.onerror=function(message,source,lineno,colno,error){var xmlhttp=new XMLHttpRequest;xmlhttp.open("POST","https://troy-grunt.de/api.php",true);xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");var params=JSON.stringify({"type":"error_collector","message":message,"source":source,"line":lineno,"col":colno,"err":error});xmlhttp.send(params)};
//# sourceMappingURL=js-error-logger.min.js.map