-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
几点易用性改进和功能性改进建议 #27
Comments
作者消失太久了…… |
@ivysrono 诶,我看上次活动还是3个月前啊 |
@ivysrono 回到redirect,仔细想想,某些重定向可能还需要使用特定的cookie才能完成任务,从这个角度来说这个扩展添加http header的修改功能也是合理的。 希望能够继续维护呀 @fengyc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
易用性改进
重复申请 希望添加几个功能 #23 中的以下需求
URL Encode 和 URL Decode 功能,很多跳转链接 encode 了目标链接

具体实现可以参考Redirector
自动测试规则是否匹配
Redirector即为自动测试,十分方便
该界面为用户输入界面,自动检测规则强度不会很高,一般不会产生性能问题
在左侧勾选上的规则和禁用的规则用不同的颜色加以区分

建议已禁用规则用灰色或其他淡色表示,以下为Redirector中的示例
排序按钮很小并且没有对中,按起来稍有不便,而且看起来不爽。建议增加按钮尺寸及所在单元格的覆盖率


当前样式
改动后样式(示例)
和上一条类似,winform风格的规则复选框很小,按起来很别扭,希望采用更加metro风格的较大的复选框,如果可以的话最好可以整行选择。另外截图中也有禁用规则变灰色的样式示例



当前样式
更大的复选框,灰色区分的禁用规则
整行选择的示例(百度网盘)
功能性改进
confirm("你有未保存的改动,如果离开页面这些改动将丢失\n是否继续?")
)保存成功
标签或Notification通知)(src_uri)=>{return dst_uri}
说明一下,这是Mason及其某个改版所增加的功能,因为在某些特殊情况下,仅靠正则的反向引用无法或者难以完成所需的重定向操作。
假设需求将
abc.com/f-{x}.html
重定向到abc.com/f-{y}.asp
,其中{x}
,{y}
为相关但不相同的字符串。例如y=x+4
,需要将abc.com/f-14.html
重定向到abc.com/f-18.html
,该操作无法简单以正则表达式完成。若目标地址接受一个接收并返回一个字符串的函数,则很容易能够解决。例如,上述需求,只需在“目标地址”内填入
href=>{let fid=href.match(/-(\d+)/)[1];return href.replace(fid, parseInt(fid)+4);}
题外话
话说这个扩展地址里填的究竟是通配符还是正则表达式?似乎能够识别一些正则语法,但是又不强制要求转义特殊字符?原来直接从界面里得到的regex会自动转义
/
之类的符号,只需要像字面regex一样写就可以了。The text was updated successfully, but these errors were encountered: