Skip to content

vadimstruts/script-blocking-content-settings-extensions

Repository files navigation

My Basic Chrome Extension

A simple Chrome extension template with a popup interface, background service worker, and local storage functionality.

Features

  • Popup Interface: Clean, modern popup with interactive elements
  • Click Counter: Track and store click counts using Chrome's storage API
  • Toggle Functionality: Enable/disable the extension with a toggle switch
  • Background Service Worker: Handles extension lifecycle and messaging
  • Persistent Storage: Saves settings and data across browser sessions
  • Modern UI: Styled with CSS gradients and smooth animations

Files Structure

├── manifest.json       # Extension configuration and permissions
├── background.js       # Service worker for background tasks
├── popup.html         # Popup interface HTML
├── popup.js           # Popup functionality and interactions
├── popup.css          # Popup styling
├── icon16.png         # 16x16 extension icon
├── icon32.png         # 32x32 extension icon
├── icon48.png         # 48x48 extension icon
├── icon128.png        # 128x128 extension icon
└── README.md          # This file

Installation

  1. Open Chrome and navigate to chrome://extensions/
  2. Enable "Developer mode" in the top right corner
  3. Click "Load unpacked" and select this directory
  4. The extension will appear in your Chrome toolbar

Usage

  1. Click the extension icon in your Chrome toolbar to open the popup
  2. Use the "Click Me!" button to increment the counter
  3. Toggle the extension on/off using the switch at the bottom
  4. Clear the click count using the "Clear Count" button

Development

Permissions

The extension uses these permissions:

  • activeTab: Access to the currently active tab
  • storage: Store and retrieve data locally

Storage

The extension stores:

  • clickCount: Number of button clicks
  • extensionEnabled: Whether the extension is enabled

Customization

  • Modify popup.html to change the interface layout
  • Update popup.css to customize the styling
  • Edit popup.js to add new functionality
  • Adjust background.js for background tasks
  • Update manifest.json to add permissions or change settings

Browser Compatibility

This extension is built using Manifest V3 and is compatible with:

  • Chrome 88+
  • Edge 88+
  • Other Chromium-based browsers

License

This is a basic template for educational purposes. Feel free to modify and use as needed.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages