Skip to content

About

Chrome extension to run custom JavaScript each time you visit a website, automatically on page load. A per-domain javascript injector: inject JS snippets per site, saved across restarts. Not a userscript manager - your own JS per site, in a built-in Ace editor. Manifest V3.

Topics

Resources

Stars

22 stars

Watchers

2 watching

Forks

Latest commit

ย 

History

49 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ Run Javascript Chrome Extension

Transform any website into your personal playground with custom JavaScript execution!

The ultimate Chrome extension for web developers, power users, and automation enthusiasts who want to take control of their browsing experience.

โœจ What Makes This Extension Amazing?

๐ŸŽฏ Instant Website Customization

  • Run custom JavaScript on ANY website - No more "I wish this site worked differently"
  • Real-time execution - See your changes instantly as you type
  • Domain-specific scripts - Set it once, works forever on that site
  • One-click enable/disable - Toggle your customizations effortlessly

๐Ÿ’ป Professional Developer Experience

  • Built-in code editor with syntax highlighting powered by Ace Editor
  • Multiple jQuery versions (1.12.4, 2.2.4, 3.3.1) or go library-free
  • Persistent storage - Your scripts survive browser restarts
  • Error handling & reporting - Debug with confidence

๐Ÿ”’ Enterprise-Grade Security

  • Manifest V3 compliant - Latest Chrome security standards
  • Sandboxed execution - Your scripts run safely in isolation
  • Service worker architecture - Modern, efficient background processing
  • Duplicate execution prevention - Smart, reliable script management

๐ŸŒŸ Real-World Use Cases

๐ŸŽจ UI/UX Enhancements

// Transform any website into a cyberpunk theme
document.body.style.cssText = `
  background: linear-gradient(45deg, #0a0a0a, #1a0033) !important;
  color: #00ff41 !important;
  font-family: 'Courier New', monospace !important;
  text-shadow: 0 0 10px #00ff41 !important;
`;

// Add Matrix-style falling code effect
const canvas = document.createElement('canvas');
canvas.style.cssText = 'position:fixed;top:0;left:0;width:100vw;height:100vh;pointer-events:none;z-index:9999;opacity:0.1';
document.body.appendChild(canvas);
const ctx = canvas.getContext('2d');
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
const chars = '01ใ‚ขใ‚คใ‚ฆใ‚จใ‚ชใ‚ซใ‚ญใ‚ฏใ‚ฑใ‚ณใ‚ตใ‚ทใ‚นใ‚ปใ‚ฝใ‚ฟใƒใƒ„ใƒ†ใƒˆใƒŠใƒ‹ใƒŒใƒใƒŽใƒใƒ’ใƒ•ใƒ˜ใƒ›ใƒžใƒŸใƒ ใƒกใƒขใƒคใƒฆใƒจใƒฉใƒชใƒซใƒฌใƒญใƒฏใƒฒใƒณ';
const drops = Array(Math.floor(canvas.width/20)).fill(1);
setInterval(() => {
  ctx.fillStyle = 'rgba(0,0,0,0.05)';
  ctx.fillRect(0,0,canvas.width,canvas.height);
  ctx.fillStyle = '#00ff41';
  ctx.font = '15px monospace';
  drops.forEach((y,i) => {
    ctx.fillText(chars[Math.floor(Math.random()*chars.length)], i*20, y*20);
    drops[i] = y*20 > canvas.height && Math.random() > 0.975 ? 0 : y+1;
  });
}, 50);

โšก Productivity Boosters

// Create a floating productivity dashboard
const dashboard = document.createElement('div');
dashboard.innerHTML = `
  <div style="position:fixed;top:20px;right:20px;background:rgba(0,0,0,0.9);color:#fff;padding:20px;border-radius:10px;z-index:10000;font-family:Arial;min-width:300px;backdrop-filter:blur(10px);">
    <h3>๐Ÿš€ Productivity Hub</h3>
    <div id="clock" style="font-size:24px;color:#00ff41;margin:10px 0;"></div>
    <div id="focus-timer" style="margin:10px 0;">
      <button onclick="startPomodoro()" style="background:#ff4444;color:white;border:none;padding:8px 16px;border-radius:5px;cursor:pointer;">Start 25min Focus</button>
      <div id="timer-display" style="font-size:18px;margin-top:10px;"></div>
    </div>
    <div style="margin:10px 0;">
      <input id="quick-note" placeholder="Quick note..." style="width:100%;padding:8px;border:none;border-radius:5px;background:#333;color:#fff;">
      <button onclick="saveNote()" style="background:#4CAF50;color:white;border:none;padding:8px;border-radius:5px;margin-top:5px;cursor:pointer;">Save Note</button>
    </div>
    <div id="saved-notes" style="max-height:200px;overflow-y:auto;margin-top:10px;"></div>
  </div>
`;
document.body.appendChild(dashboard);

// Clock functionality
setInterval(() => {
  document.getElementById('clock').textContent = new Date().toLocaleTimeString();
}, 1000);

// Pomodoro timer
let pomodoroInterval;
window.startPomodoro = () => {
  let timeLeft = 25 * 60;
  const display = document.getElementById('timer-display');
  pomodoroInterval = setInterval(() => {
    const minutes = Math.floor(timeLeft / 60);
    const seconds = timeLeft % 60;
    display.textContent = `${minutes}:${seconds.toString().padStart(2, '0')}`;
    if (timeLeft <= 0) {
      clearInterval(pomodoroInterval);
      alert('๐ŸŽ‰ Pomodoro complete! Take a 5-minute break.');
    }
    timeLeft--;
  }, 1000);
};

// Note saving
window.saveNote = () => {
  const note = document.getElementById('quick-note').value;
  if (note) {
    const notes = JSON.parse(localStorage.getItem('quickNotes') || '[]');
    notes.unshift({text: note, time: new Date().toLocaleString()});
    localStorage.setItem('quickNotes', JSON.stringify(notes.slice(0, 10)));
    document.getElementById('quick-note').value = '';
    displayNotes();
  }
};

function displayNotes() {
  const notes = JSON.parse(localStorage.getItem('quickNotes') || '[]');
  document.getElementById('saved-notes').innerHTML = notes.map(note => 
    `<div style="background:#444;padding:8px;margin:5px 0;border-radius:5px;font-size:12px;">
      <div>${note.text}</div>
      <div style="color:#888;font-size:10px;">${note.time}</div>
    </div>`
  ).join('');
}
displayNotes();

๐Ÿ“Š Data Extraction & Monitoring

