← All tools

Tool · Tampermonkey userscript

Responsive Viewport Overlay

A floating panel that shows the live viewport size, and reopens any page at a device size in one click.

Version
1.8.4.3
Licence
MIT
Runs on
Any site
Shortcut
Alt+Shift+O

Needs the free Tampermonkey extension for Chrome, Firefox, Edge or Safari. Install it first, then the script.

01 / The check

Checking pages at specific screen sizes

Device modes are tucked away in developer tools and don't show the real window. I wanted the viewport size on screen at all times, and one click to see any page at the sizes I test every day.

02 / Features

What it does

  • Live viewport size

    Width × height, updating as you resize.

  • One-click device sizes

    Reopens the page in a new window, from 320×568 up to 2560×900.

  • Custom sizes

    Type any width, with an optional height.

  • Your own presets

    Edit and save them, and export or import them as a settings file.

  • Touch mode

    Hides the scrollbars to mimic a phone or tablet.

  • Stays out of the way

    Drag it, snap it to an edge or collapse it. It remembers each site.

03 / How to use it

4 steps

  1. Step 1: Install Tampermonkey, then the script.

  2. Step 2: Open any page: the panel appears top right.

  3. Step 3: Click a size to open the page at that size, or type your own.

  4. Step 4: Press Alt+Shift+O to hide or show the panel.

04 / Under the hood

How it's built

The panel lives in Shadow DOM, so its styles and the page's styles never clash. Settings are saved per domain in localStorage, and it skips iframes so it only ever appears once.

  • Responsive design
  • Testing
  • JavaScript
  • Shadow DOM
Next tool Image Size Highlighter

All my userscripts, free and open source

Browse on GitHub