forked from j7126/OctoPrint-Dashboard
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'translations' into dlpreplacement
- Loading branch information
Showing
13 changed files
with
2,921 additions
and
232 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// report js errors to the backend to be logged | ||
window.onerror = function (msg, url, lineNo, columnNo, error) { | ||
var message; | ||
if (msg.toLowerCase().indexOf("script error") > -1) { | ||
message = 'Script Error: See Browser Console for Detail'; | ||
} else { | ||
var message = [ | ||
'Message: ' + msg, | ||
'URL: ' + url, | ||
'Line: ' + lineNo, | ||
'Column: ' + columnNo, | ||
'Error object: ' + JSON.stringify(error) | ||
].join(' - '); | ||
} | ||
|
||
$.ajax({ | ||
url: API_BASEURL + "plugin/dashboard", | ||
type: "POST", | ||
dataType: "json", | ||
data: JSON.stringify({ | ||
command: "jsError", | ||
msg: message | ||
}), | ||
contentType: "application/json; charset=UTF-8" | ||
}); | ||
|
||
return false; | ||
}; |
Oops, something went wrong.