How to remove all scripts in page, even those attached to events and timers?
<p>I am experimenting with JavaScript &amp; I can't seem to understand simple behavior. What I want to do, is to disable absolutely any JS that was before the following code snippet:</p>

<pre><code>void (function(){
    (function prepare(name){ 
        var elements = document.getElementsByTagName(name);
        for(var i = elements.length; i--;)
            elements[i].parentNode.removeChild(elements[i]);
        return prepare;
    }('script'));
}());
</code></pre>

<p><strong>NOTE Marcel Korpel</strong>: indenting inserted for readability, but you should paste this as one line-of-code in the address bar.</p>

<p>The following code theoretically should disabled all the JS on the page, right? To test it, you can execute it via <code>javascript: [..]</code> when the page is fully loaded. FireBug HTML will show that all scripts are removed. However, there were things in code like <code>setTimeout</code>, <code>setInterval</code>, binding specific actions, on click events, etc. and they still work even after the code is executed.</p>

<p>Is there a way to completely remove all of this after the script is executed?</p>
