1

Suppose we get to a site and in its scripts has the Self-Executing Anonymous Function like this:

(function(){
    var item = 1;
    setInterval(function(){
    document.getElementById("test").innerText = String(++item);
    console.log("this is test");
    },5000)
})();

and i want to override it by browser console to something like this:

(function(){
    var item = 1;
    /*setInterval(function(){
    document.getElementById("test").innerText = String(++item);
    console.log("this is test");
    },5000)*/
})();

(or delete it)... this is possible for regular function that have name but when i try it for Self-Executing Anonymous Function , a new function created and doesn't override anything...how can i override it?

sami
  • 19
  • 1
  • 9

0 Answers0