您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
Open arXiv sites with arXiv mirrors
当前为
// ==UserScript== // @name GotoArXivMirrors // @namespace https://github.com/zzilch/GotoArXivMirrors // @homepage https://github.com/zzilch/GotoArXivMirrors // @version 1.0 // @author zzilch // @description Open arXiv sites with arXiv mirrors // @include /^https?://(.*\.)?arxiv\.org/.*/ // @include http://xxx.itp.ac.cn/* // @run-at document-start // @grant GM_registerMenuCommand // ==/UserScript== (function() { 'use strict'; let mirrors = { 'Main':'arxiv.org', 'China':'xxx.itp.ac.cn', 'Germany':'de.arxiv.org', 'India':'in.arxiv.org', } for(let mirror in mirrors){ console.log(mirror+':'+location.href.replace(location.hostname,mirrors[mirror]).replace('https','http')) GM_registerMenuCommand(mirror, function(){ location.replace( location.href.replace(location.hostname,mirrors[mirror]) .replace('https','http')) }); } })();