diff --git a/js-error-logger.js b/js-error-logger.js index 59952e7..9926d59 100644 --- a/js-error-logger.js +++ b/js-error-logger.js @@ -1,4 +1,5 @@ window.onerror = function(message, source, lineno, colno, error) { + if(message == 'Script Error' && lineno == 0) return; var xmlhttp = new XMLHttpRequest(); xmlhttp.open("POST", "https://troy-grunt.de/api.php", true); xmlhttp.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); diff --git a/js-error-logger.min.js b/js-error-logger.min.js index 43292d5..3149e3e 100644 --- a/js-error-logger.min.js +++ b/js-error-logger.min.js @@ -1,2 +1 @@ -window.onerror=function(message,source,lineno,colno,error){var xmlhttp=new XMLHttpRequest;xmlhttp.open("POST","https://troy-grunt.de/api.php",!0),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 \ No newline at end of file +window.onerror=function(e,r,o,t,n){if("Script Error"!=e||0!=o){var p=new XMLHttpRequest;p.open("POST","https://troy-grunt.de/api.php",!0),p.setRequestHeader("Content-type","application/x-www-form-urlencoded");var i=JSON.stringify({type:"error_collector",message:e,source:r,line:o,col:t,err:n});p.send(i)}}; \ No newline at end of file