2010-11-19 35 views

回答

2

因为在KRL网络事件的SELECT语句,你可以使用下面的select语句火上查看所有页面的正则表达式:

select when web pageview ".*" 

完全规则集的情况下示例

ruleset a60x425 { 
    meta { 
    name "test select on all pages" 
    description << 
     this will select on all pageviews 
    >> 
    author "Mike Grace" 
    logging on 
    } 

    dispatch { } 

    rule selection_test_on_all_pages { 
    select when web pageview ".*" 
    { 
     notify("I selected on this page!","woot!") with sticky = true; 
    } 
    } 
} 

注1:这没有解决调度域和浏览器扩展的问题。这将从小书签执行时按预期工作。除非当前查看的域与分派块中设置的域匹配,否则浏览器扩展将不会使其成为选择表达式。这个示例调度域是空白的,因为我假定应用程序将从书签小程序运行。

注2:选择表达式被编译成一个正则表达式,所以重要的是要记住,不需要像表达式那样使用're //'格式,就像在其他地方使用正则表达式的语言一样。

+0

哦,好的。感谢你的回答。 :) – Alex 2010-11-19 21:04:41

2
select when pageview ".*" 
+0

感谢您的回答。 :) – Alex 2010-11-19 21:05:06