Skip to content

TufayelLUS/OpenSource-Free-Tab-Auto-Refresher-Extension

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Auto Refresh Chrome Extension

Chrome Web Store Version License: MIT

A powerful Chrome extension that automatically refreshes web pages at customizable random intervals with persistent settings per page.

πŸ“Έ At A Glance

Screenshot

✨ Features

  • 🎲 Random Refresh Intervals: Set minimum and maximum seconds for random refresh timing
  • πŸ’Ύ Persistent Settings: Settings are automatically saved per URL and persist across browser sessions
  • πŸ”„ Auto-Restart: Automatically restarts refresh when navigating back to a page with saved settings
  • ⏱️ Live Countdown: Real-time countdown timer displayed on the extension icon badge
  • 🎨 Beautiful UI: Clean, modern popup interface with status indicators
  • πŸ”’ Secure: Only refreshes pages you explicitly enable, with proper permission handling

πŸš€ Installation

From Chrome Web Store (Recommended)

Not available yet!

Manual Installation (Developer Mode)

  1. Download or clone this repository
  2. Open Chrome and navigate to chrome://extensions/
  3. Enable "Developer mode" in the top right
  4. Click "Load unpacked" and select the extension folder
  5. The extension will be installed and ready to use

πŸ“– Usage

  1. Navigate to any webpage you want to auto-refresh
  2. Click the extension icon in your browser toolbar
  3. Set your refresh interval range (minimum and maximum seconds)
  4. Click "Start Auto Refresh" - the countdown begins immediately!
  5. Watch the live countdown on the extension badge
  6. Settings are automatically saved for this page

Key Features in Action:

  • Random Timing: Each refresh uses a new random interval within your specified range
  • Persistent: Return to the page later - auto-refresh will restart automatically
  • Visual Feedback: Green badge shows countdown, red when nearing refresh
  • Easy Control: Start/stop with one click, settings remembered per page

πŸ”§ How It Works

Architecture Overview

The extension consists of four main components:

manifest.json

  • Defines extension metadata, permissions, and entry points
  • Uses Manifest V3 for modern Chrome extension standards
  • Configures popup UI and background service worker

background.js (Service Worker)

The brain of the extension that handles:

  • Settings Management: Stores refresh settings per URL using Chrome's local storage
  • Alarm Scheduling: Uses Chrome alarms API for reliable timing
  • Badge Updates: Displays live countdown on extension icon
  • Tab Monitoring: Detects page changes and manages refresh cycles
  • Message Handling: Communicates with popup for real-time updates

popup.html & popup.js

  • User Interface: Clean, responsive popup with input controls
  • Real-time Status: Shows current refresh state and countdown
  • Settings Persistence: Loads and saves per-URL configurations
  • Validation: Ensures valid input ranges and provides user feedback

Refresh Cycle Flow

  1. User sets min/max seconds and clicks "Start"
  2. Extension generates random interval within range
  3. Alarm is scheduled for the refresh time
  4. Badge displays countdown timer
  5. When alarm triggers, page refreshes
  6. New random interval generated for next cycle
  7. Process repeats until stopped

Data Persistence

  • Settings stored per base URL (protocol + domain + path)
  • Survives browser restarts and tab closures
  • Automatically reapplies when returning to saved pages

πŸ” Permissions

The extension requires the following permissions (all standard for refresh functionality):

  • activeTab: Access current tab for refresh operations
  • storage: Save settings locally
  • tabs: Monitor tab changes and updates
  • scripting: Execute refresh scripts
  • alarms: Schedule refresh timers
  • host_permissions: <all_urls> - Only used for pages you explicitly enable

πŸ› οΈ Development

Prerequisites

  • Chrome browser
  • Basic understanding of JavaScript and Chrome Extensions

Local Development

  1. Clone the repository
  2. Enable Developer Mode in chrome://extensions/
  3. Load the extension as described in Installation
  4. Make changes and reload the extension

File Structure

auto-refresh-extension/
β”œβ”€β”€ manifest.json          # Extension configuration
β”œβ”€β”€ background.js          # Service worker logic
β”œβ”€β”€ popup.html            # Extension popup UI
β”œβ”€β”€ popup.js              # Popup interaction logic
└── README.md             # This file

Key Functions

Background Script (background.js)

  • startRefresh(): Initiates refresh cycle with random interval
  • stopRefresh(): Completely removes settings and stops timers
  • updateBadge(): Updates extension icon with countdown
  • getRandomInterval(): Generates random time within user range

Popup Script (popup.js)

  • updateUI(): Refreshes popup display with current status
  • Message listeners for real-time background updates
  • Input validation and user interaction handling

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ› Issues & Support

If you encounter any issues or have suggestions:

  • Open an issue on GitHub
  • Check the console for error messages
  • Ensure you're using a recent version of Chrome

πŸ™ Acknowledgments

  • Built with Chrome Extension Manifest V3
  • Uses modern JavaScript async/await patterns
  • Inspired by the need for reliable page refresh automation

Made with ❀️ for developers and power users who need automated page refreshing. Contact me to develop custom chrome extensions if you wish.

About

This open source chrome tab auto refresh tool is designed to randomly refresh a selected tab for the given range of seconds. No more downloading unsafe extensions that you don't trust, use open source projects for peace of mind!

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors