Github Release Highlighter Userscript for OS Detection

Preface

Thanks to https://linux.do/t/topic/2397675 for the inspiration
I tested it on some common multi-asset projects, and the effect wasn't great. Such as:
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
Then I'll do it myself! (Yes, not with hands, but with mouth)

Agent-oriented development

Hermes connects to mimo-v2.5-pro

The content inside the quote boxes below is all natural language I sent to the Agent
对于像这样的 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/releases
https://github.com/MetaCubeX/mihomo/releases
https://github.com/XTLS/Xray-core/releases
https://github.com/SagerNet/sing-box/releases
At this point, the script encountered a problem: if the assets on the release page are too long, they won't expand automatically, and the user has to click to expand them.
你能不能在 assets 后面加一个按钮.
当用户自己想办法把 assets 完全展开后, 自己去点这个按钮.

It came up with a feature on its own: it monitors changes in the asset list, and when the asset list changes, it runs the highlight search algorithm. This was an unexpected gain.

Finally, handle the Win7 scenario.

对于 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' 可以作为测试环境
End

Github


Demo video


========

See also


Comments