Skip to content

Instantly share code, notes, and snippets.

@daniellmb
Last active July 12, 2020 13:30
Show Gist options
  • Save daniellmb/7ffe7da82af6ee85a665 to your computer and use it in GitHub Desktop.
Save daniellmb/7ffe7da82af6ee85a665 to your computer and use it in GitHub Desktop.

Revisions

  1. daniellmb revised this gist Feb 19, 2016. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    Automagically look up JavaScript errors on Stack Overflow :smile:
  2. daniellmb revised this gist Feb 10, 2016. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion onerror.js
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,4 @@
    window.onerror = function(message) {
    top.location.href = 'http://stackoverflow.com/search?q=' + encodeURIComponent(message + ' [js]');
    top.location.href = 'http://stackoverflow.com/search?q=' +
    encodeURIComponent(message + ' [js]');
    };
  3. daniellmb revised this gist Feb 10, 2016. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion onerror.js
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,3 @@
    window.onerror = function(message) {
    top.location.href = 'http://stackoverflow.com/search?q=' + encodeURIComponent(message + ' [js]');
    return true;
    };
  4. daniellmb revised this gist Feb 10, 2016. No changes.
  5. daniellmb created this gist Feb 10, 2016.
    4 changes: 4 additions & 0 deletions onerror.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    window.onerror = function(message) {
    top.location.href = 'http://stackoverflow.com/search?q=' + encodeURIComponent(message + ' [js]');
    return true;
    };