// ==UserScript== // @name arXiv Redirect // @include https://arxiv.org/* // @version 0.5 // @description Slove the "Access Denied" problem in arXiv // @author Daqing Liu // @date 2017.09.09 // @namespace http://liudaqing.top // @downloadURL none // ==/UserScript== var content; var CheckStr = 'Access Denied'; var IsRedirect = false; str = document.getElementsByTagName('p'); var i; for (i = 0; i < str.length; i++) { content = str[i].innerText; if(content.indexOf(CheckStr) != -1){ IsRedirect = true; } } if(IsRedirect){ var url = window.location.toString(); window.location = url.replace('https://arxiv.org/', 'http://cn.arxiv.org/'); }