提交 32386d22 编写于 作者: A acgotaku

fix error

上级 b1fffb8e
......@@ -132,9 +132,9 @@ class Core {
const result = document.execCommand('copy')
input.remove()
if (result) {
this.showToast('拷贝成功~', 'success')
this.showToast('拷贝成功~', 'inf')
} else {
this.showToast('拷贝失败 QAQ', 'failure')
this.showToast('拷贝失败 QAQ', 'err')
}
}
// cookies format [{"url": "http://pan.baidu.com/", "name": "BDUSS"},{"url": "http://pcs.baidu.com/", "name": "pcsett"}]
......@@ -171,9 +171,9 @@ class Core {
}
this.sendToBackground('rpcData', this.generateParameter(authStr, path, rpcData), (success) => {
if (success) {
this.showToast('下载成功!赶紧去看看吧~', 'success')
this.showToast('下载成功!赶紧去看看吧~', 'inf')
} else {
this.showToast('下载失败!是不是没有开启Aria2?', 'failure')
this.showToast('下载失败!是不是没有开启Aria2?', 'err')
}
})
})
......
......@@ -25,7 +25,11 @@ class UI {
<a class="export-menu-item" id="settingButton" href="javascript:void(0);">设置</a>
</div>
</div>`
element.insertAdjacentHTML(position, menu)
if (element) {
element.insertAdjacentHTML(position, menu)
} else {
return
}
const exportMenu = this.context.querySelector('#exportMenu')
exportMenu.addEventListener('mouseenter', () => {
exportMenu.classList.add('open-o')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册