# linuxdo-nest-sort **Repository Path**: ysl2/linuxdo-nest-sort ## Basic Information - **Project Name**: linuxdo-nest-sort - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-05-06 - **Last Updated**: 2026-05-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # linux.do Nested View 把 `https://linux.do/t/topic/...` 自动跳转到 `https://linux.do/n/topic/...`,用于默认以嵌套方式查看主题页。 也可以自动设置主题排序: - `?sort=new` - `?sort=old` - `?sort=top` 默认设置: - 嵌套视图:开启 - 自动排序:开启 - 排序方式:`new` 保留原脚本行为:如果 URL 中存在 `flat=1`,认为用户主动选择平铺视图,不做嵌套视图跳转。排序功能与嵌套视图开关相互独立。 ## 支持浏览器 - Chrome - Firefox - Microsoft Edge 该扩展使用 Manifest V3 和静态 content script,不需要额外构建步骤。 ## 使用 点击浏览器工具栏里的扩展图标,可以打开设置面板: - “嵌套视图”控制是否自动把 `/t/topic/` 切换到 `/n/topic/` - “自动排序”控制是否自动更新 `sort` 参数 - “排序方式”选择 `new`、`old` 或 `top` ## 本地安装 ### Chrome / Edge 1. 打开 `chrome://extensions/` 或 `edge://extensions/` 2. 开启开发者模式 3. 选择“加载已解压的扩展程序” 4. 选择本仓库目录 ### Firefox 1. 打开 `about:debugging#/runtime/this-firefox` 2. 选择“临时载入附加组件” 3. 选择本仓库中的 `manifest.json` ## 文件结构 - `manifest.json`: 扩展声明和注入规则 - `src/content.js`: linux.do 页面内运行的跳转逻辑 - `popup/index.html`: 扩展面板结构 - `popup/popup.css`: 扩展面板样式 - `popup/popup.js`: 扩展面板设置读写逻辑 ## 许可证 AGPL-3.0