Home
Softono
markdown-printer

markdown-printer

Open source MIT JavaScript
30
Stars
1
Forks
3
Issues
0
Watchers
1 week
Last Commit

About markdown-printer

Save web pages as Markdown files with preserved formatting. Perfect for documentation, articles, and note-taking.

Platforms

Web Self-hosted

Languages

JavaScript

Markdown Printer

Save web pages as Markdown files with preserved formatting. Zero setup required - just install and start saving!

Perfect for documentation, articles, and note-taking.

Chrome Web Store Version Mozilla Add-on Version

✨ Features

  • πŸš€ No setup required - works immediately after installation
  • πŸ“ Preserves formatting (headers, links, code blocks, lists, tables)
  • πŸ’Ύ Save anywhere with familiar "Save As" dialog
  • ⚑ Fast client-side conversion using Turndown.js
  • 🎯 Right-click menu + extension popup
  • πŸ“Š Adds metadata (source URL, save date) to saved files

🎯 Installation

Chrome

Install from Chrome Web Store ⭐

Edge

Install from Edge Add-ons ⭐

Firefox

Install from Firefox Add-ons ⭐

Manual Installation (For Development)

Note: The extension-chrome/ and extension-firefox/ directories are generated by the build script. Run pnpm install && pnpm run build after cloning.

Chrome/Edge:

  1. Clone this repository, then run pnpm install && pnpm run build
  2. Open Chrome/Edge and navigate to chrome://extensions/ or edge://extensions/
  3. Enable "Developer mode" in the top right
  4. Click "Load unpacked"
  5. Select the extension-chrome/ directory
  6. Done! πŸŽ‰

Firefox:

  1. Clone this repository, then run pnpm install && pnpm run build
  2. Open Firefox and navigate to about:debugging
  3. Click "This Firefox" in the left sidebar
  4. Click "Load Temporary Add-on"
  5. Navigate to the extension-firefox/ directory and select manifest.json
  6. Done! πŸŽ‰

πŸ“– Usage

Method 1: Right-Click Menu

  1. Navigate to any webpage
  2. Right-click anywhere on the page
  3. Select "Save as Markdown"
  4. Choose where to save in the dialog

Method 2: Extension Icon

  1. Navigate to any webpage
  2. Click the Markdown Printer icon in the toolbar
  3. Click "Save Page as Markdown"
  4. Choose where to save in the dialog

πŸ“‚ Output Format

Files are saved with the format: Page-Title-YYYY-MM-DD.md

Example:

# Getting Started Guide

**Source:** https://example.com/docs/getting-started
**Saved:** 2025-10-01T12:00:00.000Z

_Generated with [markdown-printer](https://github.com/levz0r/markdown-printer) (v1.1.0) by [Lev Gelfenbuim](https://lev.engineer)_

---

[Your page content in Markdown format]

πŸ”§ Pro Version

Need advanced features? Check out the Pro Version in the extension-pro/ folder:

  • βœ… Custom save location (no dialog every time)
  • βœ… Auto-open files in your editor after saving
  • βœ… Folder browser to pick save location
  • βœ… Persistent settings

Trade-off: Requires additional setup (native messaging host installation)

See Pro Version README for installation instructions.

πŸ†š Comparison

Feature Standard Pro
Installation One-click Requires setup script
Browser Support Chrome, Edge, Firefox Chrome, Edge, Firefox
Save location Choose each time Configurable default
Auto-open files ❌ βœ…
Settings ❌ βœ…
Chrome Web Store βœ… Available ❌ Can't publish
Edge Add-ons βœ… Available ❌ Can't publish
Firefox Add-ons βœ… Available ❌ Can't publish

πŸ› οΈ Technical Details

  • Extension Type: Manifest V3
  • Conversion: Turndown.js (client-side)
  • Permissions: activeTab, downloads, scripting, contextMenus
  • File Format: Markdown (.md)
  • Browser Support: Chrome, Edge, Firefox (121+)
  • Cross-browser: Separate builds for Chrome and Firefox due to Manifest V3 differences

πŸ“ License

MIT License - see LICENSE file for details

🀝 Contributing

Contributions welcome! Feel free to open issues or submit pull requests.

Development

The extension uses a single shared source tree for Chrome and Firefox:

src/                     # Source of truth β€” edit files here
  background.js
  popup.html
  popup.js
  turndown.js
  icon{16,48,128}.png
_locales/                # Shared translations
build.js                 # Generates extension-{chrome,firefox}/ from src/

extension-chrome/        # Generated (gitignored)
extension-firefox/       # Generated (gitignored)

Workflow:

  1. Edit files in src/
  2. Run pnpm run build to (re)generate extension-chrome/ and extension-firefox/
  3. Load the unpacked extension from extension-chrome/ or extension-firefox/
  4. Run pnpm run format && pnpm run test && pnpm run lint before committing

πŸ”— Links


Made with ❀️ by Lev Gelfenbuim