Skip to content

SlowSlicing/automatic-check-in

Repository files navigation

Automatic Check In

English · 简体中文

Manifest Built with WXT TypeScript Chrome Edge Firefox Safari

Automatic Check In is a cross-browser, one-click batch check-in extension. You configure a rule per site; the extension opens each rule in a temporary background tab, clicks the configured "check-in" button, and records success / failure / skipped status — all locally on your machine.

The UI ships in English and Simplified Chinese (driven by chrome.i18n, follows your browser UI language). All data stays in extension storage on your device — see PRIVACY.md / PRIVACY.zh-CN.md.

Supported browsers

  • Chrome
  • Edge
  • Firefox
  • Safari (macOS)

Features

  • Page check-in — opens the rule's URL in an inactive temporary tab, waits for the page to be ready, then clicks your configured CSS selector.
  • Optional login detection — if you configure a "logged-in" indicator selector, the extension reports "needs re-login" on timeout instead of clicking and accidentally triggering a login modal.
  • Optional already-checked detection — when the "already checked" indicator matches, the run is marked as success and the click is skipped.
  • Rule management — form-based editing, visual element picker, JSON import/export, and a quarantine area for malformed rules.
  • Auto check-in — optionally fires once per day at a configured HH:mm.
  • History & charts — yearly heatmap, daily trend, per-rule success rate, current streak, and failure-reason breakdown.

Permission model

  • No host permissions are declared by default.
  • When you create a rule for a site (or use the element picker), the extension calls chrome.permissions.request for that origin only (e.g. https://example.com/*).
  • The browser shows a confirmation dialog. Granted permissions are persistent and can be revoked from the browser's extension management page at any time.
  • The extension installs no persistent content script. It uses chrome.scripting to inject a one-shot script only at the moment a rule runs.

Requirements

  • Node.js
  • pnpm
  • Safari macOS support requires Xcode command-line tools to convert the build into a Safari Web Extension.

Install dependencies:

pnpm install

Development

Start the default browser dev mode:

pnpm dev

Start Firefox dev mode:

pnpm dev:firefox

Prepare WXT type definitions:

pnpm wxt prepare

Run tests:

pnpm test

Build

Chrome:

pnpm build:chrome

Edge:

pnpm build:edge

Firefox:

pnpm build:firefox

Safari (macOS):

pnpm build:safari

Produce store-ready zip bundles:

pnpm zip            # all four targets
pnpm zip:chrome
pnpm zip:edge
pnpm zip:firefox
pnpm zip:safari

Build artifacts land in .output/:

  • .output/chrome-mv3
  • .output/edge-mv3
  • .output/firefox-mv2
  • .output/safari-mv2

Safari additionally needs the Xcode tool:

xcrun safari-web-extension-converter .output/safari-mv2

Loading the unpacked build locally

Chrome

  1. Run pnpm build:chrome.
  2. Open chrome://extensions.
  3. Enable Developer mode.
  4. Click Load unpacked.
  5. Select .output/chrome-mv3.

Edge

  1. Run pnpm build:edge.
  2. Open edge://extensions.
  3. Enable Developer mode.
  4. Click Load unpacked.
  5. Select .output/edge-mv3.

Firefox

  1. Run pnpm build:firefox.
  2. Open about:debugging#/runtime/this-firefox.
  3. Click Load Temporary Add-on.
  4. Select manifest.json inside .output/firefox-mv2.

Safari (macOS)

  1. Run pnpm build:safari.
  2. Run xcrun safari-web-extension-converter .output/safari-mv2.
  3. Open the generated project in Xcode.
  4. Build, sign, and enable the extension following the standard Safari Web Extension flow.

Surfaces

  • Popup — clicking the toolbar icon shows the "N/M signed in today" summary and a Run all button. Already-successful rules for today are skipped.
  • Options — the left-hand menu has three sections:
    • Rules — list with enable/disable switch, today's status chip, view / edit / delete buttons, and JSON import/export.
    • History — yearly heatmap, daily trend, per-rule success rate, current streak, and failure-reason breakdown (ECharts is loaded on demand).
    • Settings — timezone, history retention, concurrency and timeout, permission diagnostics, and the privacy notice.

The "today" bucket is derived from your configured timezone whenever the popup or rules page opens, so it stays in sync without a wall-clock job.

Debugging

Open the background service worker DevTools

Chrome / Edge:

  1. Visit chrome://extensions/ (Edge: edge://extensions/).
  2. Enable Developer mode.
  3. Find the Automatic Check In card and click the service worker link next to Inspect views.
  4. Switch to the Console tab in the DevTools window that opens.

The service worker is killed by the browser after ~30 seconds idle and DevTools will mark it (inactive). Any event (message, alarm, storage change) wakes it again. To keep logs across SW restarts: DevTools gear → Preferences → Console → enable Preserve log.

Useful diagnostic snippets

Paste into the background service worker Console:

// List registered alarms (the auto check-in alarm is named "auto-checkin")
await chrome.alarms.getAll();

// Read / clear the "auto-ran today" marker. While present, today's alarm
// is suppressed by tryRunAuto.
await chrome.storage.local.get("auto-checkin-state");
await chrome.storage.local.remove("auto-checkin-state");

// Inspect user settings (timezone, retention, autoCheckin config, …)
await chrome.storage.local.get("settings");

// Inspect rules and the malformed-rule quarantine
await chrome.storage.local.get("rules");
await chrome.storage.local.get("rules.invalid");

// Inspect history
await chrome.storage.local.get("history");

// Force-trigger an auto run right now (bypassing "already ran today")
await chrome.storage.local.remove("auto-checkin-state");
await chrome.runtime.sendMessage({ type: "RUN_ALL" });

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors