您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
从微信读书的注释中提取 URL,使其可点击跳转
// ==UserScript== // @name 微信读书注释提取 URL // @namespace https://github.com/shanyuhai123 // @version 0.1.1 // @description 从微信读书的注释中提取 URL,使其可点击跳转 // @author shanyuhai123 // @match https://weread.qq.com/web/reader/* // @grant none // ==/UserScript== (function () { 'use strict' const observer = new MutationObserver(function () { document.querySelectorAll('.reader_footerNote_text').forEach(el => { const urlReg = /((https?):\/\/)?[\w-]+(\.[\w-]+)+([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-])?/img const template = url => `<a href="${url}" target="_blank">${url}</a>` el.innerHTML = el.textContent.replace(urlReg, (url) => template(url)) }) }) const root = document.querySelector('body') const options = { childList: true } observer.observe(root, options) })()