阅读:3993回复:9
请问UC脚本可以设定为指定网站才启动吗?
如题,前两天用了GOLF-AT老兄的一个UC脚本Open_link_in_tab,好像全局监听鼠标点击函数,当网页符合条件就执行新标签页打开。这样的脚本能不能只在特定的网页才执行监听呢?是不是类似的脚本太多会加重FF的负担?有人能给我讲讲吗?
|
|
1楼#
发布于:2011-04-20 16:21
如果是使用UC扩展的话,可以使用:
@include / @exclude |
|
2楼#
发布于:2011-04-20 16:21
谢谢楼上的老兄,请问我怎么看这些脚本有没有被调用呢?还有这些脚本用什么可以debug呢?
|
|
3楼#
发布于:2011-04-20 16:21
|
|
|
4楼#
发布于:2011-04-20 16:21
谢谢啊,那debug呢?
|
|
5楼#
发布于:2011-04-20 16:21
|
|
6楼#
发布于:2011-04-20 16:21
GOLF-AT: 我用的是UC扩展,说是可以,我也没试过。 链接:https://addons.mozilla.org/zh-CN/firefox/addon/uc/ uc is a Firefox extension that allows you to run arbitrary local scripts in chrome windows. In short, userChromeJS + subscriptoverlayloader.js. usage Choose script paths and depths in options (Tools -> uc) to autoload according to their meta data block. If directory, all *.uc.{js,xul,css} files below it up to specified depth are loaded. If depth is 0, the path is ignored. The default setting has a single <UChrm> meaning that it loads the chrome directory in your current profile as does subscriptoverlayloader. Note that userChrome.js isn't loaded. supported metadata The syntax is roughly identical to Greasemonkey's. @name The script name. @include / @exclude The URL onto which this script is/isn't loaded. * are wildcards. If prefixed with ~, the rest is treated as regular expression pattern. (example) @require Accepts a script URL and loads it beforehand. The URL can be absolute or relative, but must be local. Will not load the same script twice for a window. @delay The delay before overlay in milliseconds. XUL only. @(whatever) All other meta data are stored simply as text data. UC object defined in each window keeps them. improvements from userChromeJS + subscriptoverlayloader.js Lets you specify files/directories to load. Targets subwindows as well, such as about:config or the sidebar UIs. Reads meta data only when necessary--on startup or on script update. Regex in @include/@exclude. @require drawbacks Runs on Firefox 3.5+ only. Scamps workaround for http://bugzil.la/330458. |
|
7楼#
发布于:2011-04-20 16:21
uc,新出的一个扩展,在 userChromeJS 基础上修改的。我想大多数人用的是 userChromeJS 扩展,不能使用 @include / @exclude。
|
|
8楼#
发布于:2011-04-20 16:21
|
|
9楼#
发布于:2011-04-20 16:21
|
|