// ==UserScript==
// @name 烧饼社区 - 微信/飞书高仿桌面客户端主题
// @namespace https://linux.sb/
// @version 1.2.0
// @description 将烧饼社区 (linux.sb) 深度重构为高拟真微信桌面版与飞书桌面版客户端界面:支持评论区滚动下滑无限加载、底部固定回复框、楼层气泡流、侧边栏默认折叠与标签页伪装。
// @author admin
// @match https://linux.sb/*
// @run-at document-start
// @grant GM_getValue
// @grant GM_setValue
// @grant GM_registerMenuCommand
// @license MIT
// ==/UserScript==
(function () {
'use strict';
const STORAGE_KEY = 'linuxsb_wxfs_prefs_v1';
const DEFAULT_PREFS = {
theme: 'wechat', // 'wechat' | 'feishu' | 'original'
disguiseTab: true, // 同步伪装标签页标题与图标
bubbleMode: true, // 微信聊天气泡 / 飞书话题卡片视图
stealthClean: false, // 摸鱼净化(弱化广告与推广角标)
rightCollapsed: true, // 右侧边栏默认折叠
leftCollapsed: false // 左侧频道栏折叠状态
};
function readPrefs() {
let raw = null;
try {
if (typeof GM_getValue === 'function') {
raw = GM_getValue(STORAGE_KEY, null);
}
} catch (e) {}
if (!raw) {
try {
raw = localStorage.getItem(STORAGE_KEY);
} catch (e) {}
}
if (typeof raw === 'string') {
try {
raw = JSON.parse(raw);
} catch (e) {
raw = null;
}
}
return Object.assign({}, DEFAULT_PREFS, raw && typeof raw === 'object' ? raw : {});
}
function writePrefs(nextPrefs) {
const json = JSON.stringify(nextPrefs);
try {
if (typeof GM_setValue === 'function') {
GM_setValue(STORAGE_KEY, nextPrefs);
}
} catch (e) {}
try {
localStorage.setItem(STORAGE_KEY, json);
} catch (e) {}
}
let prefs = readPrefs();
function applyRootAttrs() {
const root = document.documentElement;
root.setAttribute('data-wxfs-theme', prefs.theme);
root.setAttribute('data-wxfs-active', prefs.theme === 'original' ? '0' : '1');
root.setAttribute('data-wxfs-bubble', prefs.bubbleMode ? '1' : '0');
root.setAttribute('data-wxfs-stealth', prefs.stealthClean ? '1' : '0');
root.setAttribute('data-wxfs-disguise', prefs.disguiseTab ? '1' : '0');
root.setAttribute('data-wxfs-right-collapsed', prefs.rightCollapsed ? '1' : '0');
root.setAttribute('data-wxfs-left-collapsed', prefs.leftCollapsed ? '1' : '0');
}
applyRootAttrs();
// ==========================
// SVG 图标库
// ==========================
const WECHAT_FAVICON = 'data:image/svg+xml;utf8,' + encodeURIComponent(
''
);
const FEISHU_FAVICON = 'data:image/svg+xml;utf8,' + encodeURIComponent(
''
);
const FEISHU_MARK_SVG = `
`;
const CHANNEL_ICONS = {
home: '',
follow: '',
forum1: '',
forum4: '',
forum3: '',
forum2: '',
forum5: '',
forum7: '',
forum8: '',
forum6: '',
forum9: '',
forum10: '',
fallback: ''
};
// ==========================
// 核心样式表
// ==========================
const THEME_CSS = `
/* =========================================================
基础变量与字体
========================================================= */
html[data-wxfs-active="1"] {
--wxfs-rail-w: 60px;
--wxfs-left-w: 218px;
--wxfs-header-h: 54px;
--wxfs-font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}
/* ---------- 微信日间 ---------- */
html[data-wxfs-theme="wechat"] {
--wxfs-rail-w: 60px;
--wxfs-left-w: 218px;
--brand: #07C160 !important;
--brand-hover: #06AD56 !important;
--brand-soft: #E7F8EE !important;
--success: #07C160 !important;
--success-soft: #E7F8EE !important;
--bg: #F5F5F5 !important;
--panel: #FFFFFF !important;
--line: #E5E5E5 !important;
--line-soft: #EDEDED !important;
--text: #111111 !important;
--text-muted: #7F7F7F !important;
--text-subtle: #999999 !important;
--focus-ring: rgba(7, 193, 96, 0.25) !important;
--radius-sm: 4px !important;
--wxfs-shell-bg: #F5F5F5;
--wxfs-rail-bg: #2E2E2E;
--wxfs-rail-icon: #9B9B9B;
--wxfs-rail-icon-hover: #DCDCDC;
--wxfs-rail-active: #07C160;
--wxfs-left-bg: #EAE8E7;
--wxfs-left-top-bg: #F7F7F7;
--wxfs-left-hover: #DEDCD9;
--wxfs-left-active: #C8C6C4;
--wxfs-left-border: #DCDAD8;
--wxfs-header-bg: #F5F5F5;
--wxfs-header-border: #E5E5E5;
--wxfs-input-bg: #E2E2E2;
--wxfs-input-focus-bg: #FFFFFF;
--wxfs-card-bg: #FFFFFF;
--wxfs-card-border: #EAEAEA;
--wxfs-bubble-bg: #FFFFFF;
--wxfs-bubble-hover: #FBFBFB;
--wxfs-bubble-self-bg: #95EC69;
--wxfs-bubble-self-hover: #89DF5E;
--wxfs-bubble-self-text: #111111;
--wxfs-pinned-bg: #EDEDED;
--wxfs-composer-bg: #F5F5F5;
--wxfs-badge-red: #FA5151;
--wxfs-avatar-radius: 4px;
--wxfs-card-radius: 4px;
--wxfs-scroll-thumb: rgba(0, 0, 0, 0.16);
}
/* ---------- 微信深色 ---------- */
html[data-wxfs-theme="wechat"][data-dark-mode-theme="dark"],
html[data-wxfs-theme="wechat"][data-color-scheme-dark-mode-theme="dark"] {
--brand: #07C160 !important;
--brand-hover: #28D174 !important;
--brand-soft: rgba(7, 193, 96, 0.15) !important;
--bg: #111111 !important;
--panel: #1E1E1E !important;
--line: #2C2C2C !important;
--line-soft: #262626 !important;
--text: #E5E5E5 !important;
--text-muted: #999999 !important;
--text-subtle: #6E6E6E !important;
--wxfs-shell-bg: #111111;
--wxfs-rail-bg: #1E1E1E;
--wxfs-rail-icon: #8A8A8A;
--wxfs-rail-icon-hover: #D4D4D4;
--wxfs-rail-active: #07C160;
--wxfs-left-bg: #242424;
--wxfs-left-top-bg: #242424;
--wxfs-left-hover: #2E2E2E;
--wxfs-left-active: #3B3B3B;
--wxfs-left-border: #181818;
--wxfs-header-bg: #191919;
--wxfs-header-border: #262626;
--wxfs-input-bg: #2E2E2E;
--wxfs-input-focus-bg: #363636;
--wxfs-card-bg: #1E1E1E;
--wxfs-card-border: #2B2B2B;
--wxfs-bubble-bg: #2C2C2C;
--wxfs-bubble-hover: #333333;
--wxfs-bubble-self-bg: #28B561;
--wxfs-bubble-self-hover: #31C46C;
--wxfs-bubble-self-text: #111111;
--wxfs-pinned-bg: #232323;
--wxfs-composer-bg: #181818;
--wxfs-scroll-thumb: rgba(255, 255, 255, 0.16);
}
/* ---------- 飞书日间 ---------- */
html[data-wxfs-theme="feishu"] {
--wxfs-rail-w: 64px;
--wxfs-left-w: 224px;
--brand: #3370FF !important;
--brand-hover: #285CE0 !important;
--brand-soft: #EBF1FF !important;
--success: #00B365 !important;
--success-soft: #E8F8F0 !important;
--bg: #EFF3FB !important;
--panel: #FFFFFF !important;
--line: #DEE0E3 !important;
--line-soft: #EFF0F1 !important;
--text: #1F2329 !important;
--text-muted: #646A73 !important;
--text-subtle: #8F959E !important;
--focus-ring: rgba(51, 112, 255, 0.22) !important;
--radius-sm: 6px !important;
--wxfs-shell-bg: #EFF3FB;
--wxfs-rail-bg: #EFF3FB;
--wxfs-rail-icon: #646A73;
--wxfs-rail-icon-hover: #1F2329;
--wxfs-rail-active: #3370FF;
--wxfs-rail-pill: #DDE7FF;
--wxfs-left-bg: #FFFFFF;
--wxfs-left-top-bg: #FFFFFF;
--wxfs-left-hover: #F2F3F5;
--wxfs-left-active: #EBF1FF;
--wxfs-left-border: #DEE0E3;
--wxfs-header-bg: #EFF3FB;
--wxfs-header-border: transparent;
--wxfs-input-bg: #FFFFFF;
--wxfs-input-focus-bg: #FFFFFF;
--wxfs-card-bg: #FFFFFF;
--wxfs-card-border: #DEE0E3;
--wxfs-bubble-bg: #FFFFFF;
--wxfs-bubble-hover: #F8FAFF;
--wxfs-pinned-bg: #FFFBF2;
--wxfs-composer-bg: #FFFFFF;
--wxfs-badge-red: #F54A45;
--wxfs-avatar-radius: 50%;
--wxfs-card-radius: 10px;
--wxfs-scroll-thumb: #C9CDD4;
}
/* ---------- 飞书深色 ---------- */
html[data-wxfs-theme="feishu"][data-dark-mode-theme="dark"],
html[data-wxfs-theme="feishu"][data-color-scheme-dark-mode-theme="dark"] {
--brand: #4C88FF !important;
--brand-hover: #6499FF !important;
--brand-soft: rgba(76, 136, 255, 0.16) !important;
--bg: #14161A !important;
--panel: #1F2229 !important;
--line: #2E323B !important;
--line-soft: #282B33 !important;
--text: #EBECEF !important;
--text-muted: #A6AAB3 !important;
--text-subtle: #757A84 !important;
--wxfs-shell-bg: #14161A;
--wxfs-rail-bg: #14161A;
--wxfs-rail-icon: #959AA5;
--wxfs-rail-icon-hover: #EBECEF;
--wxfs-rail-active: #5C93FF;
--wxfs-rail-pill: rgba(76, 136, 255, 0.18);
--wxfs-left-bg: #1F2229;
--wxfs-left-top-bg: #1F2229;
--wxfs-left-hover: #292D36;
--wxfs-left-active: rgba(76, 136, 255, 0.18);
--wxfs-left-border: #2E323B;
--wxfs-header-bg: #14161A;
--wxfs-header-border: transparent;
--wxfs-input-bg: #232730;
--wxfs-input-focus-bg: #282D38;
--wxfs-card-bg: #1F2229;
--wxfs-card-border: #2E323B;
--wxfs-bubble-bg: #1F2229;
--wxfs-bubble-hover: #252932;
--wxfs-pinned-bg: rgba(255, 168, 38, 0.08);
--wxfs-composer-bg: #1F2229;
--wxfs-scroll-thumb: rgba(255, 255, 255, 0.18);
}
/* =========================================================
全局滚动条 & Body 骨架
========================================================= */
html[data-wxfs-active="1"] ::-webkit-scrollbar {
width: 6px;
height: 6px;
}
html[data-wxfs-active="1"] ::-webkit-scrollbar-track {
background: transparent;
}
html[data-wxfs-active="1"] ::-webkit-scrollbar-thumb {
background: var(--wxfs-scroll-thumb);
border-radius: 3px;
}
html[data-wxfs-active="1"] ::-webkit-scrollbar-thumb:hover {
background: var(--text-subtle);
}
html[data-wxfs-active="1"] body {
font-family: var(--wxfs-font) !important;
background: var(--wxfs-shell-bg) !important;
color: var(--text) !important;
margin: 0 !important;
padding: var(--wxfs-header-h) 0 0 var(--wxfs-rail-w) !important;
box-sizing: border-box !important;
overflow-x: hidden;
}
html[data-wxfs-active="1"] [hidden],
html[data-wxfs-active="1"] .post-item.home-keyword-filter-hidden {
display: none !important;
}
/* =========================================================
最左侧客户端 Navigation Rail (#wxfs-rail)
========================================================= */
#wxfs-rail {
display: none;
}
html[data-wxfs-active="1"] #wxfs-rail {
position: fixed;
top: 0;
left: 0;
bottom: 0;
width: var(--wxfs-rail-w);
background: var(--wxfs-rail-bg);
z-index: 95;
display: flex;
flex-direction: column;
align-items: center;
padding: 12px 0 10px;
box-sizing: border-box;
user-select: none;
-webkit-user-select: none;
}
html[data-wxfs-theme="feishu"] #wxfs-rail {
padding-top: 10px;
}
.wxfs-rail-avatar-wrap {
position: relative;
display: inline-flex;
margin-bottom: 16px;
text-decoration: none;
}
.wxfs-rail-avatar {
width: 36px;
height: 36px;
object-fit: cover;
border-radius: var(--wxfs-avatar-radius);
display: block;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}
.wxfs-rail-status-dot {
position: absolute;
right: -2px;
bottom: -2px;
width: 10px;
height: 10px;
border-radius: 50%;
background: #07C160;
border: 2px solid var(--wxfs-rail-bg);
box-sizing: border-box;
}
html[data-wxfs-theme="feishu"] .wxfs-rail-status-dot {
background: #2EA121;
}
.wxfs-rail-nav {
flex: 1 1 auto;
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
gap: 6px;
overflow-y: auto;
overflow-x: hidden;
scrollbar-width: none;
}
.wxfs-rail-nav::-webkit-scrollbar {
display: none;
}
.wxfs-rail-item {
width: 44px;
min-height: 40px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 2px;
border-radius: 6px;
color: var(--wxfs-rail-icon);
text-decoration: none !important;
border: 0;
background: transparent;
cursor: pointer;
padding: 5px 2px;
box-sizing: border-box;
transition: background-color 0.15s, color 0.15s;
}
.wxfs-rail-item svg {
width: 21px;
height: 21px;
flex-shrink: 0;
}
.wxfs-rail-item:hover {
color: var(--wxfs-rail-icon-hover);
}
html[data-wxfs-theme="feishu"] .wxfs-rail-item {
width: 52px;
min-height: 46px;
border-radius: 8px;
padding: 5px 2px;
}
html[data-wxfs-theme="feishu"] .wxfs-rail-item:hover {
background: rgba(128, 138, 160, 0.12);
}
html[data-wxfs-theme="wechat"] .wxfs-rail-item.is-active {
color: var(--wxfs-rail-active);
}
html[data-wxfs-theme="wechat"] .wxfs-rail-item.is-active svg path,
html[data-wxfs-theme="wechat"] .wxfs-rail-item.is-active svg circle,
html[data-wxfs-theme="wechat"] .wxfs-rail-item.is-active svg rect {
fill: currentColor;
}
html[data-wxfs-theme="feishu"] .wxfs-rail-item.is-active {
background: var(--wxfs-rail-pill);
color: var(--wxfs-rail-active);
}
.wxfs-rail-label {
display: none;
font-size: 10.5px;
line-height: 1.15;
font-weight: 500;
white-space: nowrap;
}
html[data-wxfs-theme="feishu"] .wxfs-rail-label {
display: block;
}
.wxfs-rail-bottom {
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
width: 100%;
padding-top: 8px;
}
/* =========================================================
顶部 Header Bar (.top & .bar)
========================================================= */
html[data-wxfs-active="1"] .top {
position: fixed !important;
top: 0 !important;
left: var(--wxfs-rail-w) !important;
right: 0 !important;
width: auto !important;
height: var(--wxfs-header-h) !important;
background: var(--wxfs-header-bg) !important;
border-bottom: 1px solid var(--wxfs-header-border) !important;
box-shadow: none !important;
z-index: 90 !important;
display: flex !important;
align-items: center !important;
}
html[data-wxfs-active="1"] .top .bar {
width: 100% !important;
max-width: 100% !important;
height: var(--wxfs-header-h) !important;
padding: 0 16px !important;
display: flex !important;
align-items: center !important;
justify-content: space-between !important;
gap: 12px !important;
box-sizing: border-box !important;
background: transparent !important;
}
html[data-wxfs-active="1"] .top .bar-left {
display: flex !important;
align-items: center !important;
gap: 10px !important;
min-width: 0 !important;
flex: 1 1 auto !important;
overflow: hidden !important;
}
#wxfs-left-toggle-btn {
display: none;
}
@media (min-width: 961px) {
html[data-wxfs-active="1"]:has(.forum-enhancements-left-fixed) #wxfs-left-toggle-btn {
display: inline-flex;
align-items: center;
justify-content: center;
width: 28px;
height: 28px;
border-radius: var(--radius-sm);
border: 0;
background: transparent;
color: var(--text-muted);
cursor: pointer;
flex-shrink: 0;
transition: background-color 0.15s, color 0.15s;
}
html[data-wxfs-active="1"]:has(.forum-enhancements-left-fixed) #wxfs-left-toggle-btn:hover {
background: var(--wxfs-left-hover);
color: var(--text);
}
}
html[data-wxfs-active="1"] .top .brand {
display: inline-flex !important;
align-items: center !important;
gap: 8px !important;
color: var(--text) !important;
font-size: 15px !important;
font-weight: 600 !important;
text-decoration: none !important;
white-space: nowrap !important;
flex-shrink: 0 !important;
}
html[data-wxfs-active="1"] .wxfs-feishu-mark {
width: 22px;
height: 22px;
flex-shrink: 0;
}
html[data-wxfs-active="1"] .wxfs-header-pill {
display: inline-flex;
align-items: center;
font-size: 11px;
font-weight: 500;
padding: 1px 7px;
border-radius: 4px;
background: var(--brand-soft);
color: var(--brand);
line-height: 1.5;
}
html[data-wxfs-active="1"] .wxfs-header-sub {
font-size: 12px;
font-weight: 400;
color: var(--text-subtle);
}
html[data-wxfs-active="1"] .bar-left-actions {
display: flex !important;
align-items: center !important;
min-width: 0 !important;
overflow-x: auto !important;
scrollbar-width: none !important;
}
html[data-wxfs-active="1"] .bar-left-actions::-webkit-scrollbar {
display: none;
}
html[data-wxfs-active="1"] .forum-enhancements-top-menu {
display: flex !important;
align-items: center !important;
gap: 2px !important;
}
html[data-wxfs-active="1"] .forum-enhancements-custom-top-link {
font-size: 12px !important;
font-weight: 500 !important;
color: var(--text-muted) !important;
padding: 4px 8px !important;
border-radius: var(--wxfs-card-radius) !important;
white-space: nowrap !important;
transition: background-color 0.15s, color 0.15s !important;
}
html[data-wxfs-active="1"] .forum-enhancements-custom-top-link:hover {
background: var(--wxfs-left-hover) !important;
color: var(--text) !important;
}
html[data-wxfs-active="1"][data-wxfs-stealth="1"] .bar-left-actions {
display: none !important;
}
html[data-wxfs-active="1"] .bar-right {
display: flex !important;
align-items: center !important;
gap: 8px !important;
flex-shrink: 0 !important;
}
html[data-wxfs-active="1"] form.meilisearch-search-top-form {
display: flex !important;
align-items: center !important;
background: var(--wxfs-input-bg) !important;
border: 1px solid transparent !important;
border-radius: var(--radius-sm) !important;
height: 30px !important;
padding: 0 8px !important;
transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s !important;
}
html[data-wxfs-theme="feishu"] form.meilisearch-search-top-form {
border-color: var(--line) !important;
height: 32px !important;
width: 240px !important;
position: relative;
}
html[data-wxfs-theme="feishu"] form.meilisearch-search-top-form::after {
content: "Ctrl K";
font-size: 10px;
color: var(--text-subtle);
background: var(--bg);
border: 1px solid var(--line);
border-radius: 4px;
padding: 0 5px;
line-height: 16px;
flex-shrink: 0;
pointer-events: none;
}
html[data-wxfs-active="1"] form.meilisearch-search-top-form:focus-within {
background: var(--wxfs-input-focus-bg) !important;
border-color: var(--brand) !important;
box-shadow: 0 0 0 2px var(--focus-ring) !important;
}
html[data-wxfs-active="1"] form.meilisearch-search-top-form input[type="search"] {
background: transparent !important;
border: 0 !important;
color: var(--text) !important;
font-size: 12.5px !important;
width: 100% !important;
min-width: 0 !important;
outline: none !important;
}
html[data-wxfs-active="1"] form.meilisearch-search-top-form button[type="submit"] {
background: transparent !important;
border: 0 !important;
color: var(--text-subtle) !important;
cursor: pointer !important;
padding: 0 2px !important;
display: inline-flex;
align-items: center;
}
html[data-wxfs-active="1"] .bar-action-group-after-search {
display: inline-flex !important;
align-items: center !important;
gap: 6px !important;
}
html[data-wxfs-active="1"] .color-scheme-top-link,
html[data-wxfs-active="1"] #wxfs-topbar-theme-btn,
html[data-wxfs-active="1"] #wxfs-right-toggle-btn {
display: inline-flex !important;
align-items: center !important;
justify-content: center !important;
width: 30px !important;
height: 30px !important;
border-radius: var(--radius-sm) !important;
border: 1px solid var(--line) !important;
background: var(--panel) !important;
color: var(--text-muted) !important;
cursor: pointer !important;
padding: 0 !important;
transition: border-color 0.15s, color 0.15s, background-color 0.15s !important;
}
html[data-wxfs-theme="wechat"] .color-scheme-top-link,
html[data-wxfs-theme="wechat"] #wxfs-topbar-theme-btn,
html[data-wxfs-theme="wechat"] #wxfs-right-toggle-btn {
border-color: transparent !important;
background: transparent !important;
}
html[data-wxfs-active="1"] .color-scheme-top-link:hover,
html[data-wxfs-active="1"] #wxfs-topbar-theme-btn:hover,
html[data-wxfs-active="1"] #wxfs-right-toggle-btn:hover,
html[data-wxfs-active="1"][data-wxfs-right-collapsed="0"] #wxfs-right-toggle-btn {
border-color: var(--brand) !important;
background: var(--brand-soft) !important;
color: var(--brand) !important;
}
html[data-wxfs-active="1"] .nav-mine .avatar-img {
border-radius: var(--wxfs-avatar-radius) !important;
}
/* =========================================================
微信桌面端双色分栏顶栏
========================================================= */
@media (min-width: 961px) {
html[data-wxfs-theme="wechat"][data-wxfs-left-collapsed="0"]:has(.forum-enhancements-left-fixed) .top {
left: calc(var(--wxfs-rail-w) + var(--wxfs-left-w)) !important;
}
html[data-wxfs-theme="wechat"][data-wxfs-left-collapsed="0"]:has(.forum-enhancements-left-fixed) .forum-enhancements-left-fixed {
top: 0 !important;
max-height: 100vh !important;
height: 100vh !important;
padding-top: var(--wxfs-header-h) !important;
}
html[data-wxfs-theme="wechat"][data-wxfs-left-collapsed="0"]:has(.forum-enhancements-left-fixed) form.meilisearch-search-top-form {
position: fixed !important;
top: 13px !important;
left: calc(var(--wxfs-rail-w) + 12px) !important;
width: calc(var(--wxfs-left-w) - 56px) !important;
height: 28px !important;
z-index: 94 !important;
border-radius: 4px !important;
background: var(--wxfs-input-bg) !important;
}
}
/* =========================================================
左栏(会话列表 / 飞书频道栏)与主内容区几何布局
========================================================= */
@media (min-width: 961px) {
html[data-wxfs-active="1"] .forum-enhancements-left-fixed {
position: fixed !important;
left: var(--wxfs-rail-w) !important;
width: var(--wxfs-left-w) !important;
overflow-y: auto !important;
overflow-x: hidden !important;
margin: 0 !important;
box-sizing: border-box !important;
z-index: 50 !important;
}
html[data-wxfs-theme="wechat"] .forum-enhancements-left-fixed {
top: var(--wxfs-header-h) !important;
bottom: 0 !important;
max-height: calc(100vh - var(--wxfs-header-h)) !important;
background: var(--wxfs-left-bg) !important;
border-right: 1px solid var(--wxfs-left-border) !important;
padding: 0 0 18px !important;
}
html[data-wxfs-theme="feishu"] .forum-enhancements-left-fixed {
top: calc(var(--wxfs-header-h) + 4px) !important;
bottom: 10px !important;
max-height: calc(100vh - var(--wxfs-header-h) - 14px) !important;
background: var(--wxfs-left-bg) !important;
border: 1px solid var(--wxfs-left-border) !important;
border-radius: var(--wxfs-card-radius) !important;
box-shadow: 0 1px 3px rgba(31, 35, 41, 0.03) !important;
padding: 6px 0 16px !important;
}
html[data-wxfs-active="1"] main.wrap {
width: 100% !important;
max-width: 100% !important;
margin: 0 !important;
padding: 12px 16px 32px 16px !important;
box-sizing: border-box !important;
}
html[data-wxfs-theme="wechat"] main.wrap:has(> .forum-enhancements-left-fixed) {
padding: 0 0 32px var(--wxfs-left-w) !important;
}
html[data-wxfs-theme="feishu"] main.wrap:has(> .forum-enhancements-left-fixed) {
padding: 4px 12px 28px calc(var(--wxfs-left-w) + 12px) !important;
}
html[data-wxfs-active="1"][data-wxfs-left-collapsed="1"] .forum-enhancements-left-fixed,
html[data-wxfs-active="1"][data-wxfs-left-collapsed="1"] #wxfs-left-header {
display: none !important;
}
html[data-wxfs-theme="wechat"][data-wxfs-left-collapsed="1"] main.wrap:has(> .forum-enhancements-left-fixed) {
padding-left: 0 !important;
}
html[data-wxfs-theme="feishu"][data-wxfs-left-collapsed="1"] main.wrap:has(> .forum-enhancements-left-fixed) {
padding-left: 12px !important;
}
html[data-wxfs-active="1"] .forum-enhancements-page-content {
margin-left: 0 !important;
padding-left: 0 !important;
width: 100% !important;
max-width: 100% !important;
box-sizing: border-box !important;
}
}
#wxfs-left-header {
display: none;
}
@media (min-width: 961px) {
html[data-wxfs-theme="wechat"][data-wxfs-left-collapsed="0"] #wxfs-left-header {
display: flex;
align-items: center;
justify-content: flex-end;
position: fixed;
top: 0;
left: var(--wxfs-rail-w);
width: var(--wxfs-left-w);
height: var(--wxfs-header-h);
padding: 0 12px;
box-sizing: border-box;
background: var(--wxfs-left-top-bg);
border-bottom: 1px solid var(--wxfs-header-border);
border-right: 1px solid var(--wxfs-left-border);
z-index: 93;
}
html[data-wxfs-theme="feishu"][data-wxfs-left-collapsed="0"] #wxfs-left-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 6px 14px 8px;
margin-bottom: 2px;
border-bottom: 1px solid var(--line);
font-size: 13px;
font-weight: 600;
color: var(--text);
}
}
.wxfs-left-plus-btn {
display: inline-flex;
align-items: center;
justify-content: center;
width: 28px;
height: 28px;
border-radius: 4px;
background: var(--wxfs-input-bg);
color: var(--text-muted);
text-decoration: none !important;
font-size: 18px;
line-height: 1;
transition: background-color 0.15s, color 0.15s;
}
.wxfs-left-plus-btn:hover {
background: var(--wxfs-left-active);
color: var(--text);
}
html[data-wxfs-theme="feishu"] .wxfs-left-plus-btn {
width: 24px;
height: 24px;
border-radius: 6px;
background: var(--brand-soft);
color: var(--brand);
font-size: 16px;
}
/* 左栏频道项 */
html[data-wxfs-active="1"] .forum-enhancements-left-navigation ul {
margin: 0 !important;
padding: 0 !important;
list-style: none !important;
display: flex;
flex-direction: column;
}
html[data-wxfs-theme="wechat"] .forum-enhancements-left-navigation li a {
display: flex !important;
align-items: center !important;
gap: 10px !important;
padding: 9px 12px !important;
margin: 0 !important;
border-radius: 0 !important;
color: var(--text) !important;
text-decoration: none !important;
background: transparent !important;
transition: background-color 0.12s !important;
}
html[data-wxfs-theme="wechat"] .forum-enhancements-left-navigation li a:hover {
background: var(--wxfs-left-hover) !important;
}
html[data-wxfs-theme="wechat"] .forum-enhancements-left-navigation li a.active {
background: var(--wxfs-left-active) !important;
}
html[data-wxfs-theme="feishu"] .forum-enhancements-left-navigation li a {
display: flex !important;
align-items: center !important;
gap: 10px !important;
padding: 7px 10px !important;
margin: 2px 8px !important;
border-radius: 8px !important;
color: var(--text) !important;
text-decoration: none !important;
transition: background-color 0.15s, color 0.15s !important;
}
html[data-wxfs-theme="feishu"] .forum-enhancements-left-navigation li a:hover {
background: var(--wxfs-left-hover) !important;
}
html[data-wxfs-theme="feishu"] .forum-enhancements-left-navigation li a.active {
background: var(--wxfs-left-active) !important;
color: var(--brand) !important;
font-weight: 600 !important;
}
html[data-wxfs-active="1"] .forum-enhancements-left-dot {
width: 32px !important;
height: 32px !important;
min-width: 32px !important;
border-radius: var(--wxfs-avatar-radius) !important;
background: var(--forum-enhancements-color, var(--brand)) !important;
color: #FFFFFF !important;
display: inline-flex !important;
align-items: center !important;
justify-content: center !important;
flex-shrink: 0 !important;
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.08);
}
html[data-wxfs-theme="feishu"] .forum-enhancements-left-dot {
width: 28px !important;
height: 28px !important;
min-width: 28px !important;
border-radius: 8px !important;
}
html[data-wxfs-active="1"] .forum-enhancements-left-dot svg {
width: 16px;
height: 16px;
}
html[data-wxfs-active="1"] .forum-enhancements-left-name {
flex: 1 1 auto !important;
min-width: 0 !important;
overflow: hidden !important;
text-overflow: ellipsis !important;
white-space: nowrap !important;
font-size: 13px !important;
}
html[data-wxfs-active="1"] .forum-enhancements-left-count {
font-size: 11px !important;
color: var(--text-subtle) !important;
flex-shrink: 0 !important;
}
html[data-wxfs-theme="feishu"] .forum-enhancements-left-count {
background: var(--wxfs-left-hover);
padding: 1px 6px;
border-radius: 10px;
}
html[data-wxfs-theme="feishu"] .forum-enhancements-left-navigation li a.active .forum-enhancements-left-count {
background: rgba(51, 112, 255, 0.14);
color: var(--brand) !important;
}
html[data-wxfs-active="1"] .forum-enhancements-left-announcements,
html[data-wxfs-active="1"] .daily_star_card {
background: transparent !important;
border: 0 !important;
border-top: 1px solid var(--wxfs-left-border) !important;
border-radius: 0 !important;
box-shadow: none !important;
margin: 8px 0 0 !important;
padding: 10px 12px 2px !important;
}
html[data-wxfs-theme="feishu"] .forum-enhancements-left-announcements,
html[data-wxfs-theme="feishu"] .daily_star_card {
border-top-color: var(--line) !important;
}
html[data-wxfs-active="1"] .daily_star_avatar,
html[data-wxfs-active="1"] .daily_star_avatar .avatar-img {
border-radius: var(--wxfs-avatar-radius) !important;
}
/* =========================================================
中间主区 + 右侧边栏整体布局
========================================================= */
html[data-wxfs-active="1"] .forum-layout,
html[data-wxfs-active="1"] .forum-layout.forum-layout-has-sidebar {
display: flex !important;
align-items: flex-start !important;
gap: 14px !important;
width: 100% !important;
}
html[data-wxfs-theme="wechat"] .forum-layout.forum-layout-has-sidebar {
gap: 0 !important;
}
html[data-wxfs-active="1"] .forum-main {
flex: 1 1 auto !important;
min-width: 0 !important;
}
html[data-wxfs-active="1"][data-wxfs-right-collapsed="1"] aside.sidebar {
display: none !important;
}
html[data-wxfs-theme="wechat"] .main-panel {
background: var(--wxfs-shell-bg) !important;
border: 0 !important;
border-radius: 0 !important;
box-shadow: none !important;
min-height: calc(100vh - var(--wxfs-header-h));
}
html[data-wxfs-theme="feishu"] .main-panel {
background: var(--wxfs-card-bg) !important;
border: 1px solid var(--wxfs-card-border) !important;
border-radius: var(--wxfs-card-radius) !important;
box-shadow: 0 1px 3px rgba(31, 35, 41, 0.04) !important;
overflow: hidden;
}
/* =========================================================
二页(帖子详情页)桌面端微信/飞书锁高聊天窗口 + 底部固定回复框
========================================================= */
html[data-wxfs-active="1"][data-wxfs-topic-page="1"],
html[data-wxfs-active="1"][data-wxfs-topic-page="1"] body {
height: 100vh !important;
height: 100dvh !important;
overflow: hidden !important;
}
html[data-wxfs-active="1"][data-wxfs-topic-page="1"] main.wrap {
height: 100% !important;
padding-bottom: 0 !important;
box-sizing: border-box !important;
}
html[data-wxfs-theme="feishu"][data-wxfs-topic-page="1"] main.wrap {
padding-bottom: 10px !important;
}
html[data-wxfs-active="1"][data-wxfs-topic-page="1"] .forum-enhancements-page-content,
html[data-wxfs-active="1"][data-wxfs-topic-page="1"] .home-shell,
html[data-wxfs-active="1"][data-wxfs-topic-page="1"] .forum-layout,
html[data-wxfs-active="1"][data-wxfs-topic-page="1"] .forum-main {
height: 100% !important;
min-height: 0 !important;
margin: 0 !important;
padding: 0 !important;
box-sizing: border-box !important;
}
html[data-wxfs-active="1"][data-wxfs-topic-page="1"] .main-panel {
height: 100% !important;
min-height: 0 !important;
display: flex !important;
flex-direction: column !important;
overflow: hidden !important;
box-sizing: border-box !important;
}
html[data-wxfs-active="1"][data-wxfs-topic-page="1"] aside.sidebar {
height: 100% !important;
overflow-y: auto !important;
box-sizing: border-box !important;
}
/* 顶部固定帖子标题栏 */
html[data-wxfs-active="1"][data-wxfs-topic-page="1"] .post-topic-title {
flex: 0 0 auto !important;
z-index: 10;
}
/* 中间独立滚动的消息流容器 (#wxfs-chat-scroll) */
#wxfs-chat-scroll {
flex: 1 1 0% !important;
min-height: 0 !important;
overflow-y: auto !important;
overflow-x: hidden !important;
-webkit-overflow-scrolling: touch;
scroll-behavior: smooth;
}
html[data-wxfs-active="1"][data-wxfs-topic-page="1"] .pagination-bar {
display: none !important;
}
/* 无限滚动状态栏与上一页跳转条 */
#wxfs-topic-load-status {
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
padding: 14px 18px 18px;
font-size: 12px;
color: var(--text-subtle);
user-select: none;
}
.wxfs-load-btn {
border: 1px solid var(--line);
background: var(--panel);
color: var(--text-muted);
border-radius: var(--radius-sm);
padding: 4px 12px;
font-size: 12px;
cursor: pointer;
transition: border-color 0.15s, color 0.15s;
}
.wxfs-load-btn:hover {
border-color: var(--brand);
color: var(--brand);
}
.wxfs-spinner {
width: 14px;
height: 14px;
border: 2px solid var(--line);
border-top-color: var(--brand);
border-radius: 50%;
animation: wxfsSpin 0.7s linear infinite;
}
@keyframes wxfsSpin {
to { transform: rotate(360deg); }
}
#wxfs-prev-page-banner {
display: flex;
align-items: center;
justify-content: center;
padding: 8px 16px 2px;
}
/* =========================================================
帖子顶部工具栏 (.topic-toolbar)
========================================================= */
html[data-wxfs-active="1"] .topic-toolbar {
display: flex !important;
align-items: center !important;
gap: 8px !important;
flex-wrap: wrap !important;
padding: 10px 18px !important;
border-bottom: 1px solid var(--line) !important;
background: transparent !important;
}
html[data-wxfs-theme="wechat"] .topic-toolbar {
background: var(--wxfs-shell-bg) !important;
border-bottom-color: var(--wxfs-header-border) !important;
}
html[data-wxfs-active="1"] .tab-bar {
display: flex !important;
align-items: center !important;
gap: 4px !important;
flex-wrap: wrap !important;
flex: 1 1 auto !important;
}
html[data-wxfs-active="1"] .tab-bar .tab {
font-size: 13px !important;
padding: 4px 10px !important;
border-radius: var(--radius-sm) !important;
color: var(--text-muted) !important;
text-decoration: none !important;
border: 0 !important;
background: transparent !important;
transition: background-color 0.15s, color 0.15s !important;
}
html[data-wxfs-active="1"] .tab-bar .tab:hover {
background: var(--wxfs-left-hover) !important;
color: var(--text) !important;
}
html[data-wxfs-active="1"] .tab-bar .tab.active {
background: var(--brand-soft) !important;
color: var(--brand) !important;
font-weight: 600 !important;
}
html[data-wxfs-active="1"] .home-keyword-filter-button {
background: var(--panel) !important;
border: 1px solid var(--line) !important;
border-radius: var(--radius-sm) !important;
color: var(--text-muted) !important;
font-size: 12px !important;
padding: 4px 10px !important;
cursor: pointer !important;
}
html[data-wxfs-active="1"] .notify-badge {
background: var(--wxfs-badge-red) !important;
color: #FFFFFF !important;
border-radius: 999px !important;
}
html[data-wxfs-active="1"] a.tab-post,
html[data-wxfs-active="1"] a.btn-post,
html[data-wxfs-active="1"] .btn:not(.alt) {
background: var(--brand) !important;
border-color: var(--brand) !important;
color: #FFFFFF !important;
border-radius: var(--radius-sm) !important;
font-weight: 500 !important;
}
html[data-wxfs-active="1"] a.tab-post:hover,
html[data-wxfs-active="1"] a.btn-post:hover,
html[data-wxfs-active="1"] .btn:not(.alt):hover {
background: var(--brand-hover) !important;
border-color: var(--brand-hover) !important;
}
html[data-wxfs-active="1"] .btn.alt {
background: var(--wxfs-left-hover) !important;
border: 1px solid var(--line) !important;
color: var(--text) !important;
border-radius: var(--radius-sm) !important;
}
/* =========================================================
通用头像形状
========================================================= */
html[data-wxfs-active="1"] .post-avatar,
html[data-wxfs-active="1"] .post-avatar .avatar-profile-link,
html[data-wxfs-active="1"] .post-avatar .avatar-img {
border-radius: var(--wxfs-avatar-radius) !important;
}
html[data-wxfs-active="1"] .online-users-dot {
background: var(--success) !important;
}
/* =========================================================
一页(首页 / 版块帖子列表)
========================================================= */
html[data-wxfs-active="1"] ul.post-list:not(.topic-post-list) {
margin: 0 !important;
padding: 8px 0 18px !important;
list-style: none !important;
}
html[data-wxfs-theme="wechat"][data-wxfs-bubble="1"] ul.post-list:not(.topic-post-list) > .post-item:not(.post-entry):not(.home-keyword-filter-hidden):not([hidden]) {
display: flex !important;
align-items: flex-start !important;
gap: 12px !important;
padding: 9px 20px !important;
margin: 0 !important;
border: 0 !important;
background: transparent !important;
}
html[data-wxfs-theme="wechat"][data-wxfs-bubble="1"] .post-item:not(.post-entry) .post-avatar img {
width: 38px !important;
height: 38px !important;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
html[data-wxfs-theme="wechat"][data-wxfs-bubble="1"] .post-item:not(.post-entry) .post-body {
display: flex !important;
flex-direction: column !important;
align-items: flex-start !important;
gap: 5px !important;
min-width: 0 !important;
flex: 1 1 auto !important;
}
html[data-wxfs-theme="wechat"][data-wxfs-bubble="1"] .post-item:not(.post-entry) .post-meta {
order: -1 !important;
font-size: 12px !important;
color: var(--text-subtle) !important;
display: flex !important;
align-items: center !important;
flex-wrap: wrap !important;
gap: 8px !important;
line-height: 1.3 !important;
}
html[data-wxfs-theme="wechat"][data-wxfs-bubble="1"] .post-item:not(.post-entry) .post-title-row {
position: relative !important;
background: var(--wxfs-bubble-bg) !important;
padding: 9px 14px !important;
border-radius: 5px !important;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
max-width: min(760px, 100%) !important;
display: inline-flex !important;
flex-wrap: wrap !important;
align-items: center !important;
gap: 6px !important;
transition: background-color 0.12s !important;
}
html[data-wxfs-theme="wechat"][data-wxfs-bubble="1"] .post-item:not(.post-entry) .post-title-row::before {
content: "";
position: absolute;
left: -6px;
top: 11px;
width: 0;
height: 0;
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
border-right: 6px solid var(--wxfs-bubble-bg);
transition: border-right-color 0.12s;
}
html[data-wxfs-theme="wechat"][data-wxfs-bubble="1"] .post-item:not(.post-entry):hover .post-title-row {
background: var(--wxfs-bubble-hover) !important;
}
html[data-wxfs-theme="wechat"][data-wxfs-bubble="1"] .post-item:not(.post-entry):hover .post-title-row::before {
border-right-color: var(--wxfs-bubble-hover);
}
html[data-wxfs-theme="wechat"][data-wxfs-bubble="1"] .post-item:not(.post-entry)[data-wxfs-self="1"] .post-title-row {
background: var(--wxfs-bubble-self-bg) !important;
}
html[data-wxfs-theme="wechat"][data-wxfs-bubble="1"] .post-item:not(.post-entry)[data-wxfs-self="1"] .post-title-row::before {
border-right-color: var(--wxfs-bubble-self-bg) !important;
}
html[data-wxfs-theme="wechat"][data-wxfs-bubble="1"] .post-item:not(.post-entry)[data-wxfs-self="1"]:hover .post-title-row {
background: var(--wxfs-bubble-self-hover) !important;
}
html[data-wxfs-theme="wechat"][data-wxfs-bubble="1"] .post-item:not(.post-entry)[data-wxfs-self="1"]:hover .post-title-row::before {
border-right-color: var(--wxfs-bubble-self-hover) !important;
}
html[data-wxfs-theme="wechat"][data-wxfs-bubble="1"] .post-item:not(.post-entry)[data-wxfs-self="1"] .post-title {
color: var(--wxfs-bubble-self-text) !important;
}
html[data-wxfs-theme="wechat"][data-wxfs-bubble="1"] .post-item:not(.post-entry).topic-pinned {
background: var(--wxfs-pinned-bg) !important;
border-bottom: 1px solid var(--line) !important;
padding-top: 8px !important;
padding-bottom: 8px !important;
}
html[data-wxfs-theme="wechat"][data-wxfs-bubble="1"] .post-item:not(.post-entry) > .post-forum-badge {
display: none !important;
}
html[data-wxfs-theme="wechat"][data-wxfs-bubble="0"] ul.post-list:not(.topic-post-list) > .post-item:not(.post-entry):not(.home-keyword-filter-hidden):not([hidden]) {
display: flex !important;
align-items: center !important;
gap: 12px !important;
padding: 11px 18px !important;
border-bottom: 1px solid var(--line) !important;
background: var(--panel) !important;
}
html[data-wxfs-theme="wechat"][data-wxfs-bubble="0"] .post-item:not(.post-entry):hover {
background: var(--wxfs-bubble-hover) !important;
}
html[data-wxfs-theme="wechat"][data-wxfs-bubble="0"] .post-item:not(.post-entry).topic-pinned {
background: var(--wxfs-pinned-bg) !important;
}
html[data-wxfs-theme="feishu"][data-wxfs-bubble="1"] ul.post-list:not(.topic-post-list) {
padding: 10px 14px 18px !important;
display: flex;
flex-direction: column;
gap: 8px;
}
html[data-wxfs-theme="feishu"][data-wxfs-bubble="1"] ul.post-list:not(.topic-post-list) > .post-item:not(.post-entry):not(.home-keyword-filter-hidden):not([hidden]) {
display: flex !important;
align-items: flex-start !important;
gap: 12px !important;
padding: 13px 16px !important;
border: 1px solid var(--line) !important;
border-radius: 8px !important;
background: var(--wxfs-bubble-bg) !important;
transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s !important;
}
html[data-wxfs-theme="feishu"][data-wxfs-bubble="1"] .post-item:not(.post-entry):hover {
border-color: rgba(51, 112, 255, 0.42) !important;
background: var(--wxfs-bubble-hover) !important;
box-shadow: 0 2px 8px rgba(51, 112, 255, 0.06) !important;
}
html[data-wxfs-theme="feishu"][data-wxfs-bubble="1"] .post-item:not(.post-entry).topic-pinned {
background: var(--wxfs-pinned-bg) !important;
border-color: rgba(245, 166, 35, 0.32) !important;
}
html[data-wxfs-theme="feishu"][data-wxfs-bubble="0"] ul.post-list:not(.topic-post-list) > .post-item:not(.post-entry):not(.home-keyword-filter-hidden):not([hidden]) {
display: flex !important;
padding: 11px 18px !important;
border-bottom: 1px solid var(--line) !important;
}
html[data-wxfs-theme="feishu"][data-wxfs-bubble="0"] .post-item:not(.post-entry):hover {
background: var(--wxfs-left-hover) !important;
}
html[data-wxfs-theme="feishu"] .post-item:not(.post-entry) .post-forum-badge {
background: var(--brand-soft) !important;
color: var(--brand) !important;
border-radius: 4px !important;
border: 0 !important;
font-size: 11.5px !important;
font-weight: 500 !important;
padding: 2px 8px !important;
}
html[data-wxfs-active="1"] .post-item:not(.post-entry) .post-title {
color: var(--text) !important;
font-size: 14.5px !important;
font-weight: 500 !important;
line-height: 1.45 !important;
text-decoration: none !important;
}
html[data-wxfs-theme="feishu"] .post-item:not(.post-entry) .post-title {
font-weight: 600 !important;
}
html[data-wxfs-active="1"] .post-item:not(.post-entry) .post-title:hover {
color: var(--brand) !important;
}
/* =========================================================
二页(帖子详情页 /topic/xxx):标题栏与消息气泡流
========================================================= */
html[data-wxfs-active="1"] .breadcrumb {
padding: 10px 20px 2px !important;
font-size: 12px !important;
color: var(--text-subtle) !important;
display: flex;
align-items: center;
gap: 6px;
}
html[data-wxfs-active="1"] .breadcrumb a {
color: var(--text-muted) !important;
text-decoration: none;
}
html[data-wxfs-active="1"] .breadcrumb a:hover {
color: var(--brand) !important;
}
html[data-wxfs-active="1"] .post-topic-title {
padding: 10px 20px 10px !important;
margin: 0 !important;
border-bottom: 1px solid var(--line) !important;
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 8px 12px;
background: var(--wxfs-header-bg) !important;
}
html[data-wxfs-theme="feishu"] .post-topic-title {
background: var(--panel) !important;
}
html[data-wxfs-active="1"] .post-content-title {
margin: 0 !important;
font-size: 16.5px !important;
font-weight: 600 !important;
line-height: 1.35 !important;
flex: 1 1 300px;
}
html[data-wxfs-active="1"] .post-content-title a {
color: var(--text) !important;
text-decoration: none !important;
}
html[data-wxfs-active="1"] .post-content-title a:hover {
color: var(--brand) !important;
}
html[data-wxfs-active="1"] .post-content-stats {
display: inline-flex;
align-items: center;
gap: 12px;
font-size: 12px;
color: var(--text-subtle);
}
html[data-wxfs-active="1"] .post-content-stats span {
display: inline-flex;
align-items: center;
gap: 4px;
}
html[data-wxfs-active="1"] .post-content-stats svg {
width: 14px;
height: 14px;
}
/* 详情页楼层列表 */
html[data-wxfs-active="1"] ul.topic-post-list {
margin: 0 !important;
padding: 8px 0 6px !important;
list-style: none !important;
display: flex;
flex-direction: column;
}
html[data-wxfs-theme="feishu"] ul.topic-post-list {
padding: 10px 16px 6px !important;
gap: 10px;
}
html[data-wxfs-active="1"] ul.topic-post-list > li.post-item.post-entry:not(.home-keyword-filter-hidden):not([hidden]) {
display: grid !important;
grid-template-columns: 40px minmax(0, 1fr) !important;
column-gap: 12px !important;
row-gap: 6px !important;
align-items: start !important;
box-sizing: border-box !important;
}
html[data-wxfs-theme="wechat"] ul.topic-post-list > li.post-item.post-entry:not(.home-keyword-filter-hidden):not([hidden]) {
padding: 9px 20px !important;
margin: 0 !important;
border: 0 !important;
background: transparent !important;
}
html[data-wxfs-theme="feishu"] ul.topic-post-list > li.post-item.post-entry:not(.home-keyword-filter-hidden):not([hidden]) {
padding: 13px 16px !important;
margin: 0 !important;
border: 1px solid var(--line) !important;
border-radius: 8px !important;
background: var(--wxfs-bubble-bg) !important;
}
html[data-wxfs-active="1"] ul.topic-post-list > li.post-item.post-entry.quote-threads-child:not(.home-keyword-filter-hidden):not([hidden]) {
margin-left: 34px !important;
border-left: 2px solid var(--line) !important;
padding-left: 14px !important;
}
html[data-wxfs-theme="wechat"] ul.topic-post-list > li.post-item.post-entry.quote-threads-child:not(.home-keyword-filter-hidden):not([hidden]) {
margin-left: 48px !important;
}
html[data-wxfs-active="1"] ul.topic-post-list > li.post-item.post-entry > .post-avatar {
grid-column: 1 !important;
grid-row: 1 / span 3 !important;
margin: 0 !important;
}
html[data-wxfs-active="1"] ul.topic-post-list > li.post-item.post-entry > .post-avatar img {
width: 38px !important;
height: 38px !important;
display: block;
}
html[data-wxfs-active="1"] ul.topic-post-list > li.post-item.post-entry > .post-body {
grid-column: 2 !important;
grid-row: 1 !important;
display: flex !important;
flex-direction: row !important;
flex-wrap: wrap !important;
align-items: center !important;
justify-content: space-between !important;
gap: 6px 12px !important;
min-width: 0 !important;
padding: 0 !important;
margin: 0 !important;
}
html[data-wxfs-active="1"] .post-entry .post-head,
html[data-wxfs-active="1"] .post-entry .post-info {
display: flex !important;
align-items: center !important;
flex-wrap: wrap !important;
gap: 6px !important;
order: 0 !important;
}
html[data-wxfs-active="1"] .post-entry .post-author {
font-size: 13px !important;
font-weight: 600 !important;
color: var(--text-muted) !important;
text-decoration: none !important;
}
html[data-wxfs-theme="feishu"] .post-entry .post-author {
color: var(--text) !important;
}
html[data-wxfs-active="1"] .post-entry .post-author:hover {
color: var(--brand) !important;
}
html[data-wxfs-active="1"] .post-entry .post-meta {
order: 1 !important;
display: inline-flex !important;
align-items: center !important;
flex-wrap: wrap !important;
gap: 6px 10px !important;
font-size: 12px !important;
color: var(--text-subtle) !important;
}
html[data-wxfs-active="1"] .post-entry .post-ops {
display: inline-flex !important;
align-items: center !important;
flex-wrap: wrap !important;
gap: 4px !important;
}
html[data-wxfs-active="1"] .post-entry .post-ops a,
html[data-wxfs-active="1"] .post-entry .post-ops button,
html[data-wxfs-active="1"] .post-entry .post-ops .fav-btn {
display: inline-flex !important;
align-items: center !important;
gap: 3px !important;
padding: 2px 7px !important;
border-radius: var(--radius-sm) !important;
border: 0 !important;
background: transparent !important;
color: var(--text-subtle) !important;
font-size: 12px !important;
cursor: pointer !important;
text-decoration: none !important;
transition: background-color 0.12s, color 0.12s !important;
}
html[data-wxfs-active="1"] .post-entry .post-ops a:hover,
html[data-wxfs-active="1"] .post-entry .post-ops button:hover,
html[data-wxfs-active="1"] .post-entry .post-ops .fav-btn:hover {
background: var(--wxfs-left-hover) !important;
color: var(--brand) !important;
}
html[data-wxfs-active="1"] .post-entry .post-ops svg {
width: 13px !important;
height: 13px !important;
stroke: currentColor;
}
html[data-wxfs-active="1"] .post-entry .post-floor {
font-weight: 600 !important;
color: var(--text-muted) !important;
}
/* 详情页正文:微信聊天气泡 */
html[data-wxfs-active="1"] ul.topic-post-list > li.post-item.post-entry > .post-content {
grid-column: 2 !important;
grid-row: 2 !important;
min-width: 0 !important;
margin: 0 !important;
box-sizing: border-box !important;
}
html[data-wxfs-theme="wechat"][data-wxfs-bubble="1"] ul.topic-post-list > li.post-item.post-entry > .post-content {
position: relative !important;
background: var(--wxfs-bubble-bg) !important;
color: var(--text) !important;
padding: 10px 14px !important;
border-radius: 5px !important;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
width: fit-content !important;
max-width: 100% !important;
}
html[data-wxfs-theme="wechat"][data-wxfs-bubble="1"] ul.topic-post-list > li.post-item.post-entry > .post-content:has(.donate-area),
html[data-wxfs-theme="wechat"][data-wxfs-bubble="1"] ul.topic-post-list > li.post-item.post-entry:first-child > .post-content {
width: 100% !important;
}
html[data-wxfs-theme="wechat"][data-wxfs-bubble="1"] ul.topic-post-list > li.post-item.post-entry > .post-content::before {
content: "";
position: absolute;
left: -6px;
top: 12px;
width: 0;
height: 0;
border-top: 5px solid transparent;
border-bottom: 5px solid transparent;
border-right: 6px solid var(--wxfs-bubble-bg);
}
html[data-wxfs-theme="wechat"][data-wxfs-bubble="1"] ul.topic-post-list > li.post-item.post-entry[data-wxfs-self="1"] > .post-content {
background: var(--wxfs-bubble-self-bg) !important;
color: var(--wxfs-bubble-self-text) !important;
}
html[data-wxfs-theme="wechat"][data-wxfs-bubble="1"] ul.topic-post-list > li.post-item.post-entry[data-wxfs-self="1"] > .post-content::before {
border-right-color: var(--wxfs-bubble-self-bg) !important;
}
html[data-wxfs-theme="wechat"][data-wxfs-bubble="1"] ul.topic-post-list > li.post-item.post-entry[data-wxfs-self="1"] > .post-content a {
color: #0B4F8A !important;
}
html[data-wxfs-theme="wechat"][data-wxfs-bubble="0"] ul.topic-post-list > li.post-item.post-entry {
background: var(--panel) !important;
border-bottom: 1px solid var(--line) !important;
padding: 13px 20px !important;
}
html[data-wxfs-active="1"] .nb-editor-post-content {
font-size: 14.5px !important;
line-height: 1.65 !important;
word-break: break-word !important;
}
html[data-wxfs-active="1"] .nb-editor-post-content p:first-child {
margin-top: 0 !important;
}
html[data-wxfs-active="1"] .nb-editor-post-content p:last-child {
margin-bottom: 0 !important;
}
html[data-wxfs-active="1"] .nb-editor-post-content img {
max-width: 100%;
height: auto;
border-radius: 4px;
}
html[data-wxfs-active="1"] .nb-editor-post-content a {
color: var(--brand);
}
html[data-wxfs-active="1"] .post-mention {
background: var(--brand-soft) !important;
color: var(--brand) !important;
padding: 0 4px !important;
border-radius: 3px !important;
text-decoration: none !important;
}
html[data-wxfs-active="1"] .post-signature-content {
margin-top: 8px !important;
padding-top: 6px !important;
border-top: 1px dashed var(--line) !important;
font-size: 12px !important;
color: var(--text-subtle) !important;
}
html[data-wxfs-active="1"][data-wxfs-stealth="1"] .post-signature-content {
display: none !important;
}
html[data-wxfs-active="1"] .node-topic-tags {
display: flex;
flex-wrap: wrap;
gap: 6px;
margin-bottom: 10px;
}
html[data-wxfs-active="1"] .node-topic-tag {
display: inline-flex;
align-items: center;
gap: 4px;
padding: 2px 8px;
border-radius: var(--radius-sm);
background: var(--brand-soft) !important;
color: var(--brand) !important;
border: 0 !important;
font-size: 12px;
text-decoration: none;
cursor: pointer;
}
/* 主楼下方:快捷回复 + 红包卡片 */
html[data-wxfs-active="1"] ul.topic-post-list > li.post-item.post-entry > .quick-reply-main-action {
grid-column: 2 !important;
grid-row: 3 !important;
display: flex !important;
flex-wrap: wrap !important;
align-items: center !important;
gap: 8px !important;
margin-top: 6px !important;
min-width: 0 !important;
}
html[data-wxfs-active="1"] .quick-reply-main-action > input[type="text"] {
flex: 1 1 220px !important;
min-width: 0 !important;
height: 34px !important;
padding: 0 12px !important;
background: var(--panel) !important;
border: 1px solid var(--line) !important;
border-radius: var(--radius-sm) !important;
color: var(--text) !important;
font-size: 13px !important;
box-sizing: border-box !important;
}
html[data-wxfs-active="1"] .quick-reply-main-action > button[type="button"] {
height: 34px !important;
padding: 0 16px !important;
border: 0 !important;
border-radius: var(--radius-sm) !important;
background: var(--brand) !important;
color: #FFFFFF !important;
font-size: 13px !important;
font-weight: 500 !important;
cursor: pointer !important;
transition: background-color 0.15s !important;
}
html[data-wxfs-active="1"] .quick-reply-main-action > button[type="button"]:hover {
background: var(--brand-hover) !important;
}
html[data-wxfs-active="1"] .quick-reply-main-action > .red-packet-card {
flex: 1 0 100% !important;
margin-top: 4px !important;
background: var(--panel) !important;
border: 1px solid var(--line) !important;
border-radius: var(--wxfs-card-radius) !important;
}
/* =========================================================
固定在底部的微信 / 飞书式回复框 (#reply.reply-panel)
========================================================= */
html[data-wxfs-active="1"] .reply-panel,
html[data-wxfs-active="1"] .form-panel {
background: var(--wxfs-composer-bg) !important;
color: var(--text) !important;
}
html[data-wxfs-active="1"][data-wxfs-topic-page="1"] .reply-panel {
flex: 0 0 auto !important;
margin: 0 !important;
padding: 6px 18px 10px !important;
border: 0 !important;
border-top: 1px solid var(--line) !important;
border-radius: 0 !important;
box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.03) !important;
z-index: 20 !important;
overflow: visible !important;
}
html[data-wxfs-theme="feishu"][data-wxfs-topic-page="1"] .reply-panel {
padding: 8px 16px 12px !important;
}
html[data-wxfs-active="1"] .reply-panel-head {
display: flex !important;
align-items: center !important;
justify-content: space-between !important;
margin-bottom: 6px !important;
padding: 0 !important;
border: 0 !important;
min-height: 22px;
}
html[data-wxfs-active="1"] .reply-panel-head-left {
display: flex;
align-items: center;
gap: 8px;
}
html[data-wxfs-active="1"] .reply-panel-head h3 {
margin: 0 !important;
font-size: 12.5px !important;
font-weight: 600 !important;
color: var(--text-muted) !important;
}
html[data-wxfs-active="1"] .reply-panel-head .reply-status {
font-size: 11.5px !important;
color: var(--text-subtle) !important;
}
#wxfs-reply-min-btn {
border: 0;
background: transparent;
color: var(--text-muted);
font-size: 12px;
padding: 2px 8px;
border-radius: var(--radius-sm);
cursor: pointer;
transition: background-color 0.12s, color 0.12s;
}
#wxfs-reply-min-btn:hover {
background: var(--wxfs-left-hover);
color: var(--brand);
}
/* 最小化状态(点击即展开) */
html[data-wxfs-active="1"] .reply-panel.is-minimized {
padding: 8px 18px !important;
cursor: pointer;
}
html[data-wxfs-active="1"] .reply-panel.is-minimized .reply-panel-head {
margin-bottom: 0 !important;
}
html[data-wxfs-active="1"] .reply-panel.is-minimized form.ajax-reply-form {
display: none !important;
}
/* NB 编辑器融合微信/飞书输入区 */
html[data-wxfs-active="1"] .reply-panel .nb-editor-field {
display: flex !important;
flex-direction: column !important;
border: 1px solid var(--line) !important;
border-radius: var(--radius-sm) !important;
background: var(--panel) !important;
overflow: hidden;
transition: border-color 0.15s, box-shadow 0.15s;
}
html[data-wxfs-theme="wechat"] .reply-panel .nb-editor-field {
border-color: transparent !important;
background: transparent !important;
}
html[data-wxfs-theme="wechat"] .reply-panel .nb-editor-field:focus-within {
box-shadow: none !important;
}
html[data-wxfs-theme="feishu"] .reply-panel .nb-editor-field:focus-within {
border-color: var(--brand) !important;
box-shadow: 0 0 0 2px var(--focus-ring) !important;
}
/* 编辑器工具栏置顶 */
html[data-wxfs-active="1"] .reply-panel .nb-editor-field > .nb-editor {
order: -1 !important;
border-bottom: 1px solid var(--line-soft) !important;
background: transparent !important;
}
html[data-wxfs-theme="wechat"] .reply-panel .nb-editor-field > .nb-editor {
border-bottom: 0 !important;
}
html[data-wxfs-active="1"] .nb-editor-bar {
display: flex !important;
flex-wrap: wrap !important;
align-items: center !important;
gap: 2px !important;
padding: 2px 4px 4px !important;
background: transparent !important;
border: 0 !important;
}
html[data-wxfs-theme="feishu"] .nb-editor-bar {
padding: 4px 8px !important;
}
html[data-wxfs-active="1"] .nb-editor-btn {
display: inline-flex !important;
align-items: center !important;
justify-content: center !important;
min-width: 26px !important;
height: 26px !important;
padding: 0 4px !important;
border: 0 !important;
border-radius: var(--radius-sm) !important;
background: transparent !important;
color: var(--text-muted) !important;
cursor: pointer !important;
transition: background-color 0.12s, color 0.12s !important;
}
html[data-wxfs-active="1"] .nb-editor-btn:hover {
background: var(--wxfs-left-hover) !important;
color: var(--brand) !important;
}
html[data-wxfs-active="1"] .nb-editor-btn svg {
width: 15px !important;
height: 15px !important;
display: block !important;
}
html[data-wxfs-active="1"] .nb-editor-split {
display: inline-block !important;
width: 1px !important;
height: 14px !important;
background: var(--line) !important;
margin: 0 4px !important;
}
html[data-wxfs-active="1"] .nb-editor-space {
flex: 1 1 auto !important;
}
/* 输入框高度紧凑化(可拖拽拉高) */
html[data-wxfs-active="1"] .reply-panel .nb-editor-field > label.grid {
display: block !important;
margin: 0 !important;
padding: 0 !important;
position: relative !important;
}
html[data-wxfs-active="1"] .reply-panel .nb-editor-field > label.grid > span:first-child {
display: none !important;
}
html[data-wxfs-active="1"] .reply-panel .nb-editor-field textarea[name="body"] {
display: block !important;
width: 100% !important;
height: 68px !important;
min-height: 46px !important;
max-height: 240px !important;
padding: 6px 46px 8px 8px !important;
margin: 0 !important;
border: 0 !important;
box-shadow: none !important;
background: transparent !important;
color: var(--text) !important;
font-family: var(--wxfs-font) !important;
font-size: 14px !important;
line-height: 1.55 !important;
resize: vertical !important;
box-sizing: border-box !important;
outline: none !important;
}
html[data-wxfs-theme="feishu"] .reply-panel .nb-editor-field textarea[name="body"] {
padding: 8px 48px 8px 12px !important;
background: var(--panel) !important;
}
html[data-wxfs-active="1"] .reply-panel .attachment-drop-float {
bottom: 6px !important;
right: 6px !important;
border-color: var(--line) !important;
background: var(--panel) !important;
color: var(--text-muted) !important;
border-radius: var(--radius-sm) !important;
}
html[data-wxfs-active="1"] .reply-panel .attachment-drop-float:hover {
border-color: var(--brand) !important;
color: var(--brand) !important;
}
html[data-wxfs-active="1"] .reply-panel .attachment-drop-float svg {
width: 14px !important;
height: 14px !important;
}
/* 附件区在吸底回复框中紧凑展示 */
html[data-wxfs-active="1"] .reply-panel .attachment-field {
margin-top: 4px !important;
}
html[data-wxfs-active="1"] .reply-panel .attachment-upload-toolbar {
font-size: 11.5px !important;
}
html[data-wxfs-active="1"] .reply-panel .attachment-upload-list {
max-height: 44px !important;
overflow-y: auto !important;
}
html[data-wxfs-active="1"] .attachment-upload-item {
background: var(--panel) !important;
border-color: var(--line) !important;
border-radius: var(--radius-sm) !important;
padding: 3px 8px !important;
}
html[data-wxfs-active="1"] .attachment-upload-progress > span {
background: var(--brand) !important;
}
/* 发送栏 */
html[data-wxfs-active="1"] .reply-panel .quick-reply-actions {
display: flex !important;
align-items: center !important;
justify-content: flex-end !important;
gap: 10px !important;
margin-top: 6px !important;
}
html[data-wxfs-active="1"] .reply-panel .quick-reply-mention {
display: inline-flex !important;
align-items: center !important;
height: 30px !important;
padding: 0 12px !important;
border-radius: var(--radius-sm) !important;
background: var(--wxfs-left-hover) !important;
color: var(--text-muted) !important;
font-size: 12px !important;
text-decoration: none !important;
transition: color 0.15s, background-color 0.15s !important;
}
html[data-wxfs-active="1"] .reply-panel .quick-reply-mention:hover {
color: var(--brand) !important;
background: var(--brand-soft) !important;
}
html[data-wxfs-active="1"] .reply-panel .quick-reply-actions button[type="submit"] {
min-width: 90px !important;
height: 30px !important;
padding: 0 18px !important;
border: 0 !important;
border-radius: var(--radius-sm) !important;
background: var(--brand) !important;
color: #FFFFFF !important;
font-size: 13px !important;
font-weight: 500 !important;
cursor: pointer !important;
transition: background-color 0.15s !important;
}
html[data-wxfs-active="1"] .reply-panel .quick-reply-actions button[type="submit"]:hover {
background: var(--brand-hover) !important;
}
/* 推荐节点区放在滚动流末尾 */
html[data-wxfs-active="1"] .node-popular {
margin: 8px 20px 20px !important;
padding: 12px 14px !important;
background: var(--panel) !important;
border: 1px solid var(--line) !important;
border-radius: var(--wxfs-card-radius) !important;
}
html[data-wxfs-theme="feishu"] .node-popular {
margin: 8px 16px 18px !important;
border-radius: 10px !important;
}
html[data-wxfs-active="1"] .node-popular-link {
background: var(--bg) !important;
border-color: var(--line) !important;
border-radius: var(--radius-sm) !important;
}
html[data-wxfs-active="1"] .node-popular-link:hover {
border-color: var(--brand) !important;
color: var(--brand) !important;
}
/* =========================================================
通用 Meta & 徽章
========================================================= */
html[data-wxfs-active="1"] .post-meta a {
color: var(--text-muted) !important;
}
html[data-wxfs-active="1"] .post-meta a:hover {
color: var(--brand) !important;
}
html[data-wxfs-active="1"] .post-meta svg.meta-icon,
html[data-wxfs-active="1"] .node-list-tags svg {
width: 13px;
height: 13px;
vertical-align: -2px;
opacity: 0.72;
}
html[data-wxfs-active="1"] .topic-badge,
html[data-wxfs-active="1"] .red-packet-title-status,
html[data-wxfs-active="1"] .community-lottery-title-status,
html[data-wxfs-active="1"] .virtual-card-title-status,
html[data-wxfs-active="1"] .unread-topic-notice,
html[data-wxfs-active="1"] .resource_vote-rate {
border-radius: 4px !important;
font-size: 11px !important;
padding: 1px 6px !important;
font-weight: 500 !important;
}
html[data-wxfs-active="1"] .unread-topic-notice {
background: var(--wxfs-badge-red) !important;
color: #FFFFFF !important;
border-radius: 999px !important;
}
html[data-wxfs-theme="feishu"] .topic-badge.pinned {
background: #FFF3E0 !important;
color: #D87200 !important;
}
html[data-wxfs-theme="wechat"] .topic-badge.pinned {
background: var(--brand-soft) !important;
color: var(--brand) !important;
}
html[data-wxfs-active="1"][data-wxfs-stealth="1"] .self-pin-promotion-badge,
html[data-wxfs-active="1"][data-wxfs-stealth="1"] .virtual-card-list-price,
html[data-wxfs-active="1"][data-wxfs-stealth="1"] .red-packet-title-tags {
opacity: 0.65;
filter: grayscale(0.45);
}
/* =========================================================
右侧边栏(展开时样式)
========================================================= */
@media (min-width: 961px) {
html[data-wxfs-active="1"] aside.sidebar {
flex: 0 0 272px !important;
width: 272px !important;
max-width: 272px !important;
margin: 0 !important;
}
html[data-wxfs-theme="wechat"] aside.sidebar {
background: var(--panel) !important;
border-left: 1px solid var(--wxfs-header-border) !important;
padding: 12px !important;
box-sizing: border-box !important;
min-height: calc(100vh - var(--wxfs-header-h));
}
}
html[data-wxfs-active="1"] .sidebar-card {
background: var(--wxfs-card-bg) !important;
border: 1px solid var(--wxfs-card-border) !important;
border-radius: var(--wxfs-card-radius) !important;
box-shadow: none !important;
}
html[data-wxfs-theme="wechat"] aside.sidebar .sidebar-card {
border-color: transparent !important;
border-bottom: 1px solid var(--line) !important;
border-radius: 0 !important;
padding-left: 4px !important;
padding-right: 4px !important;
}
html[data-wxfs-theme="feishu"] .sidebar-card {
box-shadow: 0 1px 3px rgba(31, 35, 41, 0.03) !important;
}
html[data-wxfs-active="1"] .user-avatar-big,
html[data-wxfs-active="1"] .user-avatar-big .avatar-img,
html[data-wxfs-active="1"] .nu-avatar-circle,
html[data-wxfs-active="1"] .nu-avatar-circle .avatar-img,
html[data-wxfs-active="1"] .online-users-avatar,
html[data-wxfs-active="1"] .online-users-avatar .avatar-img {
border-radius: var(--wxfs-avatar-radius) !important;
}
html[data-wxfs-theme="feishu"] .user-follow-panel-info a {
background: var(--wxfs-left-hover) !important;
border-radius: 6px !important;
}
html[data-wxfs-active="1"] .user-links a:hover,
html[data-wxfs-active="1"] .daily-hot-topics-list a:hover {
background: var(--wxfs-left-hover) !important;
color: var(--brand) !important;
border-radius: var(--radius-sm) !important;
}
html[data-wxfs-theme="wechat"] .online-users-grid {
display: grid !important;
grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
gap: 10px 6px !important;
}
html[data-wxfs-theme="wechat"] .online-users-item {
display: flex !important;
flex-direction: column !important;
align-items: center !important;
text-align: center !important;
gap: 4px !important;
}
html[data-wxfs-theme="wechat"] .online-users-avatar,
html[data-wxfs-theme="wechat"] .online-users-avatar .avatar-img {
width: 38px !important;
height: 38px !important;
border-radius: 4px !important;
}
html[data-wxfs-theme="wechat"] .online-users-name {
font-size: 11px !important;
color: var(--text-muted) !important;
max-width: 100% !important;
overflow: hidden !important;
text-overflow: ellipsis !important;
white-space: nowrap !important;
}
html[data-wxfs-active="1"][data-wxfs-stealth="1"] .sidebar-promotions-card {
display: none !important;
}
/* =========================================================
通用卡片 / 弹窗 / 分页 / 页脚
========================================================= */
html[data-wxfs-active="1"] .card,
html[data-wxfs-active="1"] .modal-panel,
html[data-wxfs-active="1"] .color-scheme-modal-dialog,
html[data-wxfs-active="1"] .gacha-dd-menu {
background: var(--panel) !important;
border-color: var(--line) !important;
color: var(--text) !important;
border-radius: var(--wxfs-card-radius) !important;
}
html[data-wxfs-active="1"] .color-scheme-modal-dialog {
left: calc(var(--wxfs-rail-w) + 12px) !important;
top: 62px !important;
}
html[data-wxfs-active="1"] input:not([type="checkbox"]):not([type="radio"]):not([type="search"]),
html[data-wxfs-active="1"] textarea,
html[data-wxfs-active="1"] select {
background: var(--panel) !important;
color: var(--text) !important;
border-color: var(--line) !important;
border-radius: var(--radius-sm) !important;
}
html[data-wxfs-active="1"] input:focus,
html[data-wxfs-active="1"] textarea:focus,
html[data-wxfs-active="1"] select:focus {
border-color: var(--brand) !important;
box-shadow: 0 0 0 2px var(--focus-ring) !important;
}
html[data-wxfs-active="1"] .pagination li.active a {
background: var(--brand) !important;
border-color: var(--brand) !important;
color: #FFFFFF !important;
}
html[data-wxfs-active="1"] footer.footer {
background: transparent !important;
border: 0 !important;
padding: 0 !important;
margin: 0 !important;
}
/* =========================================================
窄屏 / 移动端适配 (<= 960px)
========================================================= */
@media (max-width: 960px) {
html[data-wxfs-active="1"] body {
padding-left: 0 !important;
}
html[data-wxfs-active="1"] #wxfs-rail {
display: none !important;
}
html[data-wxfs-active="1"] .top {
left: 0 !important;
}
html[data-wxfs-active="1"] .forum-layout.forum-layout-has-sidebar {
flex-direction: column !important;
}
html[data-wxfs-active="1"] aside.sidebar {
width: 100% !important;
max-width: 100% !important;
}
html[data-wxfs-theme="feishu"] form.meilisearch-search-top-form {
width: 140px !important;
}
html[data-wxfs-theme="feishu"] form.meilisearch-search-top-form::after {
display: none;
}
html[data-wxfs-active="1"] ul.topic-post-list > li.post-item.post-entry:not(.home-keyword-filter-hidden):not([hidden]) {
grid-template-columns: 34px minmax(0, 1fr) !important;
column-gap: 10px !important;
padding: 10px 12px !important;
}
html[data-wxfs-active="1"] ul.topic-post-list > li.post-item.post-entry > .post-avatar img {
width: 34px !important;
height: 34px !important;
}
html[data-wxfs-active="1"][data-wxfs-topic-page="1"] .reply-panel {
padding: 6px 12px 10px !important;
}
}
/* =========================================================
外观切换悬浮面板 (#wxfs-switcher-popover)
========================================================= */
#wxfs-switcher-popover {
position: fixed;
left: calc(var(--wxfs-rail-w, 60px) + 10px);
bottom: 14px;
width: 344px;
max-width: calc(100vw - 24px);
background: #FFFFFF;
color: #1F2329;
border: 1px solid #E5E6EB;
border-radius: 12px;
box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
padding: 14px;
z-index: 9998;
font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
box-sizing: border-box;
}
html[data-dark-mode-theme="dark"] #wxfs-switcher-popover,
html[data-color-scheme-dark-mode-theme="dark"] #wxfs-switcher-popover {
background: #22252C;
color: #EBECEF;
border-color: #343842;
}
#wxfs-switcher-popover.is-top-anchored {
left: auto;
right: 16px;
bottom: auto;
top: 60px;
}
.wxfs-pop-head {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 12px;
}
.wxfs-pop-title {
font-size: 14px;
font-weight: 600;
}
.wxfs-pop-kbd {
font-size: 11px;
opacity: 0.6;
}
.wxfs-pop-cards {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 8px;
margin-bottom: 12px;
}
.wxfs-pop-card {
display: flex;
flex-direction: column;
align-items: center;
gap: 6px;
padding: 8px 6px;
border-radius: 8px;
border: 1.5px solid rgba(128, 128, 128, 0.22);
background: transparent;
color: inherit;
cursor: pointer;
transition: border-color 0.15s, background-color 0.15s;
}
.wxfs-pop-card:hover {
background: rgba(128, 128, 128, 0.08);
}
.wxfs-pop-card.is-selected {
border-color: #07C160;
background: rgba(7, 193, 96, 0.08);
}
.wxfs-pop-card[data-theme-opt="feishu"].is-selected {
border-color: #3370FF;
background: rgba(51, 112, 255, 0.08);
}
.wxfs-pop-card[data-theme-opt="original"].is-selected {
border-color: #475569;
background: rgba(71, 85, 105, 0.1);
}
.wxfs-pop-preview {
width: 100%;
height: 44px;
border-radius: 5px;
overflow: hidden;
display: flex;
border: 1px solid rgba(0, 0, 0, 0.08);
}
.wxfs-pop-card span {
font-size: 12px;
font-weight: 500;
}
.wxfs-pop-toggles {
display: flex;
flex-direction: column;
gap: 8px;
padding-top: 10px;
border-top: 1px solid rgba(128, 128, 128, 0.16);
}
.wxfs-pop-toggle {
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
font-size: 12.5px;
cursor: pointer;
}
.wxfs-pop-toggle small {
display: block;
font-size: 11px;
opacity: 0.65;
}
.wxfs-pop-toggle input[type="checkbox"] {
width: 34px;
height: 18px;
appearance: none;
-webkit-appearance: none;
background: rgba(128, 128, 128, 0.35);
border-radius: 999px;
position: relative;
cursor: pointer;
flex-shrink: 0;
transition: background-color 0.18s;
border: 0 !important;
box-shadow: none !important;
}
.wxfs-pop-toggle input[type="checkbox"]::after {
content: "";
position: absolute;
top: 2px;
left: 2px;
width: 14px;
height: 14px;
border-radius: 50%;
background: #FFFFFF;
transition: transform 0.18s;
}
.wxfs-pop-toggle input[type="checkbox"]:checked {
background: #07C160;
}
html[data-wxfs-theme="feishu"] .wxfs-pop-toggle input[type="checkbox"]:checked {
background: #3370FF;
}
.wxfs-pop-toggle input[type="checkbox"]:checked::after {
transform: translateX(16px);
}
`;
function injectStyle() {
let styleEl = document.getElementById('wxfs-theme-style');
if (!styleEl) {
styleEl = document.createElement('style');
styleEl.id = 'wxfs-theme-style';
styleEl.textContent = THEME_CSS;
(document.head || document.documentElement).appendChild(styleEl);
}
}
injectStyle();
// ==========================
// DOM 辅助数据提取与状态记忆
// ==========================
let origTitle = null;
let origFaviconHref = null;
let origBrandHtml = null;
let titleGuard = false;
function captureOriginals() {
if (origTitle === null && document.title) {
origTitle = document.title;
}
const iconEl = document.querySelector('link[rel~="icon"]');
if (origFaviconHref === null && iconEl) {
origFaviconHref = iconEl.getAttribute('href');
}
const brandFull = document.querySelector('.top .brand .brand-full');
if (origBrandHtml === null && brandFull) {
origBrandHtml = brandFull.innerHTML;
}
}
function getUserInfo() {
const mineLink = document.querySelector('a.nav-mine') || document.querySelector('.user-card a.user-avatar-big');
const href = mineLink ? mineLink.getAttribute('href') || '/' : '/';
const uidMatch = href.match(/\/user\/(\d+)/);
const uid = uidMatch ? uidMatch[1] : null;
const avatarImg =
document.querySelector('a.nav-mine img') ||
document.querySelector('.user-card .user-avatar-big img');
const avatarSrc = avatarImg ? avatarImg.getAttribute('src') : '';
const userName = avatarImg ? avatarImg.getAttribute('alt') || '我' : '访客';
return { uid, href, avatarSrc, userName };
}
function getOnlineCount() {
const el = document.querySelector('.online-users-count');
if (el) {
const m = (el.textContent || '').match(/\d+/);
if (m) return m[0];
}
const boot = document.querySelector('.online-users-boot');
if (boot) {
const ids = (boot.getAttribute('data-online-users-ids') || '').split(',').filter(Boolean);
if (ids.length) return String(ids.length);
}
return '';
}
function getActiveForumName() {
const activeLeft = document.querySelector('.forum-enhancements-left-navigation a.active .forum-enhancements-left-name');
if (activeLeft) {
const txt = activeLeft.textContent.trim();
if (txt && txt !== '社区首页') return txt;
}
return '';
}
// ==========================
// 构建左端 Rail、左/右侧边栏折叠按钮与换肤面板
// ==========================
function buildLeftRail() {
if (document.getElementById('wxfs-rail') || !document.body) return;
const user = getUserInfo();
const favHref = user.uid ? `/user/${user.uid}?tab=favorites` : '/user_privacy';
const fileHref = user.uid ? `/user/${user.uid}?tab=attachments` : '/nodes';
const path = location.pathname + location.search;
const rail = document.createElement('aside');
rail.id = 'wxfs-rail';
rail.setAttribute('aria-label', '客户端导航栏');
const fallbackAvatar =
'data:image/svg+xml;utf8,' +
encodeURIComponent('');
rail.innerHTML = `