This question already has an answer here:
I tried unsuccessfully to make a script that deletes another script on a page.
The page loads 2 scripts in <body> that I don't want to execute:
<div id="myindex">
<div class="wrap">
<div id="idone"></div>
<div id="idtwo"></div>
<script type="text/javascript"></script>
<script type="text/javascript"></script>
<script type="text/javascript"></script> //To Remove
<script type="text/javascript"></script> //To Remove
</div>
</div>
How do I block just those scripts from running?
This works splendidly with the new Greasemonkey @run-at directive!
Here is an example userscript: http://userscripts.org/scripts/show/125936
来源:https://stackoverflow.com/questions/7120626/greasemonkey-script-that-removes-or-blocks-select-javascripts