Error Handling
by XTREME104
HTML
<script>
window.onerror = function (message, url, line, char) {
var errordiv = document.createElement('div');
errordiv.innerHTML = "<style>@-webkit-keyframes alert { from { -webkit-transform: scale3d(0.1,0.1,1); } 55% { -webkit-transform: scale3d(1.08,1.08,1); } 75% { -webkit-transform: scale3d(0.95,0.95,1); } to { -webkit-transform: scale3d(1,1,1); } } @-webkit-keyframes minimise { from { -webkit-transform: scale3d(1,1,1); } to { -webkit-transform: scale3d(0.1,0.1,1); } } div#alertdiv { -webkit-animation-name: minimise; } div#overlay:target { -webkit-animation: alert 500ms linear; } div#alertdiv button { margin-top: 10px; height: 36px; width: 100%; background: -webkit-gradient(linear, left top, left bottom, from(#BBBBDD), color-stop(50%,#666688), color-stop(50%,#333366), to(#444477)); color: white; font-weight: bold; border-radius: 7px; border: none; } div#alertdiv button:hover { background: -webkit-gradient(linear, left top, left bottom, from(#9999BB), color-stop(50%,#555577), color-stop(50%,#222244), to(#333355)); } div#alertdiv button:active { background: -webkit-gradient(linear, left top, left bottom, from(#777799), color-stop(50%,#333355), color-stop(50%,#111122), to(#222233)); }</style><div id='overlay' style='position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 10000; -webkit-transition: opacity 500ms ease-in; -moz-transition: opacity 500ms ease-in; transition: opacity 500ms ease-in;'><div id='alertdiv' style='position: absolute; margin: 25% 25%; min-height: 50px; max-height: 70%; width: 50%; background: -webkit-gradient(radial, 50% -140%, 0, 50% -140%, 300, from(white), to(blue)); color: white; text-shadow: 0 -1px 0 black; font-family: Helvetica-neue, Helvetica; text-align: center; border: 2px solid lightgray; border-radius: 10px; padding: 10px; box-shadow: 0 3px 8px rgba(0,0,0,0.9); -webkit-animation: alert 500ms ease-in;'><p style='font-weight: bold;'>JavaScript Error<\/p><p style='font-weight:...