mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-18 22:43:00 +08:00
Update 50_luci-quickstart
This commit is contained in:
1 parent
d025b02635
commit
1eaec71448
1 file changed
+5
-3
@@ -6,9 +6,11 @@ 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"]})/
|
||||
# 2. 主题模式通过 html 标签 data-*-mode 判断默认选 dark 或 light,否则默认跟随系统(system)
|
||||
s/document\.body\.getAttribute\("theme"\)/(Array.from(document.documentElement.attributes).find(a=>\/^data-.*-mode$\/.test(a.name))||{}).value/
|
||||
s/an=Ed\(\)\|\|ri\(\)/an=ri()/
|
||||
s/\([^()]*\.matches\)!=null\?[^:]*:window\.matchMedia\([^)]*\)\.matches/document.documentElement.dataset.darkmode!=null?document.documentElement.dataset.darkmode==="true":&/
|
||||
s/\((Ld)\),[a-zA-Z0-9_$]+\.observe\(document\.body,\{attributes:!0,attributeFilter:\["theme"\]\}\)/(m=>{m.some(r=>\/^data-.*-mode$\/.test(r.attributeName))\&\&\1(),m.some(r=>r.attributeName==="data-darkmode")\&\&Dd()}),wl.observe(document.documentElement,{attributes:!0})/
|
||||
|
||||
# 3. 去除网络连接卡片中的软件源检测与配置
|
||||
s/[a-zA-Z0-9_$]+\.networkInfo/&==="softSourceFailed"?"netSuccess":&/
|
||||
|
||||
Reference in new issue
Block a user