A Chrome extension that gives you full playback controls for GIF images on GitHub β pause, rewind, scrub through frames, and more.
- Play/Pause β Stop and resume GIF animations
- Rewind β Jump back to the first frame
- Frame Scrubber β Drag a slider to scrub through individual frames
- Frame Counter β See exactly which frame you're on (e.g., "12/47")
- Open in New Tab β Quickly open any GIF in a new browser tab
- Keyboard Shortcuts β Space (play/pause), ββ (prev/next frame), Home (rewind)
- Responsive Controls β Clean overlay that adapts to any GIF size
- Settings β Auto-pause on load, always-visible controls, toggle keyboard shortcuts
- Dynamic Detection β Automatically picks up GIFs loaded via GitHub's Turbo navigation
Screen.Cast.2026-03-12.at.9.22.47.AM.mp4
The extension uses gifuct-js to decode GIFs into individual frames, then renders them on a <canvas> element with full playback control. Controls are rendered in a Shadow DOM for complete style isolation from GitHub's CSS. A MutationObserver detects GIFs added dynamically.
- Download the latest
gh-gif-ctrl.zipfrom the Releases page - Unzip the downloaded file
- Load in Chrome:
- Open
chrome://extensions/ - Enable Developer mode (top right toggle)
- Click Load unpacked
- Select the unzipped folder
- Open
- Navigate to any GitHub page with GIFs β controls will appear on hover!
-
Clone and build:
git clone https://github.com/balazstasi/gh-gif-ctrl.git cd gh-gif-ctrl npm install npm run build -
Load in Chrome:
- Open
chrome://extensions/ - Enable Developer mode (top right toggle)
- Click Load unpacked
- Select the
dist/folder
- Open
-
Navigate to any GitHub page with GIFs β controls will appear on hover!
# Install dependencies
npm install
# Build (production)
npm run build
# Build (watch mode for development)
npm run dev
# Run tests
npm test
# Run tests in watch mode
npm run test:watchsrc/
βββ content/ # Content script (runs on GitHub pages)
β βββ index.ts # Entry point β scans for GIFs, initializes players
β βββ gif-detector.ts # Finds GIF images in the DOM
β βββ gif-decoder.ts # Decodes GIF binary β frame ImageData[]
β βββ gif-player.ts # Canvas-based player with playback state
β βββ gif-controls.ts # UI controls overlay (Shadow DOM)
β βββ styles.css # Control bar styles
βββ popup/ # Extension popup (settings)
βββ background/ # Service worker (badge updates)
βββ shared/ # Types and storage utilities
βββ icons/ # Extension icons
Click the extension icon to access settings:
| Setting | Default | Description |
|---|---|---|
| Auto-pause on load | Off | GIFs start paused, click play to animate |
| Controls visibility | Hover | Show controls on hover or always |
| Keyboard shortcuts | On | Enable Space, ββ, Home shortcuts |
| Key | Action |
|---|---|
Space |
Play / Pause |
β |
Previous frame |
β |
Next frame |
Home |
Rewind to first frame |
Note: Focus the GIF (click on it) to activate keyboard shortcuts.
- TypeScript β Type-safe codebase
- gifuct-js β Fast GIF frame decoder
- Webpack β Bundling for Chrome extension
- Jest β Unit testing
- Shadow DOM β Style isolation from GitHub CSS
- Manifest V3 β Modern Chrome extension API
Possible future improvements are:
- Make the extension work on other sites too, potentially all GIFs
- Add additional controls/themeing options
- Extend current browser video controls with useful features
MIT