pad: Use a relative URL to simplify

Also avoid creating an unnecessary variable.
pull/4519/head
Richard Hansen 2020-11-17 00:40:21 -05:00 committed by John McLear
parent 41d02db023
commit 93c335b3b8
1 changed files with 3 additions and 7 deletions

View File

@ -512,8 +512,8 @@ function setupGlobalExceptionHandler() {
});
}
//send javascript errors to the server
var errObj = {
// send javascript errors to the server
$.post('../jserror', {
errorInfo: JSON.stringify({
errorId,
msg,
@ -522,11 +522,7 @@ function setupGlobalExceptionHandler() {
linenumber,
userAgent: navigator.userAgent,
}),
};
var loc = document.location;
var url = loc.protocol + "//" + loc.hostname + ":" + loc.port + "/" + loc.pathname.substr(1, loc.pathname.indexOf("/p/")) + "jserror";
$.post(url, errObj);
});
return false;
};