【发布时间】:2013-12-26 02:03:02
【问题描述】:
我正在编写一个必须在特定页面中执行的脚本,具体取决于它具有的参数。网址是这样的:
http://example.com/page.php?key1=value1&key2=value2&...
当page.php 的参数中有key1=value1 时,我需要匹配它。
现在我正在使用
@match http://example.com/page.php?key1=value1&*
但如果page.php 没有其他参数则不匹配。如果key1 也不是第一个参数,它也不匹配。
有没有办法根据参数匹配页面?
【问题讨论】:
标签: javascript regex greasemonkey tampermonkey userscripts