Skip to content

Conversation

123vincent
Copy link

Chesser Plugin (Customized)

This is a fully customized version of the Chesser plugin for Obsidian, with enhanced features for multi-device use, improved chessboard initialization, and a mobile-friendly interface.


✅ Functional Improvements

🗂️ Vault-based State Storage

  • Replaces localStorage with persistent storage in the vault (.ChesserStorage/)
  • Uses Obsidian's adapter API (adapter.read/write)
  • Fully synced across devices (e.g., via GitHub)
  • Compatible with desktop and mobile (no Obsidian indexing required)

♟️ PGN Initialization Support

  • Allows user to define a PGN directly in the code block
  • Parses and normalizes the PGN (handles move numbers cleanly)
  • Initializes the board and move list based on parsed PGN
  • Supports fallback to FEN if PGN is not provided

🆕 Init Button

  • Adds an "Init" button to reset the board to the PGN/FEN-defined starting position
  • Especially useful when working from a static chess diagram

🏠 Reset Button Icon

  • Updated the icon for the Reset button to home for clearer UX

🙈 Hide "Free Move" Option

  • Hides the "Enable Free Move?" toggle from the settings menu via CSS
  • Keeps the feature functional but not visible in the UI

📱 Mobile Enhancements

🧩 Responsive Board Sizing

  • Chessboard is now scaled to fit screen width (especially on iPhones)
  • No more horizontal scrolling to see the whole board
  • Maintains perfect square aspect ratio with CSS trick using ::before

🎛️ Adaptive Toolbar Layout

  • On mobile, the toolbar appears above the menu for better access
  • Improved spacing between buttons for touch interaction

🛠️ How to Use

  1. Extract this plugin folder into your vault’s .obsidian/plugins/ directory.
  2. Enable the plugin in Obsidian’s settings.
  3. Open the plugin settings to toggle vault-based storage.
  4. Use Chesser blocks as usual, with optional pgn and fen in the code block.

Built with care to support mobile note-taking, versioned storage, and fast chess-based documentation.

Happy to help if you want to merge these features or discuss further!

modify css to make them responsive for iPhone in portrait mode
rename the “Reset” button “Home".
added an “Init” button linked to function loadInitialPosition() in the Chesser class
Replaces `localStorage` with persistent storage in the vault (`.ChesserStorage/`)
Replaces `localStorage` with persistent storage in the vault `.ChesserStorage/`
Allows user to define a PGN directly in the code block.
Adds an "Init" button to reset the board to the PGN/FEN-defined starting position.
@123vincent
Copy link
Author

✅ Chesser vNext merged

  • PGN parsing and Init button for consistent board setup
  • 💾 Vault-based state storage in .ChesserStorage/ using Obsidian adapter API
  • 📱 Responsive layout for mobile (no horizontal scroll, touch-friendly UI)
  • 🎛 Adaptive toolbar positioning on small screens
  • 🙈 "Free Move" toggle hidden via CSS (still functional)
  • 🏠 Reset button icon updated to home for clarity

All features are fully compatible across desktop and mobile, with no conflicts or breaking changes. Ready to roll 🚀

modified setIcon of the Init button
Release: Chesser Plugin with PGN Init, Vault Storage, and Mobile Enhancements
Responsive Chessboard: The board scales with screen size (no horizontal scrolling)
Adaptive Toolbar: Toolbar appears above the menu on mobile
The "Enable Free Move?" toggle is hidden via CSS
add comment:  /* end of media */
feat: add "Copy PGN" button to chessboard toolbox
minor bug correction
added getChess()
code modification of the “Copy PGN” button
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant