summaryrefslogtreecommitdiff
path: root/src/static/js/pad_utils.js
diff options
context:
space:
mode:
authorJohn McLear <john@mclear.co.uk>2013-02-26 13:24:24 +0000
committerJohn McLear <john@mclear.co.uk>2013-02-26 13:24:24 +0000
commitad52b40597185bf69efc82c99b0e01edbb8ec5ee (patch)
tree6ebeb37012da692243daab3572a817bab38fd46e /src/static/js/pad_utils.js
parentb2eb1b381480d727f4ad7d2001ece661e4d497d1 (diff)
downloadetherpad-lite-ad52b40597185bf69efc82c99b0e01edbb8ec5ee.zip
post correct url, heh
Diffstat (limited to 'src/static/js/pad_utils.js')
-rw-r--r--src/static/js/pad_utils.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/static/js/pad_utils.js b/src/static/js/pad_utils.js
index ea4157bf..deee2dfd 100644
--- a/src/static/js/pad_utils.js
+++ b/src/static/js/pad_utils.js
@@ -514,18 +514,18 @@ function setupGlobalExceptionHandler() {
if (!globalExceptionHandler) {
globalExceptionHandler = function test (msg, url, linenumber)
{
- var loc = document.location;
var errorId = randomString(20);
if ($("#editorloadingbox").attr("display") != "none"){
//show javascript errors to the user
$("#editorloadingbox").css("padding", "10px");
$("#editorloadingbox").css("padding-top", "45px");
$("#editorloadingbox").html("<div style='text-align:left;color:red;font-size:16px;'><b>An error occured</b><br>The error was reported with the following id: '" + errorId + "'<br><br><span style='color:black;font-weight:bold;font-size:16px'>Please send this error message to us: </span><div style='color:black;font-size:14px'>'"
- + "ErrorId: " + errorId + "<br>URL: " + loc + "<br>UserAgent: " + navigator.userAgent + "<br>" + msg + " in " + url + " at line " + linenumber + "'</div></div>");
+ + "ErrorId: " + errorId + "<br>URL: " + window.location.href + "<br>UserAgent: " + navigator.userAgent + "<br>" + msg + " in " + url + " at line " + linenumber + "'</div></div>");
}
//send javascript errors to the server
- var errObj = {errorInfo: JSON.stringify({errorId: errorId, url: loc, msg: msg, url: url, linenumber: linenumber, userAgent: navigator.userAgent})};
+ var errObj = {errorInfo: JSON.stringify({errorId: errorId, msg: msg, url: window.location.href, linenumber: 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);