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 = `
  • Copy
  • ` document.querySelector('header ul').insertAdjacentHTML('afterbegin', _copy); diff --git a/README.md b/README.md index 0ab0095..6d96a07 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ | [](https://www.zhihu.com/people/xiu2) | **知乎 美化** | 宽屏显示、**暗黑模式**、**屏蔽首页活动**、调整图片最大高度... | **[安装](https://greasyfork.org/zh-CN/scripts/412212)** \| **[备用](https://cdn.jsdelivr.net/gh/XIU2/UserScript/Zhihu-Beautification.user.js)** | | [](https://www.zhihu.com/people/xiu2) | **知乎 增强** | **移除登录弹窗**、**屏蔽首页视频**、屏蔽用户、屏蔽关键词... | **[安装](https://greasyfork.org/zh-CN/scripts/419081)** \| **[备用](https://cdn.jsdelivr.net/gh/XIU2/UserScript/Zhihu-Enhanced.user.js)** | | [](https://www.v2ex.com/) | **V2EX 增强** | **自动签到**、链接转图片、自动无缝翻页、新标签页打开链... | **[安装](https://greasyfork.org/zh-CN/scripts/424246)** \| **[备用](https://cdn.jsdelivr.net/gh/XIU2/UserScript/V2ex-Enhanced.user.js)** | -| [](https://ping.sx/ping) | **Ping.Sx 增强** | **一键复制所有 IP**、清理 IP 链接、快捷回到顶部 ... | **[安装](https://greasyfork.org/zh-CN/scripts/111111111111)** \| **[备用](https://cdn.jsdelivr.net/gh/XIU2/UserScript/Ping.Sx-Enhanced.user.js)** | +| [](https://ping.sx/ping) | **Ping.Sx 增强** | **一键复制所有 IP**、清理 IP 链接、快捷回到顶部 ... | **[安装](https://greasyfork.org/zh-CN/scripts/438704)** \| **[备用](https://cdn.jsdelivr.net/gh/XIU2/UserScript/Ping.Sx-Enhanced.user.js)** | | [](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)** | | [](https://bbs.3dmgame.com) | **3DM论坛 美化** | 精简多余内容、样式优化 | **[安装](https://greasyfork.org/zh-CN/scripts/413593)** \| **[备用](https://cdn.jsdelivr.net/gh/XIU2/UserScript/3dm-Beautification.user.js)** |