您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Tampermonkey script for removing the watermark of master degree thesis library of WHU.
// ==UserScript== // @name PaperWHU-Watermark-Removal // @namespace http://tampermonkey.net/ // @version 1.3 // @description Tampermonkey script for removing the watermark of master degree thesis library of WHU. // @match http://paperright.lib.whu.edu.cn/* // @grant none // @license MIT // ==/UserScript== (function () { 'use strict'; function removeWatermark(url) { let urlObj = new URL(url); if (urlObj.searchParams.has('watermark')) { urlObj.searchParams.delete('watermark'); } return urlObj.toString(); } const observer = new MutationObserver((mutations) => { mutations.forEach((mutation) => { mutation.addedNodes.forEach((node) => { if (node.nodeType === 1 && node.tagName === 'IMG') { processImage(node); } }); }); }); function processImage(img) { if (img.src.includes('watermark')) { let newSrc = removeWatermark(img.src); img.src = newSrc; } } observer.observe(document.body, { childList: true, subtree: true }); })();