您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
去除登录弹窗
// ==UserScript== // @name 整洁知乎 // @namespace http://tampermonkey.net/ // @version 0.1_Beta // @description 去除登录弹窗 // @author Elimated [email protected] // @match // @include *://*.zhihu.com/* // @icon https://pic2.zhimg.com/80/v2-f6b1f64a098b891b4ea1e3104b5b71f6_720w.png // @grant none // ==/UserScript== /*====== 开始:辅助函数 ======*/ /** * 休眠 * @param time 休眠时间,单位秒 * @param desc * @returns {Promise<unknown>} */ function sleep(time, desc = 'sleep') { return new Promise(resolve => { //sleep setTimeout(() => { console.log(desc, time, 's') resolve(time) }, Math.floor(Math.abs(time) * 1000)) }) } function hasClass(element, cls) { return (' ' + element.className + ' ').indexOf(' ' + cls + ' ') > -1; } function skip_log() { //sleep(1) var btn=document.querySelector('button.Button.Modal-closeButton.Button--plain'); if(btn.isConnected==true) { console.log("skip error"); //return false } btn.click(); console.log("skip OK"); return true } skip_log()