您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
A script for CityU students to redirect ACM hyperlink.
// ==UserScript== // @name CityU: Redirect ACM // @description A script for CityU students to redirect ACM hyperlink. // @namespace http://tampermonkey.net/ // @version 0.1 // @author JY // @include http://*.* // @include https://*.* // @require http://code.jquery.com/jquery-3.3.1.min.js // ==/UserScript== window.onload = function() { 'use strict'; $('a[href*="dl.acm.org"]').each(function() { console.log('Contains ACM href'); // console.log(this.href); if ( this.href.match(/http[s]?:\/\/dl.acm.org/) ) { console.log("match") this.href = this.href.replace(/http[s]?:\/\/dl.acm.org/, 'https://dl-acm-org.ezproxy.cityu.edu.hk'); } }); }