Privacy Veil

approvedunreviewed

by Mouiz LANIKPEKOUN

Conceals Dataview, Bases and chart blocks behind a per-block reveal button, in the folders, tags or notes you choose.

↓ 37 downloadsUpdated 21d agoMIT

Privacy Veil

Conceals the dynamic blocks of chosen notes behind a blur and a reveal button: Dataview queries, DataviewJS scripts, Bases (code blocks and embeds), charts, and any other element you point a CSS selector at. Each block has its own button, and an eye in the note header reveals or hides the whole note.

It is meant for dashboards over finance, health or other personal data that you open in public: a note opens concealed, and you reveal only what you need.

This is a visual veil, not protection

The veil only hides pixels from someone looking over your shoulder. The data is still there: search results, hover previews, source mode, exported files and the notes themselves show the values in clear. Do not use it to protect anything from a person or a program with access to your vault.

Choosing what is veiled

A note is veiled when any of these applies (Settings, Privacy Veil):

RuleExample
FolderFinance/ (a folder ends with a slash)
NoteFinance/Budget.md (its full path)
Tagprivate (no hash; a parent tag covers its children)
Frontmatter propertyprivacy-veil: true

Setting the property to false leaves a note out of every other rule.

Nothing is veiled until you configure at least one rule.

What is veiled

Switches for Dataview queries, DataviewJS scripts, Bases code blocks, embedded Bases and charts. Custom selectors add any other element: one CSS selector per line, and the matched element itself is veiled (for example a card class of your own dashboard). Where a veiled element contains another, only the outer one gets a veil.

Notes with custom selectors only lists notes where just the custom selectors are veiled, never the block types. It suits a dashboard where only some cards are private.

Behavior

OptionEffect
State when a note opensConcealed, revealed, or remembered per note
Conceal again afterSeconds after the last reveal before everything is concealed again; 0 keeps it revealed
Conceal when the window loses focusConceals everything when you switch to another app

Appearance

Blur strength, how much of the concealed content stays visible, icon-only or icon-and-text buttons, and the button texts. The settings tab shows a live sample. The stylesheet uses theme variables only.

Commands

Available when the active note is veiled; assign hotkeys as you like.

  • Show all blocks in this note
  • Hide all blocks in this note
  • Toggle all blocks in this note
  • Hide all blocks in every open note (available everywhere)

Limits

  • The plugin finds blocks through Obsidian's rendered classes (.block-language-*, .internal-embed). An Obsidian update that renames them can break detection.
  • A window that is not being painted (minimized, hidden) pauses the browser's animation frames, so a block rendered at that moment is veiled on the next frame.
  • Concealing on window blur relies on the window's blur event; it does not cover pop-out windows.

Install

Not in the community directory yet. To install by hand, build it (below) and copy main.js, manifest.json and styles.css into <vault>/.obsidian/plugins/privacy-veil/, then enable the plugin.

Development

npm install
npm test          # logic and DOM behavior, under jsdom
npm run lint      # the official Obsidian ESLint rules
npm run build     # type-check, then bundle main.js
npm run deploy -- <vault>/.obsidian/plugins/privacy-veil

src/settings.ts and src/scope.ts are pure and hold the settings model and the scope rules. src/veil.ts is the DOM engine for one open note and has no Obsidian import, which is what lets the tests run it. src/main.ts and src/settings-tab.ts are the Obsidian side.

License

MIT

For plugin developers

Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.