I have a script that I can\'t change that makes a lot of console.log calls. I want to add another layer and respond if the calls contain certain strings. This works in FF, b
With ES6 new spread operator you can write it like this
(function () { var log = console.log; console.log = function () { log.call(this, 'My Console!!!', ...arguments); }; }());