From d6fe1591a0445c137426b4f7755819df3680e335 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Mon, 23 Oct 2023 14:56:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20[=E4=B8=80=E9=94=AE?= =?UTF-8?q?=E5=A4=8D=E5=88=B6=E6=89=80=E6=9C=89=20IP]=20=E5=9C=A8=E4=B8=AA?= =?UTF-8?q?=E5=88=AB=E6=83=85=E5=86=B5=E4=B8=8B=E4=BC=9A=E5=A4=8D=E5=88=B6?= =?UTF-8?q?=E5=88=B0=E9=9D=9E=20IP=20=E5=86=85=E5=AE=B9=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ping.Sx-Enhanced.user.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Ping.Sx-Enhanced.user.js b/Ping.Sx-Enhanced.user.js index 0e95580..ba773f6 100644 --- a/Ping.Sx-Enhanced.user.js +++ b/Ping.Sx-Enhanced.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name Ping.Sx 增强 -// @version 1.0.1 +// @version 1.0.2 // @author X.I.U // @description 一键复制所有 IP、清理 IP 链接(点击复制而不是跳转)、快捷回到顶部(右键两侧空白处) // @match https://ping.sx/ping* @@ -43,12 +43,12 @@ // 复制按钮点击事件 function addCopyButtonEvent1() { let ip = new Array(); - document.querySelectorAll('span.select-all:first-child').forEach(function(_this) {ip.push(_this.innerText);}) + document.querySelectorAll('span.select-all > a[href]').forEach(function(_this) {ip.push(_this.innerText);}) if (ip.length > 0) GM_setClipboard(unique(ip).toString().replaceAll(',','\n'), 'text'); } function addCopyButtonEvent2() { let ip = new Array(); - document.querySelectorAll('span.select-all:first-child').forEach(function(_this) { + document.querySelectorAll('span.select-all > a[href]').forEach(function(_this) { let img = findParentElement(_this, 'TR').querySelector('img.max-w-none'); if (img) {if (img.alt != 'CN Flag') ip.push(_this.innerText);} }) @@ -113,6 +113,7 @@ if (this.value) { this.value = this.value.replace(/(http:\/\/|https:\/\/|\:.+|\/.*)/ig,""); this.setAttribute('value',this.value); + this.dispatchEvent(new Event('input')); } }, true);*/ })(); \ No newline at end of file