AI-Created Software

Last Updated: October 16, 2026

The following is AI-generated (aka vibe-coded) software. The software is specific to my needs and my system and may not work for you or your system. Support is limited, but if you report a bug I'll certainly look into it. All code is provided in a zip file for you to review should you choose.

History Automator

A Chrome extension (Manifest V3) that clears your browsing history on a repeating schedule and then re-adds a list of URLs you choose.

Everything runs locally. The extension makes no network requests, reads no page content, and has no host permissions.

Version: 2.5.4

What it does

Once started, a Chrome alarm fires every N minutes. On each run the extension:

  1. Deletes the entire browsing history.
  2. Adds each URL from your saved list back into history, timestamped at the moment of the run.

You can also clear history once, on demand, without scheduling anything, and have your settings backed up to a folder every few days.

Installation

The extension is unpacked-only; it isn’t on the Chrome Web Store.

  1. Clone or download this folder.
  2. Add an icons/ directory containing icon16.png, icon48.png, and icon128.png. The manifest references these and Chrome will warn on load if they’re missing.
  3. Open chrome://extensions.
  4. Turn on Developer mode (top right).
  5. Click Load unpacked and select the folder.

Click the toolbar icon or press Ctrl+Shift+H (Cmd+Shift+H on macOS) to open the options page.

Usage

Scheduling

Set Run every (minutes) (5 or more, since each run clears all history) and enter one URL per line in the text area. Blank lines and surrounding whitespace are ignored. Only http:// and https:// addresses can be written to history; anything else is skipped.

Save & Start writes the settings to storage and creates the alarm. The first run happens after one full interval has elapsed, not immediately.

Stop Automation cancels the alarm. Your interval and URL list stay saved.

The status line shows whether the alarm is active and when it next fires.

Manual clear

Clear History Now deletes all history immediately, after a confirmation prompt. It does not add any URLs back.

Backup & restore

Export Settings downloads every setting as JSON: the interval, URL list, whether automation is running, and the backup schedule. The filename is the current local date and time:

history-automator-settings-2026-09-06-150322.json

That is history-automator-settings-YYYY-MM-DD-HHMMSS.json, with the time as six unseparated digits.

Export captures what is currently in the form, not what was last saved, so it reflects edits you haven’t committed with Save & Start.

Import Settings reads a file back. It validates before applying anything and reports the specific problem if the file is malformed. On success it restores every setting in the file: it fills the form, saves to storage, restores the backup schedule, and starts or stops automation to match automationRunning. If the file would start automation that isn’t already running, it asks first; saying no imports everything else and leaves automation off. When it starts automation, or automation was already running, the alarm is recreated with the imported interval. Older files without automationRunning or backupSchedule leave those as they are.

File format

{
  "app": "history-automator",
  "formatVersion": 1,
  "exportedAt": "2026-09-06T15:03:22.481Z",
  "settings": {
    "interval": 60,
    "urlList": [
      "https://www.google.com",
      "https://www.youtube.com"
    ],
    "automationRunning": true,
    "backupSchedule": {
      "enabled": true,
      "everyDays": 3,
      "keep": 3,
      "folder": "History Automator Backups"
    }
  }
}

Import also accepts a bare { "interval": 60, "urlList": [...] } object, so a hand-written file works. interval must be a whole number of 1 or more; anything under 5 is raised to 5. urlList must be an array. automationRunning and backupSchedule are optional; in backupSchedule, missing or out-of-range values fall back to the defaults (every 7 days, keep 3) or the nearest allowed value.

Scheduled backup

The Scheduled Backup section saves the same file Export does, on its own, into a folder inside your downloads folder:

History Automator Backups/history-automator-backup-2026-09-06-143052.json
  • Back up settings automatically turns the schedule on. Turning it on makes the first backup straight away.
  • Backup folder is relative to the browser’s downloads folder. It defaults to History Automator Backups, can be several levels deep (Backups/History Automator), and is created if it doesn’t exist. Browsers only let extensions save inside the downloads folder, so a location elsewhere on disk isn’t possible.
  • Back up every (days) is how often to back up, from 1 to 365. The extension checks once an hour whether a backup is due, so if the browser was closed when one fell due, it’s made within the hour of the browser opening again.
  • Earlier backups to keep is how many backups to hold on to besides the latest one. With 3, you have the latest backup plus the three before it.
  • Back Up Now makes a backup immediately and applies the same cleanup.

Changes to these fields are saved as soon as you leave each one; they don’t need Save & Start.

Old backups are cleared only after a new one has finished saving. The count works in calendar days:

  • If an earlier day has several backups, only the newest from that day is kept, and it counts as one.
  • A day with no backups counts as nothing, so a gap of a week doesn’t use up the count.
  • Other backups from the same day as the latest are replaced by it.

So with a keep of 3, backups on Monday (two), Wednesday, Thursday, Friday and Saturday leave you with Saturday’s plus Friday’s, Thursday’s and Wednesday’s; both of Monday’s go.

A backup holds every setting: the saved interval and URL list, whether automation was running ("automationRunning"), and the backup schedule itself ("backupSchedule"). Restore one with Import Settings as usual; that restores all of it, including starting or stopping automation. Backups use what was last saved, not unsaved edits in the form, and are skipped while the saved URL list is empty, so an empty setup never pushes out a good backup.

Cleanup counts backups in every folder, so after you change the backup folder, the ones in the old folder still count and are removed in turn. It only touches files the extension saved itself that are still listed in the browser’s download history: clearing download history leaves those older backups on disk for good, and files you move or rename are never deleted. Each backup shows up in the browser’s download list like any other download.

Troubleshooting

Backups land in the downloads folder as download.json Another extension that renames downloads is overriding the backup’s name. The browser forgets the name an extension asks for whenever any extension renames downloads, so that extension has to put it back. Download Router does this; for others, turn them off or check their settings.

Limitations worth knowing

Deletion is total and irreversible.
chrome.history.deleteAll() wipes the entire history database, not a date range. There is no undo and no confirmation on scheduled runs. Anything you wanted to keep is gone.

History only. Cookies, cache, downloads, autofill data, site data, and open tabs are untouched. This is not a general privacy wipe.

Chrome Sync propagates deletions. If history sync is on, clearing here can remove history from your other signed-in devices too.

Google account activity is separate. History stored server-side under Web & App Activity lives at myactivity.google.com and is unaffected by this extension.

Timestamps cluster. Every seeded URL is recorded with a visit time of the moment the run executed, so they all share essentially the same timestamp.

Alarms need Chrome running. Nothing fires while the browser is closed. Chrome runs overdue alarms shortly after the next startup.

Titles may be missing. URLs added through chrome.history.addUrl() appear without page titles until the page is actually visited.

Permissions

Permission Why
history Delete history and add URLs back
alarms Schedule the repeating run, and check hourly whether a backup is due
storage Persist the interval, URL list and backup schedule
downloads Save scheduled backups and remove old ones

Manual export doesn’t use downloads. It builds a blob URL and clicks a generated anchor from the options page.

Files

manifest.json    Extension manifest (MV3)
background.js    Service worker: alarm listener, performAutomation(), scheduled backups
backup.js        Backup schedule and retention rules, shared by the worker and options page (pure + tested)
options.html     Options page, opened in a tab
popup.js         Options page logic
popup.css        Options page styles
icons/           Toolbar icons
test_backup.mjs  Tests for backup.js

popup.js and popup.css keep their names from an earlier version where the UI was a browser-action popup. They now drive the options page.

Implementation notes

The service worker is event-driven and unloads when idle. Chrome wakes it when the alarm fires, so performAutomation() reads the URL list from chrome.storage.local on every run rather than holding it in memory. This also means edits to the saved list take effect on the next run without restarting the alarm.

chrome.action.onClicked opens the options page because the manifest declares no default_popup. Adding one would suppress that event.

Scheduled backups run from the service worker, which has no URL.createObjectURL, so the file is written through a data: URL with chrome.downloads.download().
The backup’s path is passed to chrome.downloads.download() and repeated as a filename= parameter in the data: URL. Once any extension listens to chrome.downloads.onDeterminingFilename, the browser forgets the requested filename and only the most recently installed listener’s suggestion counts, even if it suggests nothing. So this extension doesn’t listen there itself (that would cancel out other extensions’ routing), and a routing extension such as Download Router can read the path from the URL and suggest it back.

manifest.json contains // comments.
Chrome’s manifest parser tolerates them, but strict JSON tooling will not.

Tests

backup.js has a test suite covering the schedule defaults, folder cleaning, when a backup is due, and retention. With Node 18+:

node test_backup.mjs
(1 votes, average: 5.00 out of 5)

Leave a Reply

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail.