') + ')', 'gi');
if (regex.test(text)) {
found = true;
var frag = document.createDocumentFragment();
var parts = text.split(regex);
parts.forEach(function(part, i) {
if (i % 2 === 0) {
frag.appendChild(document.createTextNode(part));
} else {
var span = document.createElement('span');
span.className = 'userscript-highlight';
span.textContent = part;
frag.appendChild(span);
}
});
node.parentNode.replaceChild(frag, node);
}
});
} else if (node.nodeType === 1 && node.childNodes) { // element
var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];
if (!skipTags.includes(node.tagName)) {
Array.from(node.childNodes).forEach(highlight);
}
}
}
highlight(document.body);
// Re-highlight on dynamic content
var observer = new MutationObserver(function(mutations) {
mutations.forEach(function(m) {
m.addedNodes.forEach(function(node) {
if (node.nodeType === 1 || node.nodeType === 3) highlight(node);
});
});
});
observer.observe(document.body, { childList: true, subtree: true });
})();
}
} catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); }
})();
(function(){
try {
var __m = "*";
var __re = new RegExp('^' + ".*" + ', 'i');
if (__m === '*' || __re.test(location.href)) {
// Strip utm_, fbclid, gclid, etc. from all links on page
(function() {
var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',
'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',
'ref', 'ref_src', 'source', 'medium', 'campaign'];
function cleanUrl(url) {
try {
var u = new URL(url, window.location.origin);
var changed = false;
trackingParams.forEach(function(p) {
if (u.searchParams.has(p)) {
u.searchParams.delete(p);
changed = true;
}
});
return changed ? u.toString() : url;
} catch (e) {
return url;
}
}
function cleanLinks() {
document.querySelectorAll('a[href]').forEach(function(a) {
var clean = cleanUrl(a.href);
if (clean !== a.href) a.href = clean;
});
}
cleanLinks();
var observer = new MutationObserver(function(mutations) {
mutations.forEach(function(m) {
m.addedNodes.forEach(function(node) {
if (node.nodeType === 1) {
if (node.tagName === 'A') cleanLinks();
node.querySelectorAll('a[href]').forEach(function(a) {
var clean = cleanUrl(a.href);
if (clean !== a.href) a.href = clean;
});
}
});
});
});
observer.observe(document.body, { childList: true, subtree: true });
})();
}
} catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); }
})();
(function(){
try {
var __m = "youtube.com";
var __re = new RegExp('^' + "youtube\\.com" + ', 'i');
if (__m === '*' || __re.test(location.href)) {
// Auto-enable theater mode on YouTube
(function() {
function tryTheater() {
var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]');
if (btn && !btn.classList.contains('activated')) {
btn.click();
}
}
// Try immediately
tryTheater();
// Try after navigation (SPA)
var lastUrl = location.href;
setInterval(function() {
if (location.href !== lastUrl) {
lastUrl = location.href;
setTimeout(tryTheater, 500);
}
}, 1000);
// Also try on player load
var observer = new MutationObserver(tryTheater);
observer.observe(document.body, { childList: true, subtree: true });
})();
}
} catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); }
})();
(function(){
try {
var __m = "*";
var __re = new RegExp('^' + ".*" + ', 'i');
if (__m === '*' || __re.test(location.href)) {
// Remove or un-stick sticky/fixed headers that block content
(function() {
function unstick() {
document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) {
if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {
el.style.position = 'static';
el.style.top = 'auto';
el.style.zIndex = 'auto';
}
});
}
unstick();
var observer = new MutationObserver(unstick);
observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });
})();
}
} catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); }
})();
})();
GitHub - rootMUD/homepage: The homepage of rootMUD DAO. · GitHub
Repository files navigation 一个现代化的主页,使用 Next.js 13+ App Router、Tailwind CSS v4、DaisyUI 5.0.43 和 Framer Motion 构建。
🎨 现代化设计 - 使用 DaisyUI 组件库和 OKLCH 颜色空间 🌙 主题切换 - 支持明暗主题自动切换 📱 响应式布局 - 完美适配各种设备尺寸 🎭 流畅动画 - 使用 Framer Motion 实现滚动触发动画 🔤 多语言字体 - 支持中文、英文和等宽字体 ⚡ 性能优化 - SSR 支持,字体优化,图片优化 ♿ 可访问性 - 支持 prefers-reduced-motion 访问 http://localhost:3000 查看效果
详细的使用指南和开发文档请查看:
框架 : Next.js 13+ (App Router)样式 : Tailwind CSS v4 + DaisyUI 5.0.43动画 : Framer Motion图标 : Lucide React字体 : Google Fonts (Inter, JetBrains Mono, Noto Sans SC/HK)包管理 : pnpm语言 : TypeScriptfrontend/
├── app/ # Next.js App Router
│ ├── components/ # React 组件
│ │ ├── Header.tsx # 导航栏组件
│ │ ├── Hero.tsx # 英雄区域组件
│ │ ├── Features.tsx # 特性展示组件
│ │ ├── Architecture.tsx # 架构展示组件
│ │ ├── QuickLinks.tsx # 快速链接组件
│ │ ├── Footer.tsx # 页脚组件
│ │ ├── ScrollReveal.tsx # 滚动动画组件
│ │ └── ThemeToggle.tsx # 主题切换组件
│ ├── globals.css # 全局样式
│ ├── layout.tsx # 根布局
│ └── page.tsx # 首页
├── docs/ # 项目文档
├── public/ # 静态资源
└── package.json # 项目配置
亮色主题 : 科技感蓝色调暗色主题 : 深紫色调颜色空间 : OKLCH 确保更好的色彩表现主字体 : Inter (科技感)等宽字体 : JetBrains Mono (代码)中文字体 : Noto Sans SC/HK (简体/繁体)CSS 动画 : 页面加载时的淡入效果Framer Motion : 滚动触发的交互动画性能优化 : GPU 加速,支持 prefers-reduced-motion项目已配置 Vercel 部署:
支持部署到任何支持 Next.js 的平台:
Netlify Railway DigitalOcean App Platform 自托管服务器 欢迎提交 Issue 和 Pull Request!
Fork 项目 创建功能分支 (git checkout -b feature/AmazingFeature) 提交更改 (git commit -m 'Add some AmazingFeature') 推送到分支 (git push origin feature/AmazingFeature) 打开 Pull Request 本项目采用 MIT 许可证 - 查看 LICENSE 文件了解详情。
最后更新 : 2025.10
You can’t perform that action at this time.