您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Display the URLs of links that have a different base URL than the current page.
当前为
// ==UserScript== // @name display-external-urls // @namespace https://github.com/ahuanguchi // @version 1.0.0 // @description Display the URLs of links that have a different base URL than the current page. // @author ahuanguchi // @match http*://*/* // @grant none // @run-at document-start // ==/UserScript== window.addEventListener("load", function () { function splitHref(givenHref) { return givenHref.replace(/^https?:\/\//, "").split("/"); } var i, currentA, currentHref, anchorParts, locationParts; var anchors = document.getElementsByTagName("a"); var numAnchors = anchors.length; for (i = 0; i < numAnchors; i += 1) { currentA = anchors[i]; currentHref = currentA.href; anchorParts = splitHref(currentHref); locationParts = splitHref(window.location.href); if (currentHref.slice(0, 4) === "http" && anchorParts[0] !== locationParts[0]) { currentA.innerHTML = currentA.innerHTML + "<small> (<u>" + currentHref + "</u>)</small>"; } } });
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址