i made this code to overwite all the window function and put a console.log after the function run but it giving me error what is the prob??
Uncaught TypeError: Not enough arguments
for (func in window) {
if (typeof window[func] === 'function' && typeof window[func] != 'undefined') {
var s = window[func];
window[func] = function (a) {
s(a);
console.log(func);
}
}
}
alert("hehe");