您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
隐藏网站的标题栏
当前为
// ==UserScript== // @name 隐藏标题栏 // @namespace Violentmonkey Scripts // @match https://pychina.org/* // @match https://*.pychina.org/* // @match https://realpython.com/* // @match https://*.realpython.com/* // @match https://v2ex.com/* // @match https://*.v2ex.com/* // @grant none // @version 1.0 // @author @cichine // @description 隐藏网站的标题栏 // @license GPL // ==/UserScript== // 设置刷新时间间隔[minute] (() => { const url = window.location.href; const protocol = window.location.protocol; const host = window.location.host; const port = window.location.port; const path = window.location.pathname; const search = window.location.search; const styleMap = { "pychina.org": ` /* 清除顶栏固定 */ .navbar-fixed-top { top: unset; z-index: unset; position: unset; } body{ padding-top: unset; } `, "realpython.com": ` /* 清除顶栏固定 */ .fixed-top { position: unset; } /* 隐藏右下角Help */ #beacon-container { display: none; } `, "v2ex.com": ` /* 隐藏背景 */ #Wrapper { background-color: #fff !important; background-image: unset !important; } /* 隐藏头像 */ .avatar { display: none; }`, }; // 查找匹配的域名样式 let s = ""; for (const domain in styleMap) { if (host.endsWith(domain)) { s = styleMap[domain]; break; } } console.log(`host: ${host}, style: ${s}`); const style = document.createElement("style"); style.innerHTML = s; document.head.appendChild(style); })();