-
Notifications
You must be signed in to change notification settings - Fork 289
不依赖外部网站访问进行安装 + 安装页版面调整 #842
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
base: release/v1.3
Are you sure you want to change the base?
Conversation
| <h1>Script Installation</h1> | ||
| <p>This page is used as an intermediate step to install a new user script in ScriptCat.</p> | ||
|
|
||
| <h2>Script Resources</h2> | ||
| <h3 class="downloading"><div>Downloading</div><div class="loader"></div></h3> | ||
| <h3 class="error-message"></h3> | ||
|
|
||
| <h2>Remarks</h2> | ||
|
|
||
| <p>After the Script Resources Downloading is complete, this page should be automatically redirected.</p> | ||
| <p>This page is not suitable for direct viewing. If necessary, please visit Installation Script.</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
需要i18n,可以考虑再用React做一个页面
其它想法:不在 chrome.webNavigation.onBeforeNavigate.addListener 监听扩展中的这个中间页,可以直接在这里展示脚本下载进度之类,不过目前先这样即可
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
你看是把 scriptcat.org 那个抄过来,还是做一个新页面,还是结合原有 install.html 吧
结合 原有 install.html 的话就减少一层中间页。
然后 pages/install/ 里面用 history replace (或者 react 的方式)把 url 换成 uuid
好像直接用现有的 pages/install/ 再做 ?url=XXXX 的支持最好?
(把url 的东西载好后换成 uuid )
你怎么看
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
一步到位的话就是结合原有install.html页面,但是改动有点过大了,需要处理下载进度之类的问题,感觉算一个较大的功能点了,可以下一个版本(1.3)做(目前准备修修bug,发布1.2)
看看把这个PR作为草稿,后续再来处理,还是先合了,后面再提交新的PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我觉得可以,直接用现有的pages/install/,然后支持 ?url=xxxx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
你可以先发布 1.2
现在的代码应该是没问题的
这个改动留待下一次
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我觉得可以,直接用现有的pages/install/,然后支持 ?url=xxxx
ok
| // { hostEquals: "docs.scriptcat.org", pathPrefix: "/docs/script_installation/" }, | ||
| // { hostEquals: "docs.scriptcat.org", pathPrefix: "/en/docs/script_installation/" }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个规则保留吧
之前想的是依赖外部网站的话,方便更新内容,希望用户感知到文档站,用户可以进行探索 🤔 ,不过这个改动我也没有意见啦
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个规则保留吧
ok
|
PR内容有共识
1.2 或 1.3 取决于什么时候完成PR检讨。非BUG修补不急 |
0a5bed7 to
3bf890d
Compare
ba78680 to
02b9957
Compare
ddbb3f8 to
29c949c
Compare
cadb65b to
404daa7
Compare
|
顺便把 install 页面的布局问题都修了 |
32ded8d to
9eca6c4
Compare
|
@CodFrm GitHub链接问题,TM也是一个个做特殊处理。没办法。 |





概述
相关issue #621
同时也处理一下 #748 & #681 (comment) 吧 (后续补充:#876 )
以前有提过,应该不用访问外部网站进行安装 ( #705 )
现在做了一个草稿方案
展示如何实现
由于只是简单示范,所以使用了
location.replace相容现行设计( script_installation_page.html#url=... -> install.html?uuid=... )
有需要的话你也可以代码调整
你有空再看看吧
另外用 webNavigation 可以直接做 host path 比对
而且不是看 resource 所以处理量也少一点吧
(
chrome.webNavigation.onBeforeNavigate.addListener也是不用理会连网问题)那个 script_installation_page.html 是很简陋的。你有需要再改
(Arco Design, i18n 什么的)
注: 没 web_accessible_resources 的话,脚本安装点击页不能跳到 扩充的页面
另一个好处是,内部页面可以展示错误,例如无法下载脚本内容/资源之类
当然你也可以整合至 install.html, 例如 没uuid 但有 url,然后错误之类在 install.html 显示
我记得 做假uuid 是TM为了,内容改了后,uuid 不变的话,cache有两份。因此可以有两个版本的安装页开著。
看你怎么处理吧
变更内容
截图