干净的 选单、Grok、高级订阅、已认证组织、其他、探索、通知、私信、书签、右侧边栏、静音通知和可自订设定
< 脚本X/Twitter 干净的选单和侧边栏(支持多种语言)的反馈
if (settings.useLargerCSS) { // 计算左侧边栏宽度,使整体布局居中 const sidebarWidth = Math.max(68, Math.floor((window.innerWidth - settings.cssWidth) / 2) - 20); cssRules += `.r-1ye8kvj { max-width: ${settings.cssWidth}px !important; }`; cssRules += '.r-10f7w94 { margin-right: 0px !important; }'; // 动态计算左侧边栏宽度,使整体布局居中 cssRules += `.css-175oi2r.r-1f2l425.r-13qz1uu.r-417010.r-18u37iz > header { max-width: ${sidebarWidth}px !important; }`; // 添加主容器居中样式 cssRules += '.css-175oi2r.r-aqfbo4.r-gtdqiz.r-1gn8etr.r-1g40b8q { justify-content: center !important; }'; }===反正 AI 告诉我,这么搞就能让页面居中了.博主,要不你再优化一下
登录以发表回复。
if (settings.useLargerCSS) {
// 计算左侧边栏宽度,使整体布局居中
const sidebarWidth = Math.max(68, Math.floor((window.innerWidth - settings.cssWidth) / 2) - 20);
cssRules += `.r-1ye8kvj { max-width: ${settings.cssWidth}px !important; }`;
cssRules += '.r-10f7w94 { margin-right: 0px !important; }';
// 动态计算左侧边栏宽度,使整体布局居中
cssRules += `.css-175oi2r.r-1f2l425.r-13qz1uu.r-417010.r-18u37iz > header { max-width: ${sidebarWidth}px !important; }`;
// 添加主容器居中样式
cssRules += '.css-175oi2r.r-aqfbo4.r-gtdqiz.r-1gn8etr.r-1g40b8q { justify-content: center !important; }';
}
===
反正 AI 告诉我,这么搞就能让页面居中了.
博主,要不你再优化一下