Skip to content

Instantly share code, notes, and snippets.

@mattdrees
Last active January 2, 2016 15:09
Show Gist options
  • Save mattdrees/8322042 to your computer and use it in GitHub Desktop.
Save mattdrees/8322042 to your computer and use it in GitHub Desktop.
a script to initialize Errbit reporting in staffweb. To be included via a `<script>` in `<head>`.
(function(callback) {
var ab = document.createElement('script');
ab.type = 'text/javascript'; ab.async = true;
ab.onload = ab.onreadystatechange = callback;
ab.src = "https://errors.uscm.org/javascripts/notifier.js";
var p = document.getElementsByTagName('script')[0];
p.parentNode.insertBefore(ab, p);
}(function () {
Airbrake.setHost('errors.uscm.org');
Airbrake.setKey('xxxxxxxxxxxxxxxxxxx');
Airbrake.setEnvironment('production');
Airbrake.setErrorDefaults({
url: document.URL
});
Airbrake.setGuessFunctionName(true);
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment