Summary
Enable DevBar to be injected into any web page without code changes, using a bookmarklet that loads DevBar from a CDN.
Motivation
Currently, DevBar requires adding code to your application:
import { initGlobalDevBar } from '@ytspar/devbar';
initGlobalDevBar();
For quick debugging sessions or testing on sites you don't control, a bookmarklet approach would be much faster.
Proposed Solution
1. CDN-hosted DevBar bundle
- Publish a standalone UMD/IIFE bundle to CDN (unpkg, jsdelivr)
- Bundle includes all DevBar functionality
- URL:
https://unpkg.com/@ytspar/devbar/dist/devbar.global.js
2. Bookmarklet
A bookmarklet that users can add to their browser bookmarks bar:
javascript:(function(){
var s=document.createElement('script');
s.src='https://unpkg.com/@ytspar/devbar/dist/devbar.global.js';
s.onload=function(){window.initGlobalDevBar()};
document.body.appendChild(s);
})()
3. Zero-install Sweetlink server
npx @ytspar/sweetlink
# Starts WebSocket server on port 9223 (or auto-detected port)
User Flow
- Start server:
npx @ytspar/sweetlink (in terminal)
- Click bookmarklet: DevBar appears in browser
- Use tools: Screenshots, DOM queries, console logs, etc.
Degraded Mode (no server)
When Sweetlink server isn't running:
- ✅ Screenshot to clipboard (still works)
- ✅ Outline view (local only)
- ✅ Schema extraction (local only)
- ❌ Screenshot to file (requires server)
- ❌ Console log capture (requires server)
- ❌ CLI commands (requires server)
Implementation Tasks
Related
- Vite plugin:
sweetlink() - zero-config for Vite apps
- Auto-start:
import '@ytspar/sweetlink/auto' - zero-config for Node apps
- This feature completes the "zero-config" story for any website
Labels: enhancement, good first issue
Summary
Enable DevBar to be injected into any web page without code changes, using a bookmarklet that loads DevBar from a CDN.
Motivation
Currently, DevBar requires adding code to your application:
For quick debugging sessions or testing on sites you don't control, a bookmarklet approach would be much faster.
Proposed Solution
1. CDN-hosted DevBar bundle
https://unpkg.com/@ytspar/devbar/dist/devbar.global.js2. Bookmarklet
A bookmarklet that users can add to their browser bookmarks bar:
3. Zero-install Sweetlink server
npx @ytspar/sweetlink # Starts WebSocket server on port 9223 (or auto-detected port)User Flow
npx @ytspar/sweetlink(in terminal)Degraded Mode (no server)
When Sweetlink server isn't running:
Implementation Tasks
dist/devbar.global.jsnpx @ytspar/sweetlinkworks standaloneRelated
sweetlink()- zero-config for Vite appsimport '@ytspar/sweetlink/auto'- zero-config for Node appsLabels: enhancement, good first issue