bugstack2714 downloadsOpen web pages as workspace tabs and switch back to your notes when the cursor leaves the page.

An Obsidian plugin that opens a website as a workspace tab and switches back to your notes as soon as the cursor leaves the page.
target="_blank" links open in the same tab instead of popping a new window.Install through BRAT:
BugStack27/obsidian-moyu-modeManual install: download main.js, manifest.json and styles.css from Releases, put them in <vault>/.obsidian/plugins/moyu-mode/, restart Obsidian and enable the plugin.
BRAT installs a published release. If the release is still a draft, publish it first.
First-time users start with an empty site list; the web tab links straight to the settings.
| Setting | Default | Description |
|---|---|---|
| Sites | Empty | One name and URL per site; the order drives the tab dropdown |
| Default site | First site | Site loaded when a web tab is opened |
| Fallback | Keep current note | Keep current note, a specific note, or a random note |
| Fallback note | Empty | Vault path, for example 日记/2026-11-24.md |
| Random scope | Whole vault | Whole vault or selected folders |
| Random folders | Empty | One folder path per line |
| Poll interval | 100 ms | 20–1000 ms; how often the cursor position is read |
| Hide delay | 0 ms | 0–2000 ms; how long the cursor must stay away before falling back |
| Restore delay | 120 ms | 0–2000 ms; how long the tab header must be hovered to return |
| Edge tolerance | 6 px | 0–40 px; slack around the page edge to avoid jitter |
| Fall back on blur | On | Fall back immediately when Obsidian loses focus |
| Pause media on hide | On | Pause video/audio and mute the page when the tab is hidden or Obsidian loses focus |
Settings are stored in the plugin's data.json.
<webview>; nothing else is requested, and the plugin collects no telemetry.persist:moyu, which keeps cookies and site storage inside Obsidian's own user-data folder — not in your vault and not synced with it.vault.getMarkdownFiles()) to pick a note. Other modes read no notes. The plugin writes only its own data.json.target="_blank" links in the same tab; media is paused via executeJavaScript when the page is hidden. No page content is read or sent anywhere.<webview> and screen APIs and does nothing on mobile.npm install # install dependencies
npm run dev # watch mode, writes main.js
npm run build # type check + production build
npm run lint # ESLint
Source lives in src/; the build output is main.js (not committed).
For local debugging, copy main.js, manifest.json and styles.css into <vault>/.obsidian/plugins/moyu-mode/ and reload Obsidian.
npm version patch # updates package.json, manifest.json, versions.json and tags the commit
git push --follow-tags
Pushing the tag makes GitHub Actions run the type check and build, then publish a release titled Moyu Mode version with main.js, manifest.json, styles.css and build provenance. The tag message becomes the release notes.
一个把网页当作工作区标签打开的 Obsidian 插件:鼠标离开网页后自动切回笔记,悬停标签头又能立刻回到网页。
target="_blank" 的链接会留在当前标签内打开,不弹新窗口。本插件通过 BRAT 安装。
BugStack27/obsidian-moyu-mode
手动安装:从 Releases 下载 main.js、manifest.json、styles.css,放入 <库>/.obsidian/plugins/moyu-mode/,重启 Obsidian 后启用。
BRAT 安装的是已发布的 Release。如果 Release 仍是 draft,需要先手动发布。
首次使用时站点列表为空,网页标签会直接把入口给到设置页。
| 设置项 | 默认值 | 说明 |
|---|---|---|
| 网页站点 | 空 | 每个站点一个名称和网址,顺序决定下拉里的排列 |
| 默认站点 | 第一个站点 | 打开网页标签时加载的站点 |
| 回退方式 | 保持当前笔记 | 保持当前笔记、指定笔记、随机笔记三选一 |
| 回退笔记路径 | 空 | 库内路径,例如 日记/2026-11-24.md |
| 随机范围 | 全库 | 全库或指定文件夹 |
| 随机文件夹 | 空 | 每行一个文件夹路径 |
| 轮询间隔 | 100 毫秒 | 20–1000 毫秒,读取光标位置的频率 |
| 隐藏延迟 | 0 毫秒 | 0–2000 毫秒,离开多久后才回退 |
| 恢复延迟 | 120 毫秒 | 0–2000 毫秒,标签头悬停多久后切回网页 |
| 边缘容错 | 6 像素 | 0–40 像素,网页边缘的判定余量,避免抖动 |
| 失焦时回退 | 开 | Obsidian 失去焦点时立即回退 |
| 回退时暂停媒体 | 开 | 网页被隐藏或 Obsidian 失焦时暂停音视频并静音,回来后继续播放 |
设置保存在插件的 data.json 中。
<webview> 打开;除此之外不发起任何请求,也不收集任何遥测数据。persist:moyu,Cookie 和站点存储保存在 Obsidian 自己的用户数据目录里,不写入库、也不随库同步。vault.getMarkdownFiles())来挑一篇笔记;其他模式不读取笔记。插件只写自己的 data.json。target="_blank" 的链接留在当前标签内;网页隐藏或 Obsidian 失焦时通过 executeJavaScript 暂停媒体,回来后续播此前由插件暂停的内容。不读取、不上传页面内容。1.2.3 及以上。<webview> 与屏幕接口,移动端不可用。npm install # 安装依赖
npm run dev # 监听编译,生成 main.js
npm run build # 类型检查 + 生产构建
npm run lint # ESLint 检查
源码位于 src/,构建产物为 main.js(不纳入版本控制)。
本地调试时,把 main.js、manifest.json、styles.css 复制到 <库>/.obsidian/plugins/moyu-mode/,重载 Obsidian 即可。
npm version patch # 同步更新 package.json、manifest.json、versions.json,并打 tag
git push --follow-tags
推送 tag 后,GitHub Actions 会执行类型检查与构建,直接发布标题为 Moyu Mode 版本号 的 Release,附带 main.js、manifest.json、styles.css 与构建证明;tag 信息会作为 Release 说明。