2aa79b1a3969fc2601addb1e56dfe8f7030b79ad
## Bug Fixes - Fixed critical issue where clicking + on one counter would update multiple counters - Fixed page scrolling to top when clicking counter buttons - Fixed counter widgets causing Obsidian to crash or behave erratically - Fixed counters not working independently in edit mode ## Improvements - Added support for negative numbers (counters can now go below zero) - Improved counter targeting using position-based tracking in edit mode - Improved counter targeting using section info in reading mode - Better event handling to prevent unwanted side effects
Counter Plugin for Obsidian
A simple Obsidian plugin that creates interactive number counters with +/- buttons.
Usage
To create a counter, use the following syntax in your notes:
~ ( ) counter label
This will render as an interactive counter starting at 0, with minus and plus buttons to decrease or increase the value.
Examples
~ ( ) Tasks completed
~ ( ) Days streak
~ ( ) Points earned
Each counter is independent and maintains its own value in your markdown file. When you click the +/- buttons, the value is updated in the source markdown.
Installation
From Release
- Download
main.js,manifest.json, andstyles.cssfrom the latest release - Create a folder named
counter-pluginin your vault's.obsidian/plugins/directory - Copy the downloaded files into this folder
- Reload Obsidian
- Enable the plugin in Settings → Community plugins
Manual Installation
- Clone this repository into your vault's
.obsidian/plugins/directory - Run
npm installto install dependencies - Run
npm run buildto build the plugin - Reload Obsidian
- Enable the plugin in Settings → Community plugins
Development
# Install dependencies
npm install
# Build the plugin
npm run build
# Development mode (auto-rebuild on changes)
npm run dev
License
MIT
Description
Languages
TypeScript
79.3%
CSS
11.5%
JavaScript
9.2%