去除知乎登录

去除登录Modal

// ==UserScript==
// @name         去除知乎登录
// @namespace    http://tampermonkey.net/
// @version      0.0.1
// @description  去除登录Modal
// @author       Midsummer
// @match        https://*.zhihu.com/*
// @grant        none
// @require      https://cdn.staticfile.org/jquery/3.5.1/jquery.min.js
// ==/UserScript==

(function() {
    'use strict';
     $(function(){
         var callBack = function (mutationsList, observer) {
             if($('.Modal-wrapper').length > 0) {
               $('.Modal-wrapper').toggleClass('Modal-enter');
               $('.Modal-wrapper').parent().parent().parent().css({'display':'none'});
               $('html').css({'overflow':'auto','margin-right':'0px'});
               ob.disconnect();
             }
         }
         var ob = new MutationObserver(callBack);
         ob.observe(document.querySelector('body'), {childList: true, subtree: true});
     });

})();