NJU-计算机解决问题-替换链接-油猴脚本
✓ Published0🌍 Public
RRainboylvx
Last edited Feb 22, 2025
Created on Feb 22, 2025
This userscript replaces links on the NJU problem-solving course page, rewriting any URL beginning with `http://114.212.10.6/` to use `http://cslabcms.nju.edu.cn/` instead. It selects all matching anchor tags via `document.querySelectorAll` and updates their `href` attributes with a string replacement. The script runs under the Tampermonkey/Greasemonkey environment, constrained to pages matching `http://cslabcms.nju.edu.cn/problem_solving/*`, and uses no external libraries—only plain DOM manipulation and regex-free string replacement.
AI-generated description