Skip to content

Commit

Permalink
surge & qunx - 优化获取cookie通知格式
Browse files Browse the repository at this point in the history
  • Loading branch information
chavyleung committed Dec 28, 2019
1 parent 4783fd6 commit e10ab0b
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions neteasemusic/neteasemusic.cookie.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ const cookieVal = $request.headers['Cookie']
if (cookieVal) {
let cookie = $persistentStore.write(cookieVal, cookieKey)
if (cookie) {
let msg = `Cookie [${cookieName}] 写入成功!`
$notification.post(msg, '', '详见日志')
let msg = `${cookieName}`
$notification.post(msg, 'Cookie写入成功', '详见日志')
console.log(msg)
console.log(cookieVal)
}
Expand Down
4 changes: 2 additions & 2 deletions neteasemusic/quanx/neteasemusic.cookie.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ const cookieVal = $request.headers['Cookie']
if (cookieVal) {
let cookie = $prefs.setValueForKey(cookieVal, cookieKey)
if (cookie) {
let msg = `Cookie [${cookieName}] 写入成功!`
$notify(msg, '', '详见日志')
let msg = `${cookieName}`
$notify(msg, 'Cookie写入成功', '详见日志')
console.log(msg)
console.log(cookieVal)
}
Expand Down
8 changes: 4 additions & 4 deletions tieba/quanx/tieba.cookie.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ const cookieVal = $request.headers['Cookie']
if (cookieVal.indexOf('BDUSS') > 0) {
let cookie = $prefs.setValueForKey(cookieVal, cookieKey)
if (cookie) {
let msg = `Cookie [${cookieName}] 写入成功!`
$notify(msg, '', '详见日志')
let msg = `${cookieName}`
$notify(msg, 'Cookie写入成功', '详见日志')
console.log(msg)
console.log(cookieVal)
}
} else {
let msg = `Cookie [${cookieName}] 获取失败!`
let msgDetail = `请确保在已登录状态下获取Cookie`
let msg = `${cookieName}`
let msgDetail = `获取失败: 请确保在已登录状态下获取Cookie`
$notify(msg, '', msgDetail)
console.log(`${msg}, ${msgDetail}`)
console.log(cookieVal)
Expand Down
8 changes: 4 additions & 4 deletions tieba/tieba.cookie.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ const cookieVal = $request.headers['Cookie']
if (cookieVal.indexOf('BDUSS') > 0) {
let cookie = $persistentStore.write(cookieVal, cookieKey)
if (cookie) {
let msg = `Cookie [${cookieName}] 写入成功!`
$notification.post(msg, '', '详见日志')
let msg = `${cookieName}`
$notification.post(msg, 'Cookie写入成功', '详见日志')
console.log(msg)
console.log(cookieVal)
}
} else {
let msg = `Cookie [${cookieName}] 获取失败!`
let msgDetail = `请确保在已登录状态下获取Cookie`
let msg = `${cookieName}`
let msgDetail = `获取失败: 请确保在已登录状态下获取Cookie`
$notification.post(msg, '', msgDetail)
console.log(`${msg}, ${msgDetail}`)
console.log(cookieVal)
Expand Down
4 changes: 2 additions & 2 deletions v2ex/quanx/v2ex.cookie.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ const cookieVal = $request.headers['Cookie']
if (cookieVal) {
let cookie = $prefs.setValueForKey(cookieVal, cookieKey)
if (cookie) {
let msg = `Cookie [${cookieName}] 写入成功!`
$notify(msg, '', '详见日志')
let msg = `${cookieName}`
$notify(msg, 'Cookie写入成功', '详见日志')
console.log(msg)
console.log(cookieVal)
}
Expand Down
4 changes: 2 additions & 2 deletions v2ex/v2ex.cookie.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ const cookieVal = $request.headers['Cookie']
if (cookieVal) {
let cookie = $persistentStore.write(cookieVal, cookieKey)
if (cookie) {
let msg = `Cookie [${cookieName}] 写入成功!`
$notification.post(msg, '', '详见日志')
let msg = `${cookieName}`
$notification.post(msg, 'Cookie写入成功', '详见日志')
console.log(msg)
console.log(cookieVal)
}
Expand Down

0 comments on commit e10ab0b

Please sign in to comment.