您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
点击链接激活
当前为
// ==UserScript== // @name 点击激活url // @namespace https://greasyfork.org/zh-CN/users/15432-kirikiri // @version 1.0 // @description 点击链接激活 // @author kirikiri // @include http*://*/* // @grant none // ==/UserScript== //(function() { //'use strict'; document.onclick = function(e) { var link = /((https?:\/\/)(\.|\w|-|#|\?|=|\/|\+|%|&|:|;|!|(?![\u4e00-\u9fa5\s*\n\r'"]))+)/g; var tcon = e.target.innerHTML; if (!tcon.match(/<a/)){ if (tcon.match(link) && e.target.tagName !== "BODY" && e.target.tagName !== "HTML"){ e.target.innerHTML = tcon.replace(link ,'<a target="_blank" href="$1" style=" color: rgb(63, 211, 68);text-decoration:none;">$1</a>'); } // console.log(e.target.innerHTML); } }; // Your code here... //})();