This page is loaded as a part of the ShowJavascriptErrors gadget, used by 4,405 users.
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
// This only shows alerts for things after this handler is installed of course.// Because this is a gadget, error reporting can thus be inconsistent.varoriginalErrorHandler=window.onerror||null;// Column and error args are optionalwindow.onerror=function(message,url,line,colomn,error){var$msg=$('<p>');if(url){$('<span>').text(url+' at line '+line+': ').appendTo($msg);}$('<span>').text(message).appendTo($msg);mw.notify($msg,{autoHide:true,autoHideSeconds:10,tag:null,title:'Javascript Error',type:'error'});if(originalErrorHandler){returnoriginalErrorHandler.apply(this,arguments);}};// unbind on leaving the page$(window).on('unload',function(){window.onerror=originalErrorHandler;});