Imoran ai LogoImoran ai Logo

Motion Inspector

A Chrome extension that pauses and scrubs the animations on any page and exports each one as CSS, a linear() easing, Motion or GSAP, built in vanilla TypeScript on WXT.

Services

Browser Extension Development & Tooling

Timeline

2 Days

Technologies
Vanilla TypeScriptWXT FrameworkChrome Extension APIWeb Animations APIVitestPlaywright
View Live Project →

The motion-inspector wordmark beside a line drawing of a browser with the inspector docked as a side panel: a waveform, an easing curve and a list of animations.
01

Introduction

A Chrome extension that pauses and scrubs the animations on any page and exports each one as CSS, a linear() easing, Motion or GSAP, built in vanilla TypeScript on WXT.

02

Work Done

Chrome Extension

Two panel views side by side: the list of live animations tagged CSS, WAAPI, GSAP and Transition, and the drill-in for a spring called drop with its overshooting curve.
03

Challenges

Catching transitions that finish in a few hundred milliseconds, reading GSAP from outside the page, and turning a spring the browser only sees as a sampled linear() curve back into code a developer would write.

The global waveform previewing 1260 ms with two animations running, next to the per-animation scrubber drawn from the spring's eased value.
04

Solutions

A page agent injected into the MAIN world on demand that wraps Element.prototype.animate and listens for transitionrun, holding finished animations so they can still be exported. A spring fit that searches damping and frequency and writes type: "spring" when the error is under 1.5%.

The side panel paused at 1150 ms over a waveform, listing six live animations tagged CSS, WAAPI and GSAP.
The Motion export tab for a toast-in animation, its sampled linear() spring rewritten as type spring with a bounce of 0.18.
05

Results

Released as v0.3.0 on GitHub: four export formats, a waveform transport with frame stepping and J/K/L keys, 99 passing unit tests and a Playwright run against the built extension. The CSS export still drops a GSAP repeatDelay.

06

Details

The gap

Chrome DevTools can pause and scrub a page's animations, but it never hands you code. I wanted to freeze an animation on any site and copy it out as CSS, a `linear()` easing, Motion or GSAP. Motion Inspector does that from Chrome's side panel, which stays open while you hover and scroll the page.

One call per command

There is no message bridge. Every command from the panel is a single `chrome.scripting.executeScript` into the page's MAIN world, the only place that can see `window.gsap` and wrap `Element.prototype.animate`. That wrapper, plus capture-phase `transitionrun` listeners, is how a 200 ms hover transition gets caught before `getAnimations()` forgets it.

Springs come back as springs

Motion hands a spring to the browser as a `linear()` curve with dozens of sampled stops. Pasting that back helps nobody, so the exporter grid-searches damping and frequency against the curve. When the fit lands under 1.5% RMS error, the Motion tab writes `type: "spring"` with `bounce` and `visualDuration` instead.

A waveform for a timeline

The scrubber's bars show how many animations run at each moment, laid out in whole device pixels from a ResizeObserver. A Playwright run checks the panel never scrolls sideways at widths from 300 to 600px. The CSS export still drops a GSAP `repeatDelay`, and that is the next fix.

Created by

Tope Akintola

Published

November 2, 2026

Role

Browser Extension Development & Tooling

Share

Let's Work
Together

Hand Reaching

Have a project in mind? We'd love to hear about it. Let's create something great together!

PRODUCT DEVELOPERUI ENGINEERMVP DEVELOPMENTFRONTEND DEVELOPMENTPRODUCT DEVELOPERUI ENGINEERMVP DEVELOPMENTFRONTEND DEVELOPMENTPRODUCT DEVELOPERUI ENGINEERMVP DEVELOPMENTFRONTEND DEVELOPMENT