Home (All Topics) → Technology → Software → AI-Created Software
Download Router files downloads into subfolders automatically, based on the site they come from and what kind of file they are. Set a rule like huggingface.co → Models or .pdf → Documents, and matching downloads land in that folder instead of the general pile. It works in Vivaldi, Chrome, Edge, Brave and other Chromium browsers.

vivaldi://extensions (or chrome://extensions) and turn on Developer mode.After changing background.js or rules.js, press the reload arrow on the extension’s card. Changes to the interface take effect the next time you open it.
Click the toolbar icon for the popup, or open the full page: right-click the icon and choose Options, or press Open full page at the bottom of the popup. Both are the same interface. The full page shows all 50 activity entries instead of the latest six, and a file dialog can’t close it.
huggingface.co), file types (pdf, zip, tar.gz), or both, then a destination folder, and click Add Rule. The folder is inside your browser’s download folder and is created on first use.report.pdf is saved as report (1).pdf. On, it overwrites the existing file with no prompt, and the old file doesn’t go to the trash. Programs and scripts (.exe, .msi, .dmg, .pkg, .sh, .bat, .ps1, .js, .lnk and the like) and files with no extension are never replaced, even with the box ticked, so no site can swap out an installer you already have.
Enabled rules are tested in list order, and the first match wins. A rule with a domain only catches everything from that site. A rule with file types only shows as Any source and catches those types from anywhere. A rule with both needs both: github.com + zip routes only GitHub’s zips. Downloads that match nothing are left alone.
The domain is compared with the host the file actually comes from, after redirects, ignoring case. A rule for github.com matches github.com and its subdomains, but not evil.net/github.com/setup.exe or github.com.evil.net, so another site can’t drop a file into a folder you set aside for a site you trust. As a result:
hub.co does not match github.com.https://, *. or a port is ignored. A path, as in github.com/someorg, narrows the rule to addresses whose path starts with it.data: download, which has no host of its own and is matched by the page it came from.githubusercontent.com.File types are matched against the end of the file name, so tar.gz works. Dots and case don’t matter: PDF, .pdf and pdf are the same. A file named just pdf, with no extension, doesn’t match.
Folders can be nested (AI/Models). Before use, backslashes become forward slashes, : * ? " < > | are removed, .. is removed so a rule can’t leave the download folder, and stray slashes are trimmed. If nothing is left, the download is saved normally.
The list records the last 50 downloads, plus up to 50 older ones that replaced a file (so a burst of downloads can’t push those out), with the file, the site it came from, where it was saved and which rule matched, or No rule matched. Only the site’s host name is stored, never the full address. Record switches logging off (existing entries stay until you clear them) and Clear empties the list. The log is never exported or backed up.
Export saves every rule and setting to download-router-settings-<date>-<time>.json.
Import shows what a file holds (how many rules, how many replace files, how many overlap with yours) before writing anything; a rule that replaces files from any site is the one to look out for in a file from someone else. Then choose Merge (a rule with the same domain and file types replaces yours in place; the rest are added), Replace all, or Cancel. Import also takes exports from earlier versions, a bare {"rules": ...} object, or a hand-written {"domain": "Folder"} map. Entries with no folder, or with neither a domain nor a file type, are skipped and counted in the summary.
Scheduled backup. Turn on Back up rules automatically and the same file is saved every N days (1 to 365) to Download Router Backups/download-router-backup-<date>-<time>.json, or another folder inside Downloads. The extension checks hourly, so a backup missed while the browser was closed is made within an hour of opening it. Turning the schedule on backs up at once, and Back up now does too. Only the newest backup from each earlier day is kept, for as many days as the Keep setting allows; days with no backup don’t count, and cleanup runs only after a new backup has saved. Cleanup only deletes files the extension saved that are still in the browser’s download history. Nothing is backed up while there are no rules, so an empty setup never pushes out a good backup.
Restore puts back everything a backup or export file holds: the whole rule set, the backup schedule and the Record switch. It shows when the file was saved and what would change, including rules that replace files and a moved backup folder, before you confirm. Settings the file doesn’t have are left as they are, and the activity log isn’t touched. A restored file is checked the same way as the rule form, so a crafted file can’t store anything the form wouldn’t.
Rules live in chrome.storage.local, per profile and never synced, so Export is how you move a setup to another machine or browser. Rules stored by 2.x versions (an object keyed by domain) are converted to the current list the first time they’re read, and old export files still import.
SUITE_BACKUP_PREFIXES in rules.js), and only for those.
| File | Purpose |
|---|---|
manifest.json |
Manifest V3, module service worker |
background.js |
Service worker: routes each download as it starts, records it, honors the suite’s backup paths, runs scheduled backups |
rules.js |
Rule shape, migration, matching, folder cleanup, log, export, import and restore. A plain script on self.DownloadRouter, loaded by the worker with import and by the pages with <script> (tested in Node) |
ui.js, ui.css |
The interface, shared by both pages: rule editor, export and import, backup schedule, restore, activity log |
popup.html, options.html |
Toolbar popup and full-page shells |
shared/backup.js |
Shared backup helpers and scheduler, on globalThis.SharedBackup. Do not edit here |
shared/sender.js |
Shared message-sender and host checks. Do not edit here |
shared/suite.js |
Link to the Plugin Suite Backup Manager, on globalThis.SuiteLink. Do not edit here |
shared/brand.js |
The “Made by infolific.com” footer on this plugin’s pages (logo, plugin page and hub links). Do not edit here |
shared/infolific.png, shared/infolific-24.png |
The infolific.com logo, for the footer and (24px) the top of this README |
test_rules.mjs |
Node tests: node test_rules.mjs |
icons/ |
Toolbar and extensions-page icons, and icon.svg, their source (the PNGs add the infolific.com badge from tools/brand/badge-icons.py) |
screenshot.png |
The screenshot above |
| Permission | Why |
|---|---|
downloads |
Seeing each download and choosing its folder; saving scheduled backups and removing old ones |
storage |
Rules, settings and the activity log |
alarms |
Hourly check for whether a scheduled backup is due |
No access to websites is requested: the downloads API already reports where each file comes from. The extension makes no network requests and sends nothing anywhere.
mayReplace), and log entries for replaced files are kept longer (trimLog) so a burst of downloads can’t hide them.sanitizeFolder) so no rule or backup folder can leave the download folder.isSuiteBackupPath).shared/sender.js: only the popup and options page can ask for a backup.textContent. innerHTML is used only for the page’s fixed template and to empty lists.shared/suite.js) answers only the manager’s fixed extension id. It can report the backup schedule and last backup, start a backup, and open the restore page with a backup file. It never writes settings itself, so a file it hands over goes through the same checks and confirmation as one picked on that page.
node test_rules.mjs
2.7.0 — infolific.com branding: a “Made by infolific.com” footer on the options and popup pages, linking to this plugin’s page and the infolific.com hub for AI-created software (shared/brand.js); a small infolific.com badge on the icons; and the manifest’s homepage_url points to the plugin’s page, so the extensions page shows a Website link.
2.6.0 — Works with the new Plugin Suite Backup Manager, which shows this plugin’s backup schedule and last backup, can start a backup, and can hand a backup file to the restore page here.
Only the manager’s extension id is answered (shared/suite.js).
2.5.9 — Knows Cache Clearer’s scheduled backups (cache-clearer-backup-), so they keep their folder.
2.5.8 — Follows the plugin template: the worker checks message senders with shared/sender.js, the manifest sets minimum_chrome_version, and the README uses the template’s sections, with a screenshot.
2.5.7 — The service worker is an ES module, loading its helpers with import instead of importScripts(). Alarms, settings and backups carry over.
2.5.6 — Scheduled backups run on the suite’s shared backup code (shared/backup.js). Backup files, and restoring old ones, are unchanged.
3.4 — Security: domain rules match where the file comes from after redirects, not the page that linked to it. Programs and scripts are never replaced. Import and Restore point out rules that replace files. Entries for replaced files stay in the log longer.
3.3 — Security: domain rules match the site’s host name, not text anywhere in the URL. Access to all websites removed. Only the suite’s backup file names are honored for other extensions. Backup requests are only taken from the extension’s own pages.
3.2 — Restore: bring back every setting from a backup file, separate from Import.
3.1 — Scheduled backup every N days into a chosen folder, keeping a set number of earlier backups, counted one per day.
3.0 — File-type matching, per-rule on/off, activity log, full-page view. Rules are stored as an ordered list; older storage is converted on read.
2.7 — Icons moved into an icons folder.
2.6 — Custom icon at all four sizes, shown in the popup header.
2.5 — Export and Import moved to a sticky top bar; paste-JSON option removed.
2.4 — Export file name time as six digits (143052).
2.3 — Time added to the export file name.
2.2 — Export and import of all settings.
2.1 — Per-rule option to replace same-name files.
2.0 — Rule editing.

