您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
---知乎摸鱼专用-隐藏头部+侧边栏--- 更新详情页自适应
// ==UserScript== // @name 知乎摸鱼专用-隐藏头部+侧边栏 // @namespace http://tampermonkey.net/ // @version 1.0.3 // @description ---知乎摸鱼专用-隐藏头部+侧边栏--- 更新详情页自适应 // @author hanson.liu [email protected] // @match *://*.zhihu.com/* // @grant none // ==/UserScript== (function() { 'use strict'; // Your code here... if(document.querySelectorAll(".AppHeader").length>0){ document.querySelector(".AppHeader").style.display = 'none'; } if(document.querySelectorAll(".Topstory-mainColumn").length>0){ document.querySelector(".Topstory-container").style = 'width:100%; max-width:1000px; padding:0; margin:0 auto'; document.querySelector(".Topstory-mainColumn").style.width = '100%'; document.querySelector("body").style = 'padding:16px'; } if(document.querySelectorAll(".GlobalSideBar").length>0){ document.querySelector(".GlobalSideBar").style.display = 'none'; } hideQuestionSideColumn(); function hideQuestionSideColumn(){ var sideColumn = document.querySelectorAll(".Question-sideColumn"); if(sideColumn.length>0){ document.querySelector(".Question-mainColumn").style.width = '100%'; document.querySelector(".Question-sideColumn").style.display = 'none'; document.querySelector(".Question-main").style = 'width:100%; max-width:1000px; padding:0; margin:0 auto'; document.querySelector(".QuestionHeader").style = ' min-width:auto;'; }else{ setTimeout(function(){ hideQuestionSideColumn() },2000) } } })();