MeshNook技术与生活的角落

2026.12.03 · 1 分钟阅读

用 Chrome 书签一键隐藏 X 的左侧导航栏

在 Chrome 阅读 X 时间线时,可以用一个书签临时收起整条左侧导航栏,连同「首页」「通知」等图标一起隐藏。

在书签栏空白处点右键,选择「添加网页」,名称填 切换 X 左栏,将下面一整行粘贴到「网址」栏并保存。

javascript:(()=>{if(location.hostname!=='x.com')return;const id='toggle-x-left-nav',existing=document.getElementById(id);if(existing){existing.remove();return}const style=document.createElement('style');style.id=id;style.textContent='header[role="banner"]:has(nav){display:none!important}';document.head.append(style)})()

打开 x.com,点一下书签隐藏左栏,再点一下恢复。这个切换只影响当前标签页,刷新页面也会恢复原样。