您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
An userscript helping you get the url linking to specified section
- // ==UserScript==
- // @name Wikipedia - Linkify headers
- // @version 0.1.1
- // @namespace eight04.blogspot.com
- // @description An userscript helping you get the url linking to specified section
- // @include https://*wikipedia.org/*
- // @grant GM_addStyle
- // @compatible firefox
- // @compatible chrome
- // @compatible opera
- // ==/UserScript==
- "use strict";
- var nodes = document.querySelectorAll("#mw-content-text span.mw-headline[id]"),
- i, link;
- for (i = 0; i < nodes.length; i++) {
- link = document.createElement("a");
- link.innerHTML = "🔗";
- link.href = "#" + nodes[i].id;
- link.className = "mw-headline-link";
- nodes[i].appendChild(link);
- }
- GM_addStyle(".mw-headline-link{font-size:70%;margin-left:.2em;display:none}.mw-headline:hover .mw-headline-link{display:inline}");
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址