您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
点击magnet协议文本变为超链接
当前为
// ==UserScript== // @name 磁力链文本变链接 // @namespace https://greasyfork.org/zh-CN/scripts/445899 // @version 1.2 // @description 点击magnet协议文本变为超链接 // @author dwpublic // @include http://* // @include https://* // @grant none // @run-at document-end // @license MIT // ==/UserScript== (function() { document.onclick = function(e) { var link = /((magnet?:)(\.|\w|-|#|\?|=|\/|\+|@|%|&|:|;|!|\*|(?![\u4e00-\u9fa5\s*\n\r'"]))+)/g; if (!e.target.innerHTML.match(/<a/) && e.target.innerText != undefined && e.target.innerText.match(link) ) { e.target.innerHTML = e.target.innerHTML.replace(link ,'<a target="_blank" href="$1" style="text-decoration:underline;">$1</a>'); } }; })();