🍕 Sync 2026-11-16 20:45:17

This commit is contained in:
github-actions[bot] committed 2026-11-16 20:45:17 +08:00
1 parent 4d23fe6540
commit 7f744be43c
30 files changed
+438 -127

No files matched your search

@@ -0,0 +1 @@
{"format":1,"generation":"545a71cd9c5bdc924d7d7867f5d5e23b","revision":8,"value":{"schemaVersion":1,"favorites":["tool-lan","tool-terminal","tool-dns","tool-logs","user-link:5003daec5641e204420013e750150e9e","user-link:13a8e5876d6008338be2dee039e0baa2","user-link:4893754702b4ca474fb313d18ac307e8","user-link:ab7eeeda3ec5045e7a287ebf3b69c066"],"links":[{"id":"user-link:5003daec5641e204420013e750150e9e","name":"固件定制下载","url":"https://openwrt.ai","glyph":"download"},{"id":"user-link:13a8e5876d6008338be2dee039e0baa2","name":"设置向导","url":"http://localhost/cgi-bin/luci/admin/system/wizard","glyph":"globe"},{"id":"user-link:4893754702b4ca474fb313d18ac307e8","name":"文件管理","url":"http://localhost/cgi-bin/luci/admin/system/footstrap-files","glyph":"folder"},{"id":"user-link:ab7eeeda3ec5045e7a287ebf3b69c066","name":"备份与更新","url":"http://localhost/cgi-bin/luci/admin/system/flash","glyph":"layers"}]},"migration":{"exists":false,"diableDisplay":[]}}
@@ -1,4 +1,28 @@
#!/bin/sh
APP_JS="/www/luci-static/quickstart/app.js"
sed -i -E '
# 1. 去除首页顶部 iStoreOS官网
s/[^[]*\("iStoreOS官网","iStoreOS website"\)\),1\),//
# 2. 主题跟随系统判断 html[data-darkmode="true"] 并监听属性变化
s/\([^()]*\.matches\)!=null\?[^:]*:window\.matchMedia\([^)]*\)\.matches/document.documentElement.dataset.darkmode==="true"/
s/\.addEventListener\("change",([^)]+)\)/&,(new MutationObserver(\1)).observe(document.documentElement,{attributes:!0,attributeFilter:["data-darkmode"]})/
# 3. 去除网络连接卡片中的软件源检测与配置
s/[a-zA-Z0-9_$]+\.networkInfo/&==="softSourceFailed"?"netSuccess":&/
s/,"softSourceFailed"|,softSourceFailed:\[[^]]*\]|:[^:?]*==="softSourceFailed"\?"source"//g
# 4. 彻底移除软件源配置(tool-source)入口与“恢复默认八项”按钮
s/,\{id:"tool-source"[^}]*\}|,"tool-source"//g
s/get favorites\(\)\{return ([^}]*\.favorites)\}/get favorites(){return \1.filter(y=>y!=="tool-source")}/
s/,[a-zA-Z0-9_$]+\("button",\{[^}]*"data-shortcut-restore":""\},[^}]*\("恢复默认八项","Restore eight defaults"\)\),1\)//
# 5. 自定义链接支持 / 开头的绝对路径(保存时转为 http://localhost/... 以通过后端校验,展示与跳转时还原为 /...)
s/!\/\^https\?:\\\/\\\/\/\.test\(([a-zA-Z0-9_$]+\.url)\)/(\/^\\\/(?!\\\/)\/.test(\1)\&\&(\1="http:\/\/localhost"+\1),&)/
s/path:([a-zA-Z0-9_$]+\.url),/path:\1.replace(\/^http:\\\/\\\/localhost(?=\\\/)\/,""),/
' "$APP_JS"
rm -f /tmp/luci-indexcache /tmp/luci-indexcache.*
exit 0