User:WikiaBot/global.js

/** * Ajax Error Logger * * @author M.Uttula * @version 2006/04/11 - v0.1 - (M.Uttula) Initial revision */

YAHOO.log('onError init');

window.onerror = function (msg, url, lno) { YAHOO.log('onError event');

var img = new Image;

var data = ""; data += ((data != "") ? "&" : "") + encodeURIComponent('ael_msg') + "=" + encodeURIComponent(msg); data += ((data != "") ? "&" : "") + encodeURIComponent('ael_url') + "=" + encodeURIComponent(url); data += ((data != "") ? "&" : "") + encodeURIComponent('ael_lno') + "=" + encodeURIComponent(lno); data += '&location=' + encodeURIComponent(document.location); data += '&rand=' + Math.random; // prevent caching data = 'http://ws2.poz.wikia-inc.com/lukasz/ael.php?' + data;

img.src = data;

return false; }