Skip to content

Instantly share code, notes, and snippets.

@toolmantim
Forked from pschyska/main.js
Last active December 15, 2015 06:39
Show Gist options
  • Save toolmantim/5217447 to your computer and use it in GitHub Desktop.
Save toolmantim/5217447 to your computer and use it in GitHub Desktop.
// Configure accordingly
window._crashmat = {key:'abc123'};
// Capture errors
(function(w, cm, woe) {
w.onerror = function(e,f,l,c) {
cm.e = cm.e || []; cm.e.push([e,f,l,c]);
if (woe) woe(e,f,l,c);
};
})(window, window._crashmat, window.onerror);
// Load https://db2uk9yp28y61.cloudfront.net/ via AMD or your loader of choice
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment