Skip to content

Commit 5663b89

Browse files
Surge 面板转Stash 磁贴的时候如果没有color值会默认设为 #5d84f8
1 parent c27b24d commit 5663b89

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Rewrite-Parser.beta.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,7 @@ if (binaryInfo != null && binaryInfo.length > 0) {
822822
updatetime = getJsInfo(x, /[=,\s]\s*script-update-interval\s*=\s*/)
823823
timeout = getJsInfo(x, /[=,\s]\s*timeout\s*=\s*/)
824824
tilesicon = jstype == 'generic' && /icon=/.test(x) ? x.split('icon=')[1].split('&')[0] : ''
825-
tilescolor = jstype == 'generic' && /icon-color=/.test(x) ? x.split('icon-color=')[1].split('&')[0] : ''
825+
tilescolor = jstype == 'generic' && /icon-color=/.test(x) ? x.split('icon-color=')[1].split('&')[0] : '#5d84f8'
826826
if (nCron != null && jstype != 'cron') {
827827
for (let i = 0; i < nCron.length; i++) {
828828
let elem = nCron[i].trim()
@@ -966,7 +966,7 @@ if (binaryInfo != null && binaryInfo.length > 0) {
966966
wakesys: '1',
967967
timeout: '120',
968968
ori: x,
969-
num: y,
969+
num: y
970970
})
971971
} //qx cron 脚本解析结束
972972

Rewrite-Parser.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,7 @@ if (binaryInfo != null && binaryInfo.length > 0) {
822822
updatetime = getJsInfo(x, /[=,\s]\s*script-update-interval\s*=\s*/)
823823
timeout = getJsInfo(x, /[=,\s]\s*timeout\s*=\s*/)
824824
tilesicon = jstype == 'generic' && /icon=/.test(x) ? x.split('icon=')[1].split('&')[0] : ''
825-
tilescolor = jstype == 'generic' && /icon-color=/.test(x) ? x.split('icon-color=')[1].split('&')[0] : ''
825+
tilescolor = jstype == 'generic' && /icon-color=/.test(x) ? x.split('icon-color=')[1].split('&')[0] : '#5d84f8'
826826
if (nCron != null && jstype != 'cron') {
827827
for (let i = 0; i < nCron.length; i++) {
828828
let elem = nCron[i].trim()
@@ -966,7 +966,7 @@ if (binaryInfo != null && binaryInfo.length > 0) {
966966
wakesys: '1',
967967
timeout: '120',
968968
ori: x,
969-
num: y,
969+
num: y
970970
})
971971
} //qx cron 脚本解析结束
972972

0 commit comments

Comments
 (0)