1 2 3 4 5 6 7 8 9 10 |
(function () { var annoyingpopup = window.alert; window.alert = function () { console.log(arguments); annoyingpopup('Please use console.log instead of alert'); annoyingpopup('Alerts are quite annoying when you want to test things'); annoyingpopup('And you should have Firebug up and running anyway.'); return annoyingpopup.apply(this, arguments); }; })(); |
Or, obfuscated for the people who can’t be bothered doing it themselves :
1 |
var _0x9454=["\x61\x6C\x65\x72\x74","\x6C\x6F\x67","\x50\x6C\x65\x61\x73\x65\x20\x75\x73\x65\x20\x63\x6F\x6E\x73\x6F\x6C\x65\x2E\x6C\x6F\x67\x20\x69\x6E\x73\x74\x65\x61\x64\x20\x6F\x66\x20\x61\x6C\x65\x72\x74","\x41\x6C\x65\x72\x74\x73\x20\x61\x72\x65\x20\x71\x75\x69\x74\x65\x20\x61\x6E\x6E\x6F\x79\x69\x6E\x67\x20\x77\x68\x65\x6E\x20\x79\x6F\x75\x20\x77\x61\x6E\x74\x20\x74\x6F\x20\x74\x65\x73\x74\x20\x74\x68\x69\x6E\x67\x73","\x41\x6E\x64\x20\x79\x6F\x75\x20\x73\x68\x6F\x75\x6C\x64\x20\x68\x61\x76\x65\x20\x46\x69\x72\x65\x62\x75\x67\x20\x75\x70\x20\x61\x6E\x64\x20\x72\x75\x6E\x6E\x69\x6E\x67\x20\x61\x6E\x79\x77\x61\x79\x2E","\x61\x70\x70\x6C\x79"];(function (){var _0xeca5x1=window[_0x9454[0]];window[_0x9454[0]]=function (){console[_0x9454[1]](arguments);_0xeca5x1(_0x9454[2]);_0xeca5x1(_0x9454[3]);_0xeca5x1(_0x9454[4]);return _0xeca5x1[_0x9454[5]](this,arguments);} ;} )(); |