diff --git a/Ping.Sx-Enhanced.user.js b/Ping.Sx-Enhanced.user.js index 164e88c..a82c184 100644 --- a/Ping.Sx-Enhanced.user.js +++ b/Ping.Sx-Enhanced.user.js @@ -1,6 +1,6 @@ // ==UserScript== // @name Ping.Sx 增强 -// @version 1.0.0 +// @version 1.0.1 // @author X.I.U // @description 一键复制所有 IP、清理 IP 链接(点击复制而不是跳转)、快捷回到顶部(右键两侧空白处) // @match https://ping.sx/ping* @@ -8,6 +8,7 @@ // @match https://ping.sx/check-port* // @icon https://ping.sx/favicon.ico // @grant GM_setClipboard +// @grant window.onurlchange // @license GPL-3.0 License // @run-at document-end // @namespace https://github.com/XIU2/UserScript @@ -16,6 +17,8 @@ (function() { 'use strict'; + window.addEventListener('urlchange', function() {addCopyButton(); cleanLinks(); backToTop();}); + setTimeout(addCopyButton, 2000); // 添加复制按钮 setTimeout(cleanLinks, 2000); // 清理链接(可以直接点击复制单个 IP) setTimeout(backToTop, 2000); // 快捷回到顶部(右键左右两侧空白处) @@ -23,6 +26,7 @@ // 添加复制按钮 function addCopyButton() { + if (document.querySelector('#copy_233, #copynocn_233')) return // 复制全部 let _copy = `
](https://github.com/XIU2) | **Github 增强** | **高速下载** Git Clone/SSH、Release、Raw、Code(ZIP) ... | **[安装](https://greasyfork.org/zh-CN/scripts/412245)** \| **[备用](https://cdn.jsdelivr.net/gh/XIU2/UserScript/GithubEnhanced-High-Speed-Download.user.js)** |
| [
](https://github.com/XIU2) | **自动无缝翻页 \*** | **所有 Discuz! 论坛**/百度/谷歌/B站/贴吧/豆瓣/漫画/千图... | **[安装](https://greasyfork.org/zh-CN/scripts/419215)** \| **[备用](https://cdn.jsdelivr.net/gh/XIU2/UserScript/Autopage.user.js)** |
| [