Greasemonkey脚本,用于删除或阻止选择JavaScripts [英] Greasemonkey script that removes or blocks select JavaScripts

查看:165
本文介绍了Greasemonkey脚本,用于删除或阻止选择JavaScripts的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试制作一个删除页面上其他脚本的脚本失败了。

I tried unsuccessfully to make a script that deletes another script on a page.

该页面在< body> <中加载2个脚本/ code>我不想执行:

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?

推荐答案

这与新的Greasemonkey @ run-at指令一起出色地工作!

This works splendidly with the new Greasemonkey @run-at directive!

这是一个用户示例:
http://userscripts.org/scripts/show/125936

这篇关于Greasemonkey脚本,用于删除或阻止选择JavaScripts的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