// Advanced web scraper with real-time data visualization
const createDataDashboard = () => {
  const dashboard = document.createElement('div');
  dashboard.innerHTML = `
    <div style="position:fixed;bottom:20px;left:20px;background:rgba(0,0,0,0.95);color:#fff;padding:20px;border-radius:15px;z-index:10000;font-family:Arial;width:400px;backdrop-filter:blur(10px);border:1px solid #333;">
      <h3>๐Ÿ“Š Live Data Monitor</h3>
      <div id="data-stats" style="display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:15px 0;"></div>
      <canvas id="data-chart" width="360" height="150" style="background:#111;border-radius:5px;"></canvas>
      <div style="margin-top:15px;">
        <button onclick="extractPageData()" style="background:#2196F3;color:white;border:none;padding:10px 15px;border-radius:5px;cursor:pointer;margin-right:10px;">Scan Page</button>
        <button onclick="exportData()" style="background:#4CAF50;color:white;border:none;padding:10px 15px;border-radius:5px;cursor:pointer;">Export CSV</button>
      </div>
      <div id="extracted-data" style="max-height:200px;overflow-y:auto;margin-top:15px;font-size:12px;"></div>
    </div>
  `;
  document.body.appendChild(dashboard);
  
  const canvas = document.getElementById('data-chart');
  const ctx = canvas.getContext('2d');
  let dataPoints = [];
  
  window.extractPageData = () => {
    const data = {
      links: document.querySelectorAll('a').length,
      images: document.querySelectorAll('img').length,
      forms: document.querySelectorAll('form').length,
      buttons: document.querySelectorAll('button').length,
      videos: document.querySelectorAll('video').length,
      scripts: document.querySelectorAll('script').length,
      timestamp: Date.now()
    };
    
    dataPoints.push(data);
    if (dataPoints.length > 20) dataPoints.shift();
    
    // Update stats
    document.getElementById('data-stats').innerHTML = `
      <div style="background:#333;padding:10px;border-radius:5px;text-align:center;">
        <div style="font-size:24px;color:#2196F3;">${data.links}</div>
        <div style="font-size:12px;">Links</div>
      </div>
      <div style="background:#333;padding:10px;border-radius:5px;text-align:center;">
        <div style="font-size:24px;color:#4CAF50;">${data.images}</div>
        <div style="font-size:12px;">Images</div>
      </div>
      <div style="background:#333;padding:10px;border-radius:5px;text-align:center;">
        <div style="font-size:24px;color:#FF9800;">${data.forms}</div>
        <div style="font-size:12px;">Forms</div>
      </div>
      <div style="background:#333;padding:10px;border-radius:5px;text-align:center;">
        <div style="font-size:24px;color:#E91E63;">${data.buttons}</div>
        <div style="font-size:12px;">Buttons</div>
      </div>
    `;
    
    // Draw chart
    ctx.clearRect(0, 0, canvas.width, canvas.height);
    if (dataPoints.length > 1) {
      const maxValue = Math.max(...dataPoints.map(d => d.links));
      dataPoints.forEach((point, i) => {
        const x = (i / (dataPoints.length - 1)) * (canvas.width - 40) + 20;
        const y = canvas.height - 20 - ((point.links / maxValue) * (canvas.height - 40));
        ctx.fillStyle = '#2196F3';
        ctx.fillRect(x - 2, y, 4, canvas.height - y - 20);
      });
    }
    
    // Show extracted data
    document.getElementById('extracted-data').innerHTML = `
      <div style="background:#222;padding:10px;border-radius:5px;margin-top:10px;">
        <strong>Latest Scan:</strong><br>
        ${Object.entries(data).filter(([k]) => k !== 'timestamp').map(([k,v]) => `${k}: ${v}`).join(', ')}
      </div>
    `;
  };
  
  window.exportData = () => {
    const csv = 'timestamp,links,images,forms,buttons,videos,scripts\n' + 
      dataPoints.map(d => `${new Date(d.timestamp).toISOString()},${d.links},${d.images},${d.forms},${d.buttons},${d.videos},${d.scripts}`).join('\n');
    const blob = new Blob([csv], {type: 'text/csv'});
    const url = URL.createObjectURL(blob);
    const a = document.createElement('a');
    a.href = url;
    a.download = `page-data-${Date.now()}.csv`;
    a.click();
  };
};

createDataDashboard();

๐ŸŽฎ Fun & Creative

// Create an interactive particle system that follows your mouse
const createParticleSystem = () => {
  const canvas = document.createElement('canvas');
  canvas.style.cssText = 'position:fixed;top:0;left:0;width:100vw;height:100vh;pointer-events:none;z-index:9998;';
  document.body.appendChild(canvas);
  
  const ctx = canvas.getContext('2d');
  canvas.width = window.innerWidth;
  canvas.height = window.innerHeight;
  
  const particles = [];
  const colors = ['#ff6b6b', '#4ecdc4', '#45b7d1', '#96ceb4', '#ffeaa7', '#dda0dd', '#98d8c8'];
  
  class Particle {
    constructor(x, y) {
      this.x = x;
      this.y = y;
      this.vx = (Math.random() - 0.5) * 4;
      this.vy = (Math.random() - 0.5) * 4;
      this.life = 1;
      this.decay = Math.random() * 0.02 + 0.01;
      this.size = Math.random() * 6 + 2;
      this.color = colors[Math.floor(Math.random() * colors.length)];
    }
    
    update() {
      this.x += this.vx;
      this.y += this.vy;
      this.life -= this.decay;
      this.size *= 0.99;
    }
    
    draw() {
      ctx.save();
      ctx.globalAlpha = this.life;
      ctx.fillStyle = this.color;
      ctx.shadowBlur = 20;
      ctx.shadowColor = this.color;
      ctx.beginPath();
      ctx.arc(this.x, this.y, this.size, 0, Math.PI * 2);
      ctx.fill();
      ctx.restore();
    }
  }
  
  let mouseX = 0, mouseY = 0;
  
  document.addEventListener('mousemove', (e) => {
    mouseX = e.clientX;
    mouseY = e.clientY;
    
    // Create particles at mouse position
    for (let i = 0; i < 3; i++) {
      particles.push(new Particle(mouseX + (Math.random() - 0.5) * 20, mouseY + (Math.random() - 0.5) * 20));
    }
  });
  
  // Add click explosion effect
  document.addEventListener('click', (e) => {
    for (let i = 0; i < 30; i++) {
      particles.push(new Particle(e.clientX, e.clientY));
    }
  });
  
  function animate() {
    ctx.fillStyle = 'rgba(0, 0, 0, 0.1)';
    ctx.fillRect(0, 0, canvas.width, canvas.height);
    
    for (let i = particles.length - 1; i >= 0; i--) {
      const particle = particles[i];
      particle.update();
      particle.draw();
      
      if (particle.life <= 0) {
        particles.splice(i, 1);
      }
    }
    
    requestAnimationFrame(animate);
  }
  
  animate();
  
  // Resize handler
  window.addEventListener('resize', () => {
    canvas.width = window.innerWidth;
    canvas.height = window.innerHeight;
  });
};

// Add floating action button to toggle effects
const fab = document.createElement('div');
fab.innerHTML = 'โœจ';
fab.style.cssText = `
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  z-index: 10001;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  transition: transform 0.3s ease;
`;

fab.addEventListener('mouseenter', () => fab.style.transform = 'scale(1.1)');
fab.addEventListener('mouseleave', () => fab.style.transform = 'scale(1)');
fab.addEventListener('click', createParticleSystem);

document.body.appendChild(fab);

๐Ÿš€ Why Choose This Extension?

Feature This Extension Others
Ease of Use โœ… One-click setup โŒ Complex configuration
Security โœ… Manifest V3 + Sandboxing โŒ Outdated security
Performance โœ… Service worker architecture โŒ Legacy background pages
Developer Experience โœ… Syntax highlighting + jQuery โŒ Plain text editors
Reliability โœ… Duplicate prevention + error handling โŒ Script conflicts
Future-Proof โœ… Active development + roadmap โŒ Abandoned projects

๐ŸŽฏ Perfect For

  • ๐Ÿง‘โ€๐Ÿ’ป Web Developers - Test ideas, prototype features, debug issues
  • ๐Ÿ”ง Power Users - Customize websites to your exact preferences
  • ๐Ÿ“ˆ Digital Marketers - A/B test changes, extract analytics data
  • ๐ŸŽ“ Students & Educators - Learn JavaScript in a real-world environment
  • ๐Ÿค– Automation Enthusiasts - Automate repetitive web tasks
  • ๐ŸŽจ Designers - Quickly test visual changes and improvements

๐Ÿƒโ€โ™‚๏ธ Quick Start - Get Running in 60 Seconds

For Users (No Coding Required!)

  1. Install the extension from Chrome Web Store
  2. Visit any website you want to customize
  3. Click the extension icon in your toolbar
  4. Choose a template or write simple JavaScript
  5. Hit "Save & Run" and watch the magic happen! โœจ

For Developers

# Clone and set up in under 2 minutes
git clone [repository-url]
cd RunJavascript_ChromeExtension
bun install          # Lightning-fast dependency installation
bun test            # Comprehensive test suite
# Load in Chrome developer mode and you're ready!

๐Ÿ› ๏ธ Development Setup

This project uses Bun - the fastest JavaScript runtime for blazing-fast development.

Prerequisites

  • Bun (v1.0.0+) - 3x faster than npm
  • Chrome (v90+) - Latest features supported
  • Basic JavaScript knowledge (we'll handle the rest!)

Installation

# One command setup
bun install

# Run the comprehensive test suite
bun test

# Watch mode for active development
bun test --watch

# Coverage reports for quality assurance
bun test --coverage

๐Ÿ“ Project Architecture

๐Ÿ—๏ธ Modern, Scalable Architecture
โ”œโ”€โ”€ docs/                         # ๐Ÿ“š Comprehensive documentation
โ”‚   โ”œโ”€โ”€ PROJECT_OVERVIEW.md       # ๐ŸŽฏ Quick start guide
โ”‚   โ”œโ”€โ”€ ROADMAP.md                # ๐Ÿ—บ๏ธ Development roadmap with progress tracking
โ”‚   โ”œโ”€โ”€ IMPLEMENTATION_GUIDE.md   # ๐Ÿ”ง Technical deep-dive
โ”‚   โ””โ”€โ”€ FEATURE_SPECIFICATIONS.md # ๐Ÿ“‹ Detailed feature specs
โ”œโ”€โ”€ tests/                        # ๐Ÿงช Comprehensive test coverage
โ”‚   โ”œโ”€โ”€ utils/                    # ๐Ÿ› ๏ธ Testing utilities
โ”‚   โ””โ”€โ”€ setup.js                  # โš™๏ธ Test configuration
โ”œโ”€โ”€ assets/                       # ๐ŸŽจ Visual assets
โ”œโ”€โ”€ background.js                 # ๐Ÿ”„ Service worker (Manifest V3)
โ”œโ”€โ”€ popup.html                    # ๐Ÿ–ผ๏ธ Beautiful, intuitive UI
โ”œโ”€โ”€ popup.js                      # โšก Lightning-fast popup logic
โ”œโ”€โ”€ inject.js                     # ๐Ÿ’‰ Secure script injection
โ”œโ”€โ”€ storage.js                    # ๐Ÿ’พ Reliable data persistence
โ”œโ”€โ”€ manifest.json                 # ๐Ÿ“œ Chrome extension configuration
โ””โ”€โ”€ README.md                     # ๐Ÿ“– This amazing documentation

๐Ÿ“š Documentation - Everything You Need

๐ŸŽฏ New to the project?

Start with docs/PROJECT_OVERVIEW.md - Get up to speed in 5 minutes!

๐Ÿ—บ๏ธ Want to see what's coming?

Check docs/ROADMAP.md - Exciting features with progress tracking!

๐Ÿ”ง Ready to contribute?

Use docs/IMPLEMENTATION_GUIDE.md - Technical architecture & guidelines

๐Ÿ“‹ Need feature details?

Reference docs/FEATURE_SPECIFICATIONS.md - Complete specifications

๐Ÿค– Automated Publishing Setup

Check .github/WEBSTORE_SETUP.md - Configure automated Chrome Web Store publishing

๐Ÿค– Automated Build & Publishing

This extension includes a complete CI/CD pipeline with GitHub Actions:

๐Ÿ”„ Automated Workflows

  • Continuous Integration: Runs tests on every push and PR
  • Automated Building: Creates extension packages automatically
  • Chrome Web Store Publishing: Publishes releases directly to the store
  • Release Management: Creates GitHub releases with changelogs

๐Ÿš€ Easy Release Process

# Bump version and create release (patch/minor/major)
./scripts/release.sh patch

# The script will:
# โœ… Update manifest.json version
# โœ… Run tests to ensure quality
# โœ… Create git tag and push
# โœ… Trigger automated publishing

๐Ÿ“ฆ Manual Builds

Need a quick build? Use the manual workflow:

  1. Go to GitHub Actions tab
  2. Run "Manual Build" workflow
  3. Choose options (create release, publish to store)
  4. Download the built extension

๐Ÿš€ Exciting Roadmap - The Future is Bright

๐ŸŽฏ Phase 1: Core Enhancements (Coming Soon!)

  • ๐Ÿ“š Script Library - Save & organize multiple scripts per site
  • ๐ŸŽฎ Manual Triggers - Run scripts on-demand with hotkeys
  • ๐Ÿ› Advanced Debugging - Console output capture & error highlighting
  • ๐ŸŒ™ Dark Mode - Beautiful dark theme for night coding

โšก Phase 2: Power User Features

  • ๐ŸŽฏ Conditional Execution - Smart script triggering based on conditions
  • ๐Ÿ“ฆ Import/Export - Share scripts with the community
  • ๐Ÿ“š More Libraries - Lodash, Moment.js, D3.js support
  • โœจ Enhanced Editor - Autocomplete & intelligent hints

๐Ÿš€ Phase 3: Advanced Capabilities

  • ๐Ÿ“ Script Versioning - Track changes with git-like history
  • ๐Ÿงฉ Code Snippets - Reusable code blocks library
  • ๐Ÿ“ฆ Custom Libraries - Load any JavaScript library
  • โฐ Scheduling - Time-based script execution

๐ŸŒ Phase 4: Community Platform

  • ๐Ÿค Script Sharing - Discover & share amazing scripts
  • ๐Ÿ‘ฅ Collaborative Editing - Real-time team development
  • ๐Ÿ”’ Enhanced Security - Granular permission controls
  • ๐Ÿ“– Auto Documentation - Generate docs from your code

๐Ÿ† Why This Extension Will Change Your Web Experience

๐ŸŽฏ Immediate Impact

  • Save hours daily by automating repetitive tasks
  • Customize any website to match your workflow
  • Fix annoying UI issues that developers ignore
  • Extract data from any page effortlessly

๐Ÿ“ˆ Long-term Benefits

  • Learn JavaScript in a practical, fun environment
  • Prototype ideas before building full applications
  • Boost productivity with personalized web experiences
  • Join a community of creative web customizers

๐Ÿ”ฎ Future-Proof Investment

  • Active development with regular updates
  • Modern architecture built for Chrome's future
  • Comprehensive roadmap with exciting features
  • Open source - contribute and shape the future

๐Ÿค Join the Revolution

This isn't just a Chrome extension - it's a movement to give users control over their web experience. Whether you're automating tasks, learning to code, or just making the web work better for you, this extension is your gateway to unlimited possibilities.

Ready to transform how you browse the web?

๐ŸŒŸ Star this project if you love what we're building!
๐Ÿ› Report issues to help us improve
๐Ÿ’ก Suggest features for our roadmap
๐Ÿค Contribute code and join our community

๐Ÿ“„ License

MIT License - Build amazing things with complete freedom!


๐Ÿ’ก Pro Tip: Start with simple scripts like removing ads or changing colors, then gradually build more complex automations. The only limit is your imagination!

๐Ÿš€ Ready to get started? Install the extension and join thousands of users who've already transformed their web experience!

About

Chrome extension to run custom JavaScript each time you visit a website, automatically on page load. A per-domain javascript injector: inject JS snippets per site, saved across restarts. Not a userscript manager - your own JS per site, in a built-in Ace editor. Manifest V3.

Topics

Resources

Stars

22 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages