Skip to main content

Myop Dev Extension

Now on Chrome Web Store

The Myop Chrome Extension has been officially approved by Google and is now available on the Chrome Web Store. Install it for automatic updates, improved stability, and seamless access to all new features.

Install from Chrome Web Store

The Myop Dev Extension is a Chrome browser extension that enables local development and testing of Myop components. It intercepts network requests to Myop's cloud service and serves your local component HTML instead, allowing you to see changes instantly without deploying.

See Also

For file watching and automatic rebuilding, use the Myop CLI with myop dev — provides a local dev server with HMR support.

Extension Header

Features

  • Instant Tab Override - Override components directly from open Component Editor tabs - no saving or publishing required
  • Local Component Override - Serve local HTML content instead of cloud-hosted components
  • Dashboard Sync - One-click sync of components from dashboard.myop.dev
  • Site Management - Pause interception on specific sites
  • SDK Detection - Detect Myop SDK on any page and inspect loaded components
  • Element Inspector - Visual element picker for future component creation
  • Request Logging - Track all intercepted requests in real-time
  • DevTools Panel - Chrome DevTools integration with event tracking and waterfall timeline

Installation

Install the official extension from the Chrome Web Store:

  1. Visit the Myop Chrome Extension on the Chrome Web Store
  2. Click Add to Chrome
  3. The Myop Dev extension icon will appear in your toolbar

Benefits of the Chrome Web Store version:

  • Official Google-approved listing
  • Automatic updates
  • Improved stability and security
  • Seamless access to all new features
Migrating from Manual Installation

If you previously installed the extension manually, please follow these steps:

  1. Delete the manually installed version from your browser (chrome://extensions/)
  2. Install the official version from the Chrome Web Store (current version: v1.2.1)

Once installed from the Chrome Web Store, you won't need to worry about updating manually anymore.


Quick Start

Syncing Components from Dashboard

The easiest way to get started is by syncing components directly from the Myop Dashboard:

  1. Navigate to dashboard.myop.dev
  2. Log in to your account
  3. Click the floating Myop Dev button that appears in the top-right corner
Dashboard Sync Button
  1. The sync panel will open showing all your components
  2. Use the Search box to filter by name
  3. Use the Tags and Editors dropdowns to filter further
  4. Click Override on any component to register it for local development
Dashboard Sync Panel

Once synced, the component will be served locally whenever any page requests it from Myop's cloud.


Extension Popup

Click the Myop Dev extension icon in your Chrome toolbar to open the popup interface.

Components Tab

The Components tab organizes local component overrides into collapsible sections:

Components Tab

Myop SDK Section

Shows the SDK version detected on the current page and lists all components loaded on that page. Click the expand arrow to see component details. Each component shows:

  • Component name and ID
  • Focus button (🔍) to highlight the component on the page
  • Override button (↗️) to open the component editor in the dashboard
SDK Components

Myop CLI Section

When running the Myop CLI with myop dev, this section shows all components being served from your local development server:

CLI Components
ElementDescription
Connection StatusShows localhost:9292 when connected to CLI
Component CountNumber of components available from CLI
Toggle SwitchEnable/disable override for each component
"not on this page"Components available but not used on current page

Dashboard Tabs Section

Instant Component Override

You can now override components directly from Chrome tabs - no saving or publishing required. Simply open any component in the Myop Component Editor in a Chrome tab (in the same browser window), and the extension will automatically detect its content and let you override that component instantly on any Myop website. This makes testing and iteration much faster.

A powerful feature that lets you override components directly from open dashboard.myop.dev browser tabs:

  1. Open dashboard.myop.dev in a browser tab
  2. Navigate to a component's editor
  3. The extension automatically detects open editors
  4. Toggle the switch to serve that component locally
ElementDescription
Tab CountShows number of open dashboard tabs with editors
Refresh ButtonManually refresh the list of open tabs
Component NameName from the dashboard editor
Component IDUUID of the component
Open Button (↗️)Jump to the dashboard tab
Toggle SwitchEnable/disable override for this component
Live Editing

With Dashboard Tabs, you can edit components in the dashboard editor and instantly see changes on any site. No need to sync or copy HTML manually!

Manual Section

Add components manually by clicking the + button:

Manual Section
FieldDescription
Component IDThe UUID of the component to override
Name (optional)Friendly display name
HTML contentThe HTML to serve, or click the upload icon to load from file

Sites Tab

Manage which sites the extension operates on:

Sites Tab

By default, the extension intercepts requests on all sites. Use this tab to pause interception on specific sites:

  1. The current site is shown at the top
  2. Click "Pause on this site" to disable interception
  3. Paused sites appear in the list below
  4. Click the play button to resume interception on a paused site
Badge Indicator

When viewing a paused site, the extension badge shows "||" in orange to indicate interception is disabled.

Log Tab

View a real-time log of all intercepted requests:

Log Tab

Each entry shows:

  • Timestamp - When the request occurred
  • Component ID - Which component was requested
  • LOCAL / REMOTE - Whether local content was served or the request passed through

SDK Detection

The extension automatically detects when a page is running the Myop SDK. The status bar at the bottom of the popup shows:

StatusMeaning
🟢 Myop SDK v1.x.xSDK detected with version number
No Myop SDK detectedPage is not using Myop
SDK Detection

Viewing Page Components

When the SDK is detected and components are loaded on the page:

  1. The status shows the component count: "Myop SDK v1.0.0 (3 components)"
  2. Click the expand arrow to see all components
  3. Each component shows its ID and element type
  4. Click "Focus" to highlight the component on the page
Page Components

The focused component will be highlighted with a pulsing purple border for 3 seconds, making it easy to locate on the page.

Component Highlight

Element Inspector

The extension includes a visual element inspector for exploring page structure:

  1. Click the magnifying glass button (🔍) in the SDK status bar
  2. The popup closes and inspect mode activates
  3. Your cursor changes to a crosshair
  4. Hover over any element to see it highlighted with its tag name
Inspect Mode

Inspector Controls

ActionResult
HoverHighlights element with purple border and shows tag info
ClickSelects the element (logs innerHTML to console)
ESCExits inspect mode without selecting
Coming Soon

The "Create Myop component" feature from selected elements is coming in a future release!

Badge Indicator

While inspect mode is active, the extension badge shows "🔍" with a purple background.


DevTools Panel

The extension adds a dedicated "Myop" tab to Chrome DevTools, providing powerful debugging and monitoring capabilities for your Myop components.

Opening the DevTools Panel

  1. Open Chrome DevTools (F12 or Cmd+Option+I on Mac)
  2. Navigate to the "Myop" tab in the DevTools panel tabs
  3. Click "Start Recording" to begin capturing events
DevTools Recording Stopped

Event Tracking

The DevTools panel captures and displays all Myop-related events in a table format similar to Chrome's Network tab:

DevTools Panel
ColumnDescription
TimeTimestamp when the event occurred
TypeEvent type (init_interface, cta_handler, consume, render, dispose)
FromSource of the event (Host App, Server, SDK, Component)
ToDestination of the event
DurationTime taken to process (color-coded: green < 16ms, yellow < 100ms, red > 100ms)
ContentPreview of the event payload
WaterfallVisual timeline bar showing when the event occurred relative to others

Event Types

TypeColorDescription
init_interface🔵 BlueComponent initialization calls from host to component
cta_handler🟠 OrangeCall-to-action events from component to host
consume🟢 GreenAPI calls to /consume endpoint (server or extension intercepted)
render🟣 PurpleComponent added to the page
dispose🔴 RedComponent removed from the page

Waterfall Timeline

The waterfall column provides a visual representation of event timing, similar to Chrome's Network tab:

  • Bar position shows when the event started relative to the first recorded event
  • Bar width represents the duration of the event
  • Instant events (like render/dispose) appear as small dots
  • Events with duration show the time label next to the bar

Recording Controls

ControlDescription
Record Button (⏺️)Toggle recording on/off. Red when recording.
Clear Button (🚫)Clear all recorded events
Filter InputSearch events by component name or content
Filter TabsFilter by event type (All, init_interface, cta_handler, consume, render, dispose)

Recording State

  • Recording state persists across page reloads - if you start recording and refresh the page, recording continues automatically
  • When recording is stopped, an overlay appears with a "Start Recording" button
  • The status indicator in the toolbar shows "Recording" or "Stopped"
Full Page Lifecycle

To capture all component events from page load, start recording first, then reload the page. This ensures you capture initial consume API calls and component renders.

Event Details

Click any row to view the full event payload in the detail panel below:

  • Payload Tab shows the complete JSON data
  • Copy Button copies the JSON to clipboard
  • Click the button or click another row to close

Theme Support

The DevTools panel automatically adapts to your system theme preference:

  • Dark theme when your system/browser is in dark mode
  • Light theme when your system/browser is in light mode

Badge States

The extension icon badge indicates the current state:

BadgeColorMeaning
Number (e.g., "3")🟢 GreenNumber of enabled local components
"||"🟠 OrangeInterception paused on current site
"🔍"🟣 PurpleElement inspector is active
(empty)-Extension active, no local components

How It Works

Request Interception

When a page makes a request to Myop's consume endpoint:

https://cloud.myop.dev/consume?id={componentId}

The extension checks if that component ID is registered locally:

  1. If registered & enabled → Returns local HTML content
  2. If not registered or disabled → Request passes through to cloud
  3. If site is paused → All requests pass through to cloud

Response Format

The extension generates a response matching Myop's API format:

{
"item": {
"name": "component-id",
"id": "component-id",
"consume_variant": [
{
"id": "dev-1234567890-abc123",
"name": "dev version (extension)",
"loader": {
"type": "HTMLLoader",
"shadowRootMode": "localFrame",
"HTML": "<your-local-html-content>"
}
}
]
}
}

Best Practices

Development Workflow

  1. Sync from dashboard to get the current production HTML
  2. Edit locally using your preferred code editor
  3. Update in extension by editing the component or re-syncing
  4. Test on any site that uses the component
  5. Deploy when ready through the Myop Dashboard

Tips

Hot Reload

For rapid iteration, keep your HTML in a local file and use the "Load from File" button to quickly update the component content.

Multiple Components

You can have multiple components registered simultaneously. Use the toggle switches to quickly enable/disable specific overrides.

Site Pausing

Remember that paused sites won't receive local content. Check the badge indicator if components aren't loading as expected.


Troubleshooting

Component Not Loading Locally

  1. Check that the component is enabled (toggle is green)
  2. Verify the site is not paused (no orange "||" badge)
  3. Confirm the Component ID matches exactly
  4. Check the Log tab to see if requests are being intercepted

Sync Not Working

  1. Ensure you're logged into dashboard.myop.dev
  2. Refresh the dashboard page and try again
  3. Check the browser console for error messages

SDK Not Detected

The SDK detection requires the page to have window.myop.rootSDK.version available. This is set by the Myop SDK after initialization. If you're testing on a page where Myop is still loading, wait a moment and reopen the popup.


Keyboard Shortcuts

ShortcutAction
ESCExit element inspector mode

Privacy & Security

  • The extension only intercepts requests to *.myop.dev/consume* endpoints
  • Authentication tokens are read from the dashboard page only (never stored)
  • All local component data is stored in Chrome's local storage
  • No data is sent to external servers (except normal Myop API calls)