Netflix Time Reduction Chrome Extension A Chrome browser extension that helps users limit their Netflix viewing time by setting a timer and automatically closing the tab when time expires. Tech Stack
JavaScript: Core extension logic Chrome Extension APIs: webNavigation, tabs, runtime messaging HTML/CSS: Popup interface with Bootstrap styling Service Worker: Background script for timer management
Features Time Management
Timer Setup: Set viewing time in minutes through popup interface Automatic Detection: Triggers when navigating to Netflix browse page Visual Countdown: Real-time timer display in popup Auto Close: Automatically closes Netflix tab when timer expires Cloud Animation: Replaces Netflix content with animated clouds during setup
User Experience
Popup Interface: Clean, responsive design with Bootstrap Input Validation: Ensures positive number entry Real-time Updates: Live timer countdown display Automatic Trigger: Opens popup when visiting Netflix
Installation
Download the extension files Open Chrome and go to chrome://extensions/ Enable Developer Mode (toggle in top right) Click "Load unpacked" and select the extension folder The extension icon will appear in your browser toolbar
Usage
Visit Netflix: Navigate to https://www.netflix.com/browse Popup Opens: Extension automatically opens timer setup popup Set Time: Enter desired viewing time in minutes Click Submit: Timer starts and Netflix content is restored Monitor Time: Popup shows countdown timer Automatic Close: Netflix tab closes when timer reaches zero
File Structure
manifest.json - Extension configuration and permissions background.js - Service worker handling navigation and timer logic content.js - Content script for page manipulation popup.html - Timer setup interface popup.js - Popup functionality and messaging main.css - Custom styling bootstrap/ - Bootstrap framework files images/ - Extension icons
Key Features Background Script
Detects Netflix navigation Manages timer countdown Handles message passing between components
Content Script
Replaces Netflix content with cloud animation Restores original content when timer starts Runs only on Netflix domains
Popup Interface
Input validation for timer setup Real-time countdown display Bootstrap-styled responsive design
Permissions
webNavigation - Detect Netflix page visits tabs - Close Netflix tabs when timer expires activeTab - Access current tab information storage - Store extension data contentSettings - Modify page content
Browser Support
Chrome (Manifest V3) Chromium-based browsers
Contributing
Fork the repository Create a feature branch Make your changes Test the extension locally Submit a pull request