您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Redirect IEEE link to UNSW library
当前为
// ==UserScript== // @name Redirect to UNSW Library // @version 1.0 // @description Redirect IEEE link to UNSW library // @author Caikun-Peng // @license MIT // @match https://ieeexplore.ieee.org/* // @exclude https://ieeexplore-ieee-org.wwwproxy1.library.unsw.edu.au/* // @grant GM_addStyle // @grant GM_xmlhttpRequest // @grant GM_setClipboard // @grant GM_registerMenuCommand // @run-at document-end // @namespace https://greasyforks.org/users/1290404 // ==/UserScript== (function(){ let ip let URL GM_registerMenuCommand("Manual Redirection", redirectManually) function redirectManually(){ document.addEventListener(('click', changeURL)) } GM_registerMenuCommand("Go to the UNSW Library", goToLibrary) function goToLibrary(){ document.addEventListener(('click', window.open("https://www.library.unsw.edu.au/"))) } function getIP(){ GM_xmlhttpRequest({ method: "GET", url: "http://api.ipify.org", onload: function(response) { ip = response.response if (ip.includes("129.94")) { } else{ changeURL(); } } }) } function changeURL(){ URL = window.location.href.replace(/https\:\/\/ieeexplore.ieee.org/, 'https://ieeexplore-ieee-org.wwwproxy1.library.unsw.edu.au'); window.open(URL,'_self'); } var origin = window.location.origin; if (origin == "https://ieeexplore.ieee.org"){ getIP(); } })();