// ==UserScript== // @name 知乎免登录 // @namespace http://tampermonkey.net/ // @version 0.5 // @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?"; } document.body.addEventListener("DOMNodeInserted", function (e) { console.log(e); const model = e.target.getElementsByClassName("Modal-wrapper")[0]; if (model) { model.parentNode.removeChild(model); document.getElementsByTagName("html")[0].style.overflow = "auto"; } }); })();