Created
July 2, 2018 21:37
-
-
Save Vftdan/b7e9ae34033a7f8421d3c1e1f23586e9 to your computer and use it in GitHub Desktop.
Open stackoverflow after error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.onerror = function(msg) { | |
msg = msg.replace(/^Uncaught /, ''); | |
if(confirm('Search?\n' + msg)) { | |
window.open('//stackoverflow.com/search?q=' + encodeURIComponent(msg), '_blank'); | |
window.onerror = null; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment