Greasemonkey脚本在每个网站上运行 [英] Greasemonkey script is running on every web site
本文介绍了Greasemonkey脚本在每个网站上运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我设置了仅在一个网站上包含的oilmonkey脚本:
I set a greasemonkey script to be included on only one web site:
http://example.com/*
但是我也在每个网站上都运行它. 我删除了它,并仅添加了1个include就再次添加了它,但它仍在每个页面上运行,我该怎么办?
but it's running on every web site I go too.. I removed it and added it again with only 1 include but it's still running on every page, what could I be doing wrong?
推荐答案
这通常是由格式错误的元数据块引起的.
This is usually caused by a malformed metadata block.
一定不能有前导空格,并且指令(通常)是区分大小写的.
There must be no leading space and directives are (usually) case-sensitive.
好:
// ==UserScript==
// @name YOUR_SCRIPT_NAME
// @include http://YOUR_SERVER.COM/YOUR_PATH/*
// ==/UserScript==
坏:
// ==UserScript==
// @name YOUR_SCRIPT_NAME
// @include http://YOUR_SERVER.COM/YOUR_PATH/*
// ==/UserScript==
坏:
//==UserScript==
//@name YOUR_SCRIPT_NAME
//@include http://YOUR_SERVER.COM/YOUR_PATH/*
//==/UserScript==
坏:
// ==UserScript==
// @name YOUR_SCRIPT_NAME
// @INCLUDE http://YOUR_SERVER.COM/YOUR_PATH/*
// ==/UserScript==
等
此外,脚本选项可以覆盖元数据块中的内容.检查它们,或者只是卸载并重新安装脚本.
Also the script options can override what is in your metadata block. Check them or just uninstall and reinstall the script.
这篇关于Greasemonkey脚本在每个网站上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文