Skip to content

DarKnolo/Autostash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Autostash

A simple and powerful browser extension for developers that automatically sets localStorage values or creates URL redirects for specified websites. Stop manually setting flags in dev tools and automate your testing and development workflow!

Features

  • Set-and-Forget Rules: Create rules that automatically run every time you visit a matching page.
  • Two Core Actions: Set items in LocalStorage or set up URL Redirects.
  • Flexible Matching:
    • LocalStorage: Use wildcards (*) to target domains and paths (e.g., https://*.myapp.com/admin/*).
    • Redirects: Use exact URLs for precise, reliable navigation changes.
  • Rule Groups: Organize rules with optional group labels. Groups are collapsible in the UI.
  • Import/Export: Back up all your rules as JSON or share them across machines.
  • Search & Filter: Quickly find rules by pattern, key, value, or group name.
  • Smart Suggestions: Auto-populate new rules by pulling existing keys and values from the current page's localStorage.
  • Matched Rule Counter: The extension icon shows a badge with the count of active rules matching the current page.
  • Cross-Browser: Works on Chrome, Edge, and Firefox.
  • Privacy-Focused: No data is ever collected or sent anywhere. All rules are stored locally in your browser.

Why Would I Use This?

  • Testing Preview Features: Use a localStorage rule with a wildcard (*.dev.site.com) to set adminMode to true across all development subdomains.
  • A/B Testing: Force your browser into a specific test group by setting a localStorage item.
  • Simplifying URLs: Use a redirect rule to automatically go from a clean URL to the full URL with login parameters.
  • Bypassing Login Pages: For local development, automatically redirect from http://localhost:3000/login to http://localhost:3000/dashboard.
  • Dismissing Banners: Permanently dismiss annoying popups by setting the "dismissed" flag in localStorage on every visit.

Installation

Chrome / Edge (Web Store)

https://chromewebstore.google.com/detail/autostash/epjbikleenhdegeihnmibapnmbandmij

Firefox (Add-ons)

https://addons.mozilla.org/de/firefox/addon/autostash/

From Source (Development)

  1. Clone this repository:

    git clone https://github.com/DarKnolo/Autostash.git
    cd Autostash
    npm install
  2. Build for your browser:

    npm run build

    This generates dist/chrome/ and dist/firefox/.

  3. Load the extension:

    • Chrome/Edge: Go to chrome://extensions → Enable Developer mode → Load unpacked → Select dist/chrome/
    • Firefox: Go to about:debugging#/runtime/this-firefox → Load Temporary Add-on → Select dist/firefox/manifest.json

    For development you can also load the autostash/ directory directly in Chrome/Edge.

How to Use

  1. Click the extension icon in your browser toolbar to open the popup.
  2. Select the action: LocalStorage or Redirects.
  3. Fill in the fields:
    • URL Pattern — For localStorage, supports wildcards (*). For redirects, use the exact URL.
    • Key / Value — The localStorage key and value to set, or the redirect target URL.
    • Group (optional) — A label to organize related rules together.
  4. Click "Add Rule".
  5. Your rules appear in the list below, grouped and categorized as Active, Enabled, or Disabled.
  6. Navigate to a matching URL — the extension automatically performs the action.

Import / Export

  • Export: Click the download icon in the rules header to save all rules as a JSON file.
  • Import: Click the upload icon to import rules from a previously exported JSON file.

Search

Use the filter input above the rules list to search by pattern, key, value, or group name.

Development

npm install
npm run build          # Build for Chrome + Firefox
npm run test:unit      # Fast unit tests (Vitest)
npm test               # E2E tests (Playwright + Chromium)
npm run test:headed    # E2E tests with visible browser

Contributing

Contributions are welcome! If you have ideas for new features, improvements, or have found a bug, please feel free to open an issue or submit a pull request.

License

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

About

⚙️ A simple rule engine to automatically manage localStorage on any website.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

 
 
 

Contributors