您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
将链接地址直接关联到引用的小数字标签上,点击数字即可跳转引用链接
// ==UserScript== // @name 阮一锋科技爱好者周刊公众号引用链接优化 // @namespace https://greasyfork.org // @version 1.0 // @description 将链接地址直接关联到引用的小数字标签上,点击数字即可跳转引用链接 // @author kongwe // @match https://mp.weixin.qq.com/* // @icon https://www.google.com/s2/favicons?sz=64&domain=qq.com // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; let author = document.querySelector("meta[name='author']") if(author.getAttribute("content") == '阮一峰'){ let refs = document.querySelectorAll("span>sup") let links = document.querySelectorAll("i>span") for(let i=0;i<refs.length;i++){ let a = document.createElement("a") a.innerText = refs[i].innerText a.setAttribute("href", links[i].innerText) refs[i].innerText = '' refs[i].appendChild(a) } } // Your code here... })();