no message
Former-commit-id: 54128cef75768f9e96894cee70ab6d664f9c1f55 Former-commit-id: 58f0cef57b7ac8468c36f06c99016b774f528a93 Former-commit-id: bb87602f15c3cc6f996e0b761014b84b36a9c0e4
This commit is contained in:
@@ -1,5 +1,14 @@
|
||||
export default (quote) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
resolve()
|
||||
})
|
||||
const _quote = quote.replace(/<[^<>]+>/g, '').trim()
|
||||
const bdShareUrl = /^https:\/\/pan\.baidu\.com\/s\/[a-z0-9]+$/i
|
||||
const bdShareUrlPwd = /^链接: https:\/\/pan\.baidu\.com\/s\/[a-z0-9]+ 密码: [a-z0-9]{4}$/i
|
||||
if (bdShareUrl.test(_quote)) {
|
||||
return `<div style="color: red;">${_quote}</div>`
|
||||
} else if (bdShareUrlPwd.test(_quote)) {
|
||||
const url = _quote.match(/https:\/\/pan\.baidu\.com\/s\/[a-z0-9]+/i)
|
||||
const pwd = _quote.match(/[a-z0-9]{4}$/i)
|
||||
return `<div style="color: blue;">${url[0]} - ${pwd[0]}</div>`
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user