优化。

scripts
王良 2024-09-05 18:19:49 +08:00
parent 914ee4b9f5
commit 78eeed4143
2 changed files with 3 additions and 2 deletions

View File

@ -325,7 +325,7 @@ document.addEventListener("DOMContentLoaded", () => {
html.parentElement.insertAdjacentHTML('afterend', _html); html.parentElement.insertAdjacentHTML('afterend', _html);
if (html.parentElement.parentElement.className.indexOf('XIU2-GCP') === -1){ if (html.parentElement.parentElement.className.indexOf('XIU2-GCP') === -1){
html.parentElement.parentElement.classList.add('XIU2-GCP') html.parentElement.parentElement.classList.add('XIU2-GCP')
html.parentElement.parentElement.addEventListener('click', (e)=>{if (e.target.tagName === 'INPUT') {GM_setClipboard(e.target.value, {notification:'clone命令已复制\n' + e.target.value});}}) html.parentElement.parentElement.addEventListener('click', (e)=>{if (e.target.tagName === 'INPUT') {GM_setClipboard(e.target.value, {notificationTitle:'clone命令已复制',notification:e.target.value});}})
} }
} }
@ -353,7 +353,7 @@ document.addEventListener("DOMContentLoaded", () => {
html.parentElement.insertAdjacentHTML('afterend', _html); html.parentElement.insertAdjacentHTML('afterend', _html);
if (html.parentElement.parentElement.className.indexOf('XIU2-GCP') === -1){ if (html.parentElement.parentElement.className.indexOf('XIU2-GCP') === -1){
html.parentElement.parentElement.classList.add('XIU2-GCP') html.parentElement.parentElement.classList.add('XIU2-GCP')
html.parentElement.parentElement.addEventListener('click', (e)=>{if (e.target.tagName === 'INPUT') {GM_setClipboard(e.target.value, {notification:'clone命令已复制\n' + e.target.value});}}) html.parentElement.parentElement.addEventListener('click', (e)=>{if (e.target.tagName === 'INPUT') {GM_setClipboard(e.target.value, {notificationTitle:'clone命令已复制',notification:e.target.value});}})
} }
} }

View File

@ -647,6 +647,7 @@
// 提示设置成功 // 提示设置成功
if (info.notification !== false) { if (info.notification !== false) {
api.GM_notification({ api.GM_notification({
title: info.notificationTitle,
text: info.notification || "内容复制成功,请使用 Ctrl+V 粘贴内容吧!", text: info.notification || "内容复制成功,请使用 Ctrl+V 粘贴内容吧!",
timeout: 2000 timeout: 2000
}); });