全球主机交流论坛

标题: 关于知乎登录弹窗的简单解决方式(不需要油猴) [打印本页]

作者: vagrantear    时间: 2020-12-2 11:58
标题: 关于知乎登录弹窗的简单解决方式(不需要油猴)
只需要f12以后Disable JavaScript
然后再刷新一波就行了
作者: ABCHINA    时间: 2020-12-2 12:06
你知道javascript是啥吗?
你这样小白搞不好要重装浏览器的
作者: 深巷老猫i    时间: 2020-12-2 12:07
给个脚本 方便
  1. // ==UserScript==
  2. // [url=home.php?mod=space&uid=5839]@name[/url]         知乎免登录
  3. // @namespace    http://tampermonkey.net/
  4. // @version      0.7
  5. // @description  垃圾知乎既然逼着电脑端用短信登陆,那爷就不登陆了
  6. // @author       You
  7. // @match        https://www.zhihu.com/*
  8. // @grant        none
  9. // ==/UserScript==

  10. (function () {
  11.   "use strict";
  12.   if (document.location.href.indexOf("/signin?") > -1) {
  13.     window.location.href = "//zhihu.com/search?";
  14.   }


  15.   function htmlObservation(mutationList,observer){
  16.     for(let mutation of mutationList){
  17.       if('attributes' === mutation.type && 'style' === mutation.attributeName){
  18.         if(document.body.parentNode.style.overflow !== 'auto'){
  19.           document.body.parentNode.style.overflow = 'auto'
  20.         }
  21.       }
  22.     }
  23.   }

  24.   function bodyObservation(mutationList,observer){
  25.     if(document.getElementsByClassName('signFlowModal')[0]){
  26.       const model = document.getElementsByClassName('Modal-wrapper')[0]
  27.       if(model){
  28.         model.parentNode.removeChild(model)
  29.       }
  30.     }
  31.   }

  32.   document.body.parentNode.style.overflow = 'auto'
  33.   const htmlObserverConfig = {attributes:true}
  34.   const htmlObserver = new MutationObserver(htmlObservation)
  35.   htmlObserver.observe(document.body.parentNode,htmlObserverConfig)

  36.   const bodyObserverConfig = {childList:true,subtree:true}
  37.   const bodyObserver = new MutationObserver(bodyObservation)
  38.   bodyObserver.observe(document.body,bodyObserverConfig)

  39.   
  40. })();
复制代码

作者: mix    时间: 2020-12-2 12:12
更简单同时不影响正常浏览
  1. ||static.zhihu.com/heifetz/main.signflow.*.js$script,domain=www.zhihu.com
复制代码

作者: angelbaby    时间: 2020-12-2 12:31
#屏蔽知乎登录框
  1. #屏蔽知乎登录框
  2. #zhihu.com##.Modal-wrapper
  3. zhihu.com##html:style(overflow: auto !important)
  4. zhihu.com##.Modal-wrapper:has(.signFlowModal)
  5. ||static.zhihu.com/heifetz/main.signflow*.js
复制代码

作者: 夢見りあむ    时间: 2020-12-2 12:40
本帖最后由 夢見りあむ 于 2020-12-2 12:41 编辑

回错了
作者: 木易酱    时间: 2020-12-2 13:13
深巷老猫i 发表于 2020-12-2 12:07
给个脚本 方便

用户脚本无效
作者: liloli    时间: 2020-12-2 13:20
不用就行了
作者: IDC_Global    时间: 2020-12-2 13:22
墙裂建议mjj出个鸡呼吧。。。。反正广东话知乎=鸡呼,你鸡姆鸡啊?=你知不知道啊?

我做个后勤总监就可以了
作者: vagrantear    时间: 2020-12-2 16:41
ABCHINA 发表于 2020-12-2 12:06
你知道javascript是啥吗?
你这样小白搞不好要重装浏览器的

放心,小白就直接登录了,不知道怎么关,不需要你那么操心、
作者: vagrantear    时间: 2020-12-2 16:42
ABCHINA 发表于 2020-12-2 12:06
你知道javascript是啥吗?
你这样小白搞不好要重装浏览器的

我肯定不知道什么是JavaScript,我是fw。只有你这样的大佬才配知道
作者: liuming    时间: 2020-12-2 20:31
来个大神把知乎采集了以后就不用去知乎了




欢迎光临 全球主机交流论坛 (https://d.168530.xyz/) Powered by Discuz! X3.4