jie.chen21 downloadsMask the middle of sensitive values (phone numbers, SDK keys, etc). Shows the full value on hover and copy.
An Obsidian plugin that hides the middle part of sensitive values (phone numbers, SDK IDs, API keys, and any other string). Hover to reveal the full value, and copying always yields the complete value without any Markdown formatting.

Wrap a value with the sdk: prefix inside inline code (backticks):
`sdk:17612343234`
`sdk:sdk-126392739183102830`
`sdk:sjdlajsdlajsdlaksguoeqw`
They are rendered in Reading view as:
176****3234
sdk***************1830
sjd****************oeqw
Values shorter than
prefix digits + suffix digits(default3 + 4 = 7) are shown as-is.
| Situation | Result |
|---|---|
| Reading view | Shows the masked value |
| Live Preview (cursor not on the value) | Shows the masked value |
| Live Preview (click into the value) | Reveals the source so you can edit it normally |
| Hover | Shows the full value in a tooltip |
| Copy | Copies plain text only, full value, no formatting |
3)4)*)npm install
npm run dev # watch mode: rebuilds main.js on change
npm run build # production build (includes type check)
Symlink this repository into your vault's plugin folder for testing. The folder name must match the id in manifest.json:
ln -s "$PWD" "/path/to/vault/.obsidian/plugins/secret-mask"
Then reload the plugin in Obsidian. You can also install the community plugin Hot Reload to reload automatically.
main.ts: plugin logicmanifest.json: plugin metadata (id, version, min app version, ...)versions.json: version to minimum app version mappingesbuild.config.mjs: build script.github/workflows/release.yml: builds and creates a release when a tag is pushedThe plugin is listed in the official directory at community.obsidian.md. When a user installs it, Obsidian downloads main.js, manifest.json, and styles.css from your GitHub Release assets.
README.md (in English) and a LICENSE at the repository root.manifest.json, using a semantic version.main.jsmanifest.jsonstyles.css (optional if the plugin has no styles)The flow is: create a tag locally, push it, and GitHub Actions builds and publishes the release.
# 1. Bump the version in manifest.json and package.json
# 2. Create a tag that matches the manifest version (no "v" prefix recommended)
git tag 1.0.3
git push origin 1.0.3
Pushing the tag triggers .github/workflows/release.yml, which:
npm install && npm run buildmain.js, manifest.json, and styles.css attachedmanifest.json on the default branch HEAD is correct and committed, and that the matching GitHub Release exists.Repeat the automated release step: bump the version, push a new tag. The directory picks up the latest release automatically, and users receive an update. No resubmission is needed.
README.md (English) and LICENSEmanifest.json id is unique and does not contain obsidianversion in manifest.jsonmain.js and manifest.json (plus styles.css if present)main.js is a build artifact (do not commit TypeScript source as the artifact)本插件用于隐藏敏感值(手机号、SDK、密钥等任意字符串)的中间部分,悬浮和复制时显示完整值。
sdk: 前缀 + 值,例如 `sdk:17612343234`*)发布:改版本号 → git tag <版本> → git push origin <版本>,CI 自动构建、attest 并发布 Release。