自动高亮 GitHub Release 推荐下载 油猴脚本 tampermonkey
前言
感谢 https://linux.do/t/topic/2397675 提供灵感
我在常见的一些多asset项目测试了一下, 效果并不好. 如:
https://github.com/2dust/v2rayN/releases
https://github.com/MetaCubeX/mihomo/releases
https://github.com/XTLS/Xray-core/releases
https://github.com/SagerNet/sing-box/releases
https://github.com/v2fly/v2ray-core/releases
那么就自己动嘴吧! (对, 不是动手, 是动嘴)
面向GPT开发
Hermes 对接 mimo-v2.5-pro
对于像这样的 github release 下载页面https://github.com/v2fly/v2ray-core/releases/tag/v5.49.0设计一个油猴脚本, 根据当前操作系统的信息, 高亮应该下载的那一行.
你自己启动浏览器测试一下
对于这样的 多版本 release 页面, 再测试一下
https://github.com/v2fly/v2ray-core/releases
对于这些页面, 都测试一下https://github.com/2dust/v2rayN/releaseshttps://github.com/MetaCubeX/mihomo/releaseshttps://github.com/XTLS/Xray-core/releaseshttps://github.com/SagerNet/sing-box/releases
这时, 脚本遇到了一个问题, release页面如果asset太长, 不会自动展开, 需要用户自己点击才会展开.
你能不能在 assets 后面加一个按钮.当用户自己想办法把 assets 完全展开后, 自己去点这个按钮.
TA自己弄出了一个功能, 监听asset列表的变化, 当asset列表发生变化时, 就启动这个查找高亮的算法. 这是意外的收获.
最后处理一下win7的场景.
对于 https://github.com/XTLS/Xray-core/releases 页面, 当 asset 中 出现 windows7 win7 等字样 时, 如果 ua 不是 windows 7 那么应该减分, 否则 应该加分.
我的 ua 是
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36' 可以作为测试环境
完
评论
发表评论