2.4.7 优化过滤 新增重置任务
This commit is contained in:
@@ -307,18 +307,20 @@ const showInviteList = async () => {
|
||||
|
||||
// 复制主播 ID
|
||||
const copyAnchorId = (id) => {
|
||||
// 去除前面的 @ 符号
|
||||
const cleanId = id.startsWith('@') ? id.substring(1) : id
|
||||
if (navigator.clipboard && window.isSecureContext) {
|
||||
// 现代浏览器使用 Clipboard API
|
||||
navigator.clipboard.writeText(id).then(() => {
|
||||
navigator.clipboard.writeText(cleanId).then(() => {
|
||||
showCopySuccess()
|
||||
}).catch(err => {
|
||||
console.error('复制失败:', err)
|
||||
// 回退到传统方法
|
||||
fallbackCopyTextToClipboard(id)
|
||||
fallbackCopyTextToClipboard(cleanId)
|
||||
})
|
||||
} else {
|
||||
// 传统方法
|
||||
fallbackCopyTextToClipboard(id)
|
||||
fallbackCopyTextToClipboard(cleanId)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user