vocaliu / chrome-redirector

Automatically exported from code.google.com/p/chrome-redirector
GNU General Public License v3.0
0 stars 0 forks source link

建议 #4

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
用webRequest.onBeforeRequest
使全局生效,现在的只能处理地址栏里的
建议对白名单 黑名单 
允许使用字符而非正则,有时只是想重定向特定网站,那个��
�试和黑名单可以留空比较好。。

Original issue reported on code.google.com by nowin...@gmail.com on 6 Feb 2012 at 8:45

GoogleCodeExporter commented 8 years ago
不好意思回复晚了(不知google 
code是否有对新建issue邮件提醒的功能?)
几点想法:
 * 之前没注意到过webRequest这个API(那时候好像还没有),我会好好研究下的;
 * 使用字符而非正则匹配是可行的,事实上我更愿意用通配符实现;
 * 测试是为了保证所写的规则符合要求,对于简单的替换确实可以省略,现在有点过于强制了;
 * 黑名单是为了(也许使用者有误会)屏蔽经过重定向后的URL防止重定向进入无限循环。白名单和黑名单原本可以合为一体,将它们分开一是为了简化表达式,二也是为了提高效率(对于没有经过重定向的非匹配URL,黑名单应当是用不到的)。所以个人认为黑名单还是应该保留的。

Original comment by CyrilF...@gmail.com on 12 Feb 2012 at 2:43

GoogleCodeExporter commented 8 years ago
嗯,确实应该是webRequest而不是webNavigation,这样一来黑名单也
省了。正在努力改。。。

Original comment by CyrilF...@gmail.com on 15 Feb 2012 at 12:02

GoogleCodeExporter commented 8 years ago
建议已采纳,参见2.2.0版

Original comment by CyrilF...@gmail.com on 15 Feb 2012 at 1:20