Skip to content

About

No description, website, or topics provided.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Auto-PiP & Skip

Version License Manifest PRs Welcome

Noob-friendly. Install, toggle on, and forget about it. Watch Netflix in the background while you work — the extension handles the rest.

A zero-dependency Chrome extension (Manifest V3) that keeps your video playing in Picture-in-Picture when you switch tabs, auto-skips intros and recaps, and jumps to the next episode — on Netflix and any other site with a <video> element.

Demo

Quick Install

  1. Download the latest release
  2. Go to chrome://extensions, enable Developer mode
  3. Drag the .zip onto the page — Chrome auto-installs it

Even easier: install from the Chrome Web Store (one click, no developer mode needed).

Why?

You're working, browsing, or doing literally anything else in another tab. Netflix (or YouTube, or any video site) is playing. You switch away — boom, PiP pops up so the video floats over your workspace. You switch back — it docks right back into the tab. No clicks. No menus. No friction.

Even if you've never installed a Chrome extension before, this one takes under a minute from download to working.

Features

Feature What it does
Auto PiP on tab switch Switch away from a playing video tab → PiP opens automatically. Switch back → PiP closes and video snaps back into the tab. Works on all websites (Netflix, YouTube, Twitch, Vimeo, etc.).
One-click PiP (any site) Click the "PiP Now" button in the popup, or hit Alt+P (Windows/Linux) / ⌘⇧P (macOS) to toggle PiP on the current tab.
Auto-Skip Intros & Recaps (Netflix) Clicks "Skip Intro" and "Skip Recap" the instant they appear. Hands-free binge mode.
Auto-Next Episode (Netflix) Clicks "Next Episode" when the countdown appears. Marathon uninterrupted.
Per-site PiP control Enable or disable PiP on a per-website basis from the popup. Override the global default for any domain.
Settings popup Toggle every feature on/off independently. Changes apply instantly — no page reloads.
Cross-device sync All settings sync via your Chrome profile across every machine you sign into.
macOS shortcuts Detects your OS and shows the correct shortcut in the popup footer.
Zero data collection No analytics, no tracking, no network requests. The extension never phones home.

Installation

No build tools. No npm install. Just vanilla JS.

  1. Download this repo (Code → Download ZIP) or grab the latest release.
  2. Open Chrome and go to chrome://extensions.
  3. Toggle Developer mode on (top-right corner).
  4. Click Load unpacked and select the unzipped folder.
  5. Done. The extension icon appears in your toolbar — click it to tweak settings.

How It Works

Auto PiP Engine (all sites)

A MutationObserver watches for <video> elements on the page. When found, any disablePictureInPicture attribute is stripped so the browser's native PiP is available. A visibilitychange listener handles enter/exit:

  • Tab hidden + video playing → requestPictureInPicture()
  • Tab visible again → exitPictureInPicture() (docks back into the tab)

Netflix is excluded from the auto-exit behavior to avoid conflicts with its custom player.

Manual PiP (keyboard / button)

A background service worker (background.js) handles the Alt+P / ⌘⇧P keyboard shortcut and messages from the popup's "PiP Now" button. It uses chrome.scripting.executeScript to find the active tab's <video> element and toggle PiP on demand — no content script injection required.

Netflix Auto-Skip Engine

Runs only on netflix.com. A 500ms polling loop queries the DOM for Netflix's skip and next-episode buttons by their data-uia attributes and CSS classes. When a match appears, a synthetic click is dispatched.

Settings & Storage

All preferences live in chrome.storage.sync. The content script listens for storage changes in real time, so toggling any setting in the popup takes effect immediately on all open tabs.

Settings Reference

The popup is organized into four sections:

Section Toggles
Current Site Per-site PiP toggle (adds the current domain to the managed list), "PiP Now" button
Netflix Features Auto-Skip Intros & Recaps, Auto-Next Episode, Auto-PiP on Tab Switch
General Website Settings Auto-PiP on Tab Switch (applies to all non-Netflix sites with videos)
Managed Sites Per-domain PiP overrides — each with its own toggle and remove button. A global "All Other Sites" default controls unlisted domains.

Keyboard Shortcuts

Platform Shortcut Action
Windows / Linux Alt+P Toggle PiP on current tab
macOS ⌘⇧P (Command+Shift+P) Toggle PiP on current tab

These can be customized at chrome://extensions/shortcuts.

FAQ

Why isn't PiP working on a specific site?

Some sites use custom video players that don't expose a standard <video> element (e.g., DRM-protected streams, Flash-based players). The extension relies on the browser's native requestPictureInPicture() API. If a site actively blocks this API or uses a proprietary player, PiP won't work.

How do I disable PiP for a specific website?

Open the extension popup, find the site in the Managed Sites section, and toggle it off. If the site isn't listed yet, use the "Current Site" toggle to add it with PiP disabled.

Does this work on Firefox / Edge / Brave?

This is a Manifest V3 Chrome extension. It works on Chrome and Chromium-based browsers (Edge, Brave, Arc, Opera). Firefox supports Manifest V3 extensions but the installation steps differ — download the source and load it as a temporary add-on.

Does this extension work with DRM-protected content (Netflix 4K, HBO Max)?

Auto-PiP and auto-skip work with standard Netflix streaming. Widevine DRM-protected streams (used for 4K/HDR content) may restrict PiP — this is a browser-level limitation, not an extension one.

How do I customize the keyboard shortcut?

Go to chrome://extensions/shortcuts, find "Auto-PiP & Skip", and set any key combination you prefer.

Security Audit

A full codebase review found zero information leaks, zero outbound network requests, and zero third-party dependencies.

Category Status
Data exfiltration None — no fetch, XMLHttpRequest, WebSocket, or messaging
Permissions storage (settings), activeTab (manual PiP), scripting (inject PiP toggle)
XSS vectors None — no innerHTML, eval, or dynamic script injection
Dependencies Zero — pure vanilla JavaScript
CSP violations None — compatible with Netflix's Content Security Policy
Console logging Removed — prior versions logged activity; eliminated in v1.2
Credential access None — no cookie, session, or token access

Verdict: The extension is safe. It runs locally, never talks to the internet, and only touches <video> elements and Netflix UI buttons.

Permissions Explained

Permission Why
storage Persist your toggle preferences via chrome.storage.sync
activeTab Let the "PiP Now" button and keyboard shortcut find the video element on the tab you're currently viewing
scripting Inject a minimal script to toggle PiP when you press the shortcut or click "PiP Now"
*://*.netflix.com/* (host) Required for the auto-skip and auto-next features on Netflix
*://*/* (content script match) Needed so auto-PiP on tab switch works on any website

File Structure

ntflix_pip_ex/
├── manifest.json      # Manifest V3 — permissions, commands, content scripts
├── background.js      # Service worker — keyboard shortcut & manual PiP relay
├── content.js         # Content script — auto-PiP engine + Netflix auto-skip
├── popup.html         # Settings popup UI
├── popup.js           # Popup logic — toggles, site overrides, storage
├── popup.css          # Netflix-themed dark UI (300px compact layout)
├── icons/             # Extension icons (16, 48, 128)
└── README.md

Contributing

Bug reports and feature ideas are welcome via GitHub Issues. PRs should target main and keep the zero-dependency rule. See CONTRIBUTING.md for setup instructions.

License

MIT

About

No description, website, or topics provided.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages