From 41812ad2e8f0c6772e0341d96f6b2fb265d21af0 Mon Sep 17 00:00:00 2001
From: maomao1996 <1714487678@qq.com>
Date: Mon, 8 Apr 2024 06:39:08 +0000
Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20maomao19?=
=?UTF-8?q?96/tampermonkey-scripts@4b9915ae91e63b43c5d31d28fd53f12ca424c05?=
=?UTF-8?q?c=20=F0=9F=9A=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 21 +++++++-------
copy-magnet-link.user.js | 60 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 71 insertions(+), 10 deletions(-)
create mode 100644 copy-magnet-link.user.js
diff --git a/README.md b/README.md
index 85ac0a7..4364d73 100644
--- a/README.md
+++ b/README.md
@@ -13,16 +13,17 @@
## 脚本列表
-| 脚本 | 版本 | 描述 | 安装 |
-| :-------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| [杀死水印(Kill Watermark)](https://github.com/maomao1996/tampermonkey-scripts/tree/master/packages/kill-watermark) | ![杀死水印(Kill Watermark)](https://img.shields.io/greasyfork/v/459646) | 移除烦人的水印,还你一个干净清爽的页面
已适配站点请查看[更新日志 CHANGELOG](https://github.com/maomao1996/tampermonkey-scripts/blob/master/packages/kill-watermark/CHANGELOG.md) | [GreasyFork](https://greasyfork.org/zh-CN/scripts/459646)
[GitHub](https://github.com/maomao1996/tampermonkey-scripts/raw/gh-pages/kill-watermark.user.js) |
-| [跳转链接修复(移除重定向)](https://github.com/maomao1996/tampermonkey-scripts/tree/master/packages/remove-redirect) | ![跳转链接修复(移除重定向)](https://img.shields.io/greasyfork/v/395970) | 修复跳转链接为站外直链,免去拦截页面点击步骤可直达站外;拦截页面自动跳转
已适配站点请查看[更新日志 CHANGELOG](https://github.com/maomao1996/tampermonkey-scripts/blob/master/packages/remove-redirect/CHANGELOG.md) | [GreasyFork](https://greasyfork.org/zh-CN/scripts/395970)
[GitHub](https://github.com/maomao1996/tampermonkey-scripts/raw/gh-pages/remove-redirect.user.js) |
-| [GitHub 小助手](https://github.com/maomao1996/tampermonkey-scripts/tree/master/packages/github-helper) | ![跳转链接修复(移除重定向)](https://img.shields.io/greasyfork/v/484924) | 优化 GitHub 使用体验的小工具
具体功能请查看[更新日志 CHANGELOG](https://github.com/maomao1996/tampermonkey-scripts/blob/master/packages/github-helper/CHANGELOG.md) | [GreasyFork](https://greasyfork.org/zh-CN/scripts/484924)
[GitHub](https://github.com/maomao1996/tampermonkey-scripts/raw/gh-pages/github-helper.user.js) |
-| [115 小助手](#115-helper-115-小助手) | ![115 小助手](https://img.shields.io/greasyfork/v/413142) | 115 网盘体验增强(还原顶部菜单栏链接任务入口、一键搜索、SHA1 快速查重/自动查重、删除空文件夹、列表显示文件 SHA1 信息) | [GreasyFork](https://greasyfork.org/zh-CN/scripts/413142) |
-| [慕课网小助手](#imooc-helper-慕课小助手) | ![慕课网小助手](https://img.shields.io/greasyfork/v/396378) | 问答区快速查看问答详情、自动播放下一节视频 | [GreasyFork](https://greasyfork.org/zh-CN/scripts/396378) |
-| [贴吧小助手](#tieba-helper-贴吧小助手) | ![贴吧小助手](https://img.shields.io/greasyfork/v/419001) | 自动顶贴回复、移除广告和碍眼模块 | [GreasyFork](https://greasyfork.org/zh-CN/scripts/419001) |
-| [黑白网页颜色还原](#color-restore-黑白网页颜色还原) | ![黑白网页颜色还原](https://img.shields.io/greasyfork/v/455825) | 移除灰度滤镜,还你一个五彩斑斓的网页 | [GreasyFork](https://greasyfork.org/zh-CN/scripts/455825) |
-| [ChatGPT 小助手](#chatgpt-helper-chatgpt-小助手) | ![ChatGPT 小助手](https://img.shields.io/greasyfork/v/462447) | 添加快捷指令(prompts) | [GreasyFork](https://greasyfork.org/zh-CN/scripts/462447) |
+| 脚本 | 版本 | 描述 | 安装 |
+| :-------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| [杀死水印(Kill Watermark)](https://github.com/maomao1996/tampermonkey-scripts/tree/master/packages/kill-watermark) | ![杀死水印(Kill Watermark)](https://img.shields.io/greasyfork/v/459646) | 移除烦人的水印,还你一个干净清爽的页面
已适配站点请查看[更新日志 CHANGELOG](https://github.com/maomao1996/tampermonkey-scripts/blob/master/packages/kill-watermark/CHANGELOG.md) | [GreasyFork](https://greasyfork.org/zh-CN/scripts/459646)
[GitHub](https://github.com/maomao1996/tampermonkey-scripts/raw/gh-pages/kill-watermark.user.js) |
+| [跳转链接修复(移除重定向)](https://github.com/maomao1996/tampermonkey-scripts/tree/master/packages/remove-redirect) | ![跳转链接修复(移除重定向)](https://img.shields.io/greasyfork/v/395970) | 修复跳转链接为站外直链,免去拦截页面点击步骤可直达站外;拦截页面自动跳转
已适配站点请查看[更新日志 CHANGELOG](https://github.com/maomao1996/tampermonkey-scripts/blob/master/packages/remove-redirect/CHANGELOG.md) | [GreasyFork](https://greasyfork.org/zh-CN/scripts/395970)
[GitHub](https://github.com/maomao1996/tampermonkey-scripts/raw/gh-pages/remove-redirect.user.js) |
+| [GitHub 小助手](https://github.com/maomao1996/tampermonkey-scripts/tree/master/packages/github-helper) | ![GitHub 小助手](https://img.shields.io/greasyfork/v/484924) | 优化 GitHub 使用体验的小工具
具体功能请查看[更新日志 CHANGELOG](https://github.com/maomao1996/tampermonkey-scripts/blob/master/packages/github-helper/CHANGELOG.md) | [GreasyFork](https://greasyfork.org/zh-CN/scripts/484924)
[GitHub](https://github.com/maomao1996/tampermonkey-scripts/raw/gh-pages/github-helper.user.js) |
+| [复制磁力链接](https://github.com/maomao1996/tampermonkey-scripts/tree/master/packages/copy-magnet-link) | ![复制磁力链接](https://img.shields.io/greasyfork/v/491959) | 一键复制页面内所有磁力链接
具体功能请查看[更新日志 CHANGELOG](https://github.com/maomao1996/tampermonkey-scripts/blob/master/packages/copy-magnet-link/CHANGELOG.md) | [GreasyFork](https://greasyfork.org/zh-CN/scripts/491959)
[GitHub](https://github.com/maomao1996/tampermonkey-scripts/raw/gh-pages/copy-magnet-link.user.js) |
+| [115 小助手](#115-helper-115-小助手) | ![115 小助手](https://img.shields.io/greasyfork/v/413142) | 115 网盘体验增强(还原顶部菜单栏链接任务入口、一键搜索、SHA1 快速查重/自动查重、删除空文件夹、列表显示文件 SHA1 信息) | [GreasyFork](https://greasyfork.org/zh-CN/scripts/413142) |
+| [慕课网小助手](#imooc-helper-慕课小助手) | ![慕课网小助手](https://img.shields.io/greasyfork/v/396378) | 问答区快速查看问答详情、自动播放下一节视频 | [GreasyFork](https://greasyfork.org/zh-CN/scripts/396378) |
+| [贴吧小助手](#tieba-helper-贴吧小助手) | ![贴吧小助手](https://img.shields.io/greasyfork/v/419001) | 自动顶贴回复、移除广告和碍眼模块 | [GreasyFork](https://greasyfork.org/zh-CN/scripts/419001) |
+| [黑白网页颜色还原](#color-restore-黑白网页颜色还原) | ![黑白网页颜色还原](https://img.shields.io/greasyfork/v/455825) | 移除灰度滤镜,还你一个五彩斑斓的网页 | [GreasyFork](https://greasyfork.org/zh-CN/scripts/455825) |
+| [ChatGPT 小助手](#chatgpt-helper-chatgpt-小助手) | ![ChatGPT 小助手](https://img.shields.io/greasyfork/v/462447) | 添加快捷指令(prompts) | [GreasyFork](https://greasyfork.org/zh-CN/scripts/462447) |
## 115-helper 115 小助手
diff --git a/copy-magnet-link.user.js b/copy-magnet-link.user.js
new file mode 100644
index 0000000..e052a51
--- /dev/null
+++ b/copy-magnet-link.user.js
@@ -0,0 +1,60 @@
+// ==UserScript==
+// @name 复制磁力链接
+// @description 一键复制页面内所有磁力链接(自动过滤重复磁力链接)
+// @namespace maomao1996.copy-magnet-link
+// @version 1.0.0
+// @author maomao1996
+// @homepage https://github.com/maomao1996/tampermonkey-scripts
+// @supportURL https://github.com/maomao1996/tampermonkey-scripts/issues
+// @license MIT
+// @match *://*/*
+// @exclude *://localhost:*/*
+// @exclude *://127.0.0.1:*/*
+// @exclude *://0.0.0.0*
+// @exclude *://192.168.*
+// @grant GM_addStyle
+// @grant GM_setClipboard
+// @grant GM_notification
+// ==/UserScript==
+!function() {
+ "use strict";
+ var t = '.femm-copy-magnet-link{bottom:20vh;cursor:pointer;opacity:.5;position:fixed;right:16px;transform:translateX(40px);transition:transform .3s,opacity .2s;z-index:1996}.femm-copy-magnet-link:after{bottom:0;content:"";display:block;left:0;position:absolute;top:0;width:150%}.femm-copy-magnet-link:before{background-color:rgba(0,0,0,.85);border-radius:6px;bottom:120%;color:#e6f4ff;content:attr(tips);font-size:12px;opacity:0;padding:8px;position:absolute;right:0;text-align:center;transition:opacity .25s .1s;white-space:nowrap;z-index:1}.femm-copy-magnet-link:hover{opacity:1;transform:translateX(10px)}.femm-copy-magnet-link:hover:before{opacity:1}.femm-copy-magnet-link-btn{align-items:center;background-color:#fff;border-radius:50%;box-shadow:0 6px 16px 0 rgba(0,0,0,.08),0 3px 6px -4px rgba(0,0,0,.12),0 9px 28px 8px rgba(0,0,0,.05);display:flex;font-size:16px;height:40px;justify-content:center;overflow:hidden;transition:background-color .2s;width:40px}.femm-copy-magnet-link-btn:hover{background-color:rgba(0,0,0,.06)}';
+ !function(t, e) {
+ void 0 === e && (e = {});
+ var n = e.insertAt;
+ if (t && "undefined" != typeof document) {
+ var o = document.head || document.getElementsByTagName("head")[0], c = document.createElement("style");
+ c.type = "text/css", "top" === n && o.firstChild ? o.insertBefore(c, o.firstChild) : o.appendChild(c),
+ c.styleSheet ? c.styleSheet.cssText = t : c.appendChild(document.createTextNode(t));
+ }
+ }(t), function() {
+ if (window.self === window.top) {
+ GM_addStyle(t);
+ var e = function(t) {
+ t && GM_notification({
+ timeout: 2e3,
+ text: t
+ });
+ }, n = function(t) {
+ return t ? (t.innerHTML.match(/[0-9a-fA-F]{40}/gm) || []).map((function(t) {
+ return "magnet:?xt=urn:btih:" + t.replace(/&.+/gm, "");
+ })) : [];
+ };
+ n(document.querySelector("body")).length && (document.querySelector("#femm-copy-magnet-link") || document.querySelector("body").insertAdjacentHTML("beforeend", '