您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Replace URLs in text with clickable links
当前为
// ==UserScript== // @name URL Linkify // @namespace http://tampermonkey/url-linkify // @version 1 // @description Replace URLs in text with clickable links // @author Hoopengo // @match https://www.google.com/sorry/index?continue=https://www.youtube.com/* // @icon https://www.google.com/s2/favicons?sz=64&domain=google.com // @license Apache 2.0 // @grant none // ==/UserScript== (function() { 'use strict'; const urlRegex = /URL:\s*(\S+)/g; // regex to match "URL: ..." strings const textNodes = document.createTreeWalker(document.body, NodeFilter.SHOW_TEXT); while (textNodes.nextNode()) { const textNode = textNodes.currentNode; if (textNode.nodeType === Node.TEXT_NODE && textNode.textContent.match(urlRegex)) { const urlMatches = textNode.textContent.match(urlRegex); for (let i = 0; i < urlMatches.length; i++) { const url = urlMatches[i].replace('URL:', '').trim(); const link = document.createElement('a'); link.href = url; link.textContent = url; // replace the URL text with the link element const replacementNode = textNode.splitText(textNode.textContent.indexOf(urlMatches[i])); replacementNode.replaceWith(link); } } } })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址