Let's imagine you are visiting a website that utilizes JavaScript (jquery). Of course, there are some function definitions in the script. Like this one:
$(function () {
// Some necessary code here...
someObject.doSomethingUndesirable();
// Some necessary code here...
});
My problem is that I do not want that line of code to be executed. Of course I can comment out that particular line after the page is loaded, but since the script is already in memory, the modification will not work.
So my question is simple: Can I somehow interfere with the loading process and prevent the loading (and therefore execution) of a particular line of JavaScript code?