mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 23:46:14 -04:00
pad: Use a relative URL to simplify
Also avoid creating an unnecessary variable.
This commit is contained in:
parent
41d02db023
commit
93c335b3b8
1 changed files with 3 additions and 7 deletions
|
@ -512,8 +512,8 @@ function setupGlobalExceptionHandler() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
//send javascript errors to the server
|
// send javascript errors to the server
|
||||||
var errObj = {
|
$.post('../jserror', {
|
||||||
errorInfo: JSON.stringify({
|
errorInfo: JSON.stringify({
|
||||||
errorId,
|
errorId,
|
||||||
msg,
|
msg,
|
||||||
|
@ -522,11 +522,7 @@ function setupGlobalExceptionHandler() {
|
||||||
linenumber,
|
linenumber,
|
||||||
userAgent: navigator.userAgent,
|
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;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue