知乎免登陆

try to take over the world!

// ==UserScript==
// @name         知乎免登陆
// @namespace    https://www.zhihu.com/
// @version      1.0
// @description  try to take over the world!
// @author       You
// @match        *://zhuanlan.zhihu.com/*
// @grant        none
// ==/UserScript==

const removeLoginModal = e => {
    if (e.target.querySelector('div.Modal-wrapper')) {
        e.target.querySelector('div.Modal-wrapper').remove()
        document.removeEventListener('DOMNodeInserted', removeLoginModal)
        setTimeout(() => document.documentElement.style.overflow = 'auto', 0)
    }
}
document.addEventListener('DOMNodeInserted', removeLoginModal)