Skip to content

oribech/web-scripts-runner

Repository files navigation

Web Scripts Runner

A Chrome extension that lets you save named JavaScript snippets and run them later from reusable action buttons.

What it does

  • click the + button in the popup
  • give the action a name
  • paste a JavaScript console snippet
  • save it
  • click the saved Run button anytime later on a normal website tab

How execution works now

  • uses chrome.userScripts.execute() for user-provided code
  • tries MAIN world first for better console-style compatibility
  • falls back to USER_SCRIPT world when a site CSP blocks page-context execution
  • this avoids the unsafe-eval / new Function(...) error you saw on strict sites

Important Chrome setup

This extension now requires Chrome User Scripts support.

  • Chrome 138+: open chrome://extensions, open this extension's Details, and enable Allow User Scripts
  • Chrome 135-137: open chrome://extensions and enable Developer mode

Files

  • manifest.json - Chrome extension manifest (MV3)
  • popup.html / popup.css / popup.js - popup UI
  • src/ - storage, execution, and popup controller logic
  • tests/ - local automated tests

Load it in Chrome

  1. Open chrome://extensions
  2. Enable Developer mode
  3. Click Load unpacked
  4. Select this folder: /Users/oribecher/Projects/chrome-addons/web-scripts-runner
  5. If Chrome shows it, also enable Allow User Scripts in the extension details page

Run tests

npm install
npm test

Notes

  • minimum supported Chrome version is 135
  • saved actions are stored with chrome.storage.local
  • scripts run on the current active tab
  • Chrome still blocks internal pages like chrome:// and the Chrome Web Store

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors