Skip to content

Tenith01/safe-jump

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Safe Jump

Safely automates configured button clicks on supported sites, with safety controls and a minimal UI. Built as a Manifest V3 Chrome/Chromium extension.

Overview

  • Watches supported sites for configured buttons (e.g., Continue, Get Link).
  • Clicks only visible, clickable elements and adds a small random delay.
  • Smart auto‑scroll helps surface lazy‑loaded buttons when pages instruct you to scroll.
  • Blocks navigation to known bad domains via request interception.
  • Popup provides an enable/disable toggle and per‑tab click history.
  • Options page shows monitored sites, blocked domains, last action, and recent clicks.

Supported Sites (out of the box)

  • teknoasian.com
  • linegee.net
  • pahe.plus

You can add more sites in src/config/config.json, and you must also add their domains to manifest.json under content_scripts.matches for the content script to run.

Installation (Chrome / Edge)

  1. Download or clone this repository.
  2. Open chrome://extensions/ (or edge://extensions/).
  3. Enable Developer mode.
  4. Click Load unpacked and select the project folder.
  5. Pin the extension and open the popup to toggle automation on/off.
  6. Visit a supported site and watch the Activity log in the popup.

How It Works

  • Content Script (src/content/content.js)
    • Reads src/config/config.json (or built‑in defaults) and filters by current hostname.
    • Observes DOM mutations and scans for configured selectors; ensures elements are visible and clickable.
    • Applies a small random delay before clicking and reports status via chrome.runtime.sendMessage.
    • Smart auto‑scroll: when instructed by page text or when buttons are off‑screen, scrolls to bring them into view and avoids scrolling if human verification is detected (e.g., reCAPTCHA).
  • Background Service Worker (src/background/background.js)
    • Initializes default settings in chrome.storage.local (enabled flag, histories, blocked domains).
    • Blocks navigation/requests to blacklisted domains using webRequest and webNavigation.
    • Receives status updates from the content script and maintains global/per‑tab click history.
  • Popup (src/popup/popup.html, src/popup/popup.js)
    • Toggle Enabled state and view per‑tab Activity with timing deltas.
    • Shows a loader indicator when automation appears active on the current tab.
  • Options (src/options/options.html)
    • Displays monitored sites (from config.json), blocked domains (from storage), last action, and recent clicks.

Configuration

  • Edit src/config/config.json to define sites and target buttons:
{
  "sites": [
    {
      "match": "example.com",
      "buttons": [
        { "key": "continue", "selector": "a.btn.btn-primary", "textMatch": ["continue"] }
      ]
    }
  ]
}
  • Keys:
    • match: hostname to match (exact or subdomain, e.g., foo.example.com or any *.example.com).
    • buttons: list of button definitions.
      • selector: CSS selector for the target element.
      • textMatch (optional): array of substrings to match in the element’s text.

Note: Adding a site here is not sufficient by itself. Also add its domain to manifest.json → content_scripts[0].matches so the content script runs on that site.

Permissions (Manifest V3)

  • storage, tabs, activeTab
  • webRequest, webRequestBlocking, webNavigation
  • scripting
  • host_permissions: <all_urls> (behavior governed by the content script’s matches list)

Development

  • Make changes in src/… files, then open chrome://extensions/ and click Reload on the extension.
  • Use DevTools on target pages to inspect selectors and confirm button visibility/clickability.
  • The popup and options pages include a lightweight “preview mode” for local viewing when extension APIs are unavailable.

Extending to New Sites

  1. Add a site entry to src/config/config.json with the appropriate selectors.
  2. Add the domain pattern to manifest.json → content_scripts[0].matches.
  3. Reload the extension and test on the target site.

Troubleshooting

  • No clicks happen:
    • Verify the site domain is listed under manifest.json → content_scripts.matches.
    • Check that the Enabled toggle in the popup is on.
    • Confirm your selector matches a visible, clickable element.
    • If the page shows human verification (e.g., reCAPTCHA), auto‑scroll will stop.
  • Unexpected navigation blocked:
    • Review blockedDomains (initialized in the background script and stored in chrome.storage.local).
    • Temporarily disable the extension to confirm whether blocking is the cause.

Project Structure

/src
  background/background.js   # Service worker, defaults, blocking, histories
  content/content.js         # DOM observation, click logic, auto‑scroll, status
  config/config.json         # Configurable site/button selectors
  options/options.html       # Options UI (read‑only display)
  popup/popup.html           # Popup UI
  popup/popup.js             # Popup logic (toggle + activity)
manifest.json                # Manifest V3 configuration

Privacy

  • Data is stored locally via chrome.storage.local (e.g., histories, settings).
  • No network requests are made to third‑party services besides fetching config.json from the extension bundle and normal page activity.

Version

  • 1.0.0 (see manifest.json).

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published