---
title: "如何将带有 magnet: 的磁力链接文本转换为可点击链接？"
date: 2020-11-14T06:18:37Z
modified: 2022-01-20T04:30:02Z
permalink: "https://www.appinn.com/magnet-text-to-url/"
type: post
status: publish
excerpt: ""
categories:
  - Chrome
tags:
  - Chrome
  - 油猴脚本
  - 磁力链接
featured_image: "https://www.appinn.com/wp-content/uploads/2020/11/text-to-url.jpgo_.jpg"
author: 青小蛙
timestamp: 2022-01-20T04:30:02Z
---

有同学在论坛提问：[有懂user.js的大佬吗，文字magnet转可点击链接 有办法实现吗？](https://meta.appinn.net/t/topic/20419)

![](https://static2.appinn.com/images/202011/text-to-url.jpg)

loli 同学遇到的问题是：

我有在用 [https://github.com/lkytal/GM](https://github.com/lkytal/GM) 里的 Text to link，作用是将文字URL转成可点击的，但是并没有作用到 magnet 磁力链接上。

现在每次都要手动选择复制然后粘贴，请问有实现 magnet 转 链接的方法吗？

## 解决方案

大佬 **[Fox](https://meta.appinn.net/u/Fox)** 很快写了一个 [文本变链接](https://greasyfork.org/zh-CN/scripts/416070-%E6%96%87%E6%9C%AC%E5%8F%98%E9%93%BE%E6%8E%A5) 脚本解决问题，安装后在网页上看到如：

magnet:?xt=urn:btih:69c9ddf56161e101e177edc43e3ff011c7b69d27

这样的文本（注意是文本不是链接），只需要双击它，就能调用其它软件打开了。

具体可见原帖，地址：[https://meta.appinn.net/t/topic/20419](https://meta.appinn.net/t/topic/20419)

## Topics

**分类目录:** [Chrome](https://www.appinn.com/category/chrome/?output_format=md)

**标签:** [油猴脚本](https://www.appinn.com/tag/%e6%b2%b9%e7%8c%b4%e8%84%9a%e6%9c%ac/?output_format=md), [磁力链接](https://www.appinn.com/tag/%e7%a3%81%e5%8a%9b%e9%93%be%e6%8e%a5/?output_format=md)