How can I remove script elements before they are being executed?
<p>How can I remove script elements <em>before they are being executed</em>?</p>

<p>I thought about using the DOMNodeInserted event, but apparently it doesn't catch script elements. I've also tried using the jQuery livequery plugin like that:</p>

<pre><code>$("script").livequery(function () { 
    $(this).remove();
});
</code></pre>

<p>It did remove the script element, but after it was executed.</p>

<p>I'm looking for a cross-browser solution, but I'm not even sure if that's possible. I read about <a href="http://www.w3.org/TR/dom/#mutation-observers" rel="nofollow">Mutation Observers</a> which seems close enough but I'm not sure if it can solve my problem. </p>

<p>It would be even better if there was a way to modify the script content before it is being executed without removing and recreating it. </p>
