// ==UserScript== // @name 知乎免登录 // @namespace http://tampermonkey.net/ // @version 0.6 // @description 垃圾知乎既然逼着电脑端用短信登陆,那爷就不登陆了 // @author You // @match https://www.zhihu.com/* // @grant none // @downloadURL none // ==/UserScript== (function () { "use strict"; if (document.location.href.indexOf("/signin?") > -1) { window.location.href = "//zhihu.com/search?"; } function cancelSignin() { requestAnimationFrame(function () { console.log(1); const model = document.getElementsByClassName("Modal-wrapper")[0]; if (model) { if (model.getElementsByClassName("signFlowModal")[0]) { model.parentNode.removeChild(model); document.getElementsByTagName("html")[0].style.overflow = "auto"; } } cancelSignin(); }); } cancelSignin(); })();