Paul Spenke 84b3dd69f1 Fix security bugs and migrate image uploads to /api/v1/attachments
* Replace /api/v1/resources with /api/v1/attachments for image uploads
* Upload attachments as JSON with base64-encoded content field
* After memo creation, link each attachment via PATCH /api/v1/attachments/{id}
* Rewrite markdown image URLs to use /file/attachments/{id} pattern
* Fix XSS: sanitize marked.parse output with a DOM-based allowlist sanitizer
* Fix SSRF: validate img.src scheme (http/https only) before fetching
* Fix stack overflow: use chunked base64 encoding for large images
* Update CLAUDE.md to document new attachment flow
2026-03-18 17:55:04 +01:00
2026-03-14 21:21:53 +01:00

Memos Clipper — Chrome Extension

Clip any web page or selection as Markdown directly to your usememos instance. Images are uploaded as attachments. Preview and edit before sending.

Features

  • Full page or selection — clip the whole article (auto-extracted) or just what you've selected
  • Markdown preview — live rendered preview with syntax highlighting
  • Edit before send — tweak the Markdown in the built-in editor
  • Image attachments — images found on the page are uploaded as resources; toggle per-image
  • Visibility control — Private / Protected / Public per memo
  • Source attribution — automatically prepends a blockquote with the source URL and title

Installation

  1. Open Chrome and go to chrome://extensions/
  2. Enable Developer mode (top right toggle)
  3. Click Load unpacked
  4. Select this folder (memos-extension/)

Configuration

  1. Click the extension icon → ⚙ settings gear (or right-click → Options)
  2. Enter your Memos instance URL, e.g. https://memos.example.com
  3. Generate an access token in Memos: Settings → Account → Access Tokens
  4. Paste the token and click Save Settings
  5. Click Test Connection to verify

Usage

  1. Navigate to any web page
  2. (Optional) Select text you want to clip
  3. Click the Memos Clipper icon in the toolbar
  4. The page (or selection) is extracted as Markdown
  5. Edit if needed, check the Preview tab
  6. Adjust visibility and image settings
  7. Click Send to Memos

API compatibility

Tested against usememos v0.22+ (uses /api/v1/memos and /api/v1/resources).

Notes

  • Images on cross-origin pages may fail to upload due to CORS restrictions — these will be skipped gracefully
  • The extension uses Chrome's scripting permission to inject the content extractor on demand
  • No data is ever sent anywhere except your own Memos instance
Description
No description provided
Readme 202 KiB
Languages
JavaScript 56.4%
CSS 23.3%
HTML 20.3%