在位于本地文件系统上的html文件上运行Greasemonkey? [英] Run Greasemonkey on html files located on the local filesystem?
问题描述
我的Harddrive上有一个API文档,为了简化我的工作流程,我编写了一个简单的脚本来修改页面以满足我的需求。我在FireFox上使用FireBug开发了它。
I have an API documentation lying around on my Harddrive and to ease my workflow, I have written a simple script that modifies the page for my needs. I've developed it using FireBug on FireFox.
@include
-ing webpages正常工作,但Greasemonkey没有似乎检测到本地文件系统上的页面?
@include
-ing webpages works correctly, but Greasemonkey does not seem to detect pages on the local file-system?
我希望有一个包含像
// @include *R13/Python*R13/*
其中应匹配例如
file:///Z:/Eigene%20Dateien/Cinema4D/Documentations/R13/Python%20R13/modules/c4d/index.html
但无法识别。如何才能实现usercript在本地html文件上运行?
But it is not recognized. How can I achieve that the userscript runs on local html files, too?
提前致谢,
推荐答案
由于几个版本有两个新的隐藏首选项:
Since a couple of releases there are two new 'hidden' preferences:
greasemonkey.aboutIsGreaseable
greasemonkey.fileIsGreaseable
greasemonkey.aboutIsGreaseable
greasemonkey.fileIsGreaseable
默认值为false。如果你想让Greasemonkey在
file:/// urls上运行,你必须将第二个设置为true(在
about:config中)。
The default value is "false". If you want Greasemonkey to run on file:/// urls, you have to set the second one to "true" (in about:config).
从这里引用:
这篇关于在位于本地文件系统上的html文件上运行Greasemonkey?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!