-
Notifications
You must be signed in to change notification settings - Fork 10
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
【填坑中】更换脚本设置界面为webview #169
Draft
segfault-bilibili
wants to merge
16
commits into
icegreentee:master
Choose a base branch
from
segfault-bilibili:webview
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
现在只是可以在新旧界面之间切换,新界面还没真正开始适配。
目前打算先适配好UI,再尝试把floatUI.js拆分成模块。
autoWebview在这里添加为git子模块(不是脚本里的模块,就是git的submodule),现在还是指向我的仓库,以后可以改。而且我打算不再忽略autoWebview在跑完
npm run build
之后保存在dist
子目录里的结果,已经从.gitignore
里去掉了,打算直接把他提交上传,然后就可以走JSDelivr下载。(不知道这个行为是否妥当?)以后拆分成模块之后,应该还是不能按需加载模块,主要是因为即便拆分出模块来,模块之间也存在依赖关系。而且检测root权限、截屏权限、刘海屏参数之类的还是需要在脚本启动的时候做,需要保存一个状态(尤其是截屏权限,因为AutoJS本身的蛋疼限制,
requestScreenCapture
申请截屏权限不能调用第二次)。大概的填坑方向:
main.js
负责(读取本地文件,而不是从WebView端直接把函数代码传过来)加载所有模块(旧版设置界面则分离到独立的settingsUI
模块里去)、然后继续开启设置界面、悬浮窗,再接受callAJ来更新参数。启动/停止脚本还是像现在这样由悬浮窗负责管理(蓝色启动按钮,或黄色按钮开启脚本临时选择菜单)。main.js
里优先让Webview使用本地的file:
协议URL,加载本地的网页,如果本地没有网页文件(比如刚刚从旧版在线更新上来)就用在线的URL,然后就可以在线更新了。我不打算把AutoJS端执行的脚本跟Webview搞到一起,因为: