Skip to content

Commit

Permalink
🎨 Only show errors on touchscreen
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul de Vries committed Sep 9, 2018
1 parent 4337928 commit 54e4f62
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion octoprint_touchui/static/js/touchui.bootstrap.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 7 additions & 5 deletions source/js/bootstrap.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
!function() {

// Catch errors
if (window.log && window.log.error) {
var old = window.log.error;
window.log.error = function(plugin, msg) {
window.top.postMessage([msg, ''], "*");
old.apply(window.log, arguments);
if (TouchUI.prototype.settings.isChromiumArm) {
if (window.log && window.log.error) {
var old = window.log.error;
window.log.error = function(plugin, msg) {
window.top.postMessage([msg, ''], "*");
old.apply(window.log, arguments);
}
}
}

Expand Down

0 comments on commit 54e4f62

Please sign in to comment.