Skip to content

Instantly share code, notes, and snippets.

@stormbreakers
Forked from daniellmb/onerror.js
Created February 11, 2016 06:30
Show Gist options
  • Save stormbreakers/c500b994eb5805b350a1 to your computer and use it in GitHub Desktop.
Save stormbreakers/c500b994eb5805b350a1 to your computer and use it in GitHub Desktop.
Automagically look up JavaScript errors on Stack Overflow ;-)
window.onerror = function(message) {
top.location.href = 'http://stackoverflow.com/search?q=' +
encodeURIComponent(message + ' [js]');
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment