https://github.com/sbolel/instagram-comment-activity-deleter
Private TypeScript browser automation for safely dry-running and deleting your own Instagram comment activity in controlled batches.
https://github.com/sbolel/instagram-comment-activity-deleter
browser-automation console-script dom-automation dry-run instagram instagram-comments personal-automation private-tool typescript userscript
Last synced: 1 day ago
JSON representation
Private TypeScript browser automation for safely dry-running and deleting your own Instagram comment activity in controlled batches.
- Host: GitHub
- URL: https://github.com/sbolel/instagram-comment-activity-deleter
- Owner: sbolel
- Created: 2026-05-11T05:33:27.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2026-05-31T08:56:07.000Z (28 days ago)
- Last Synced: 2026-05-31T10:15:43.985Z (28 days ago)
- Topics: browser-automation, console-script, dom-automation, dry-run, instagram, instagram-comments, personal-automation, private-tool, typescript, userscript
- Language: TypeScript
- Homepage: https://github.com/sbolel/instagram-comment-activity-deleter/releases/tag/v0.1.0
- Size: 106 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Security: SECURITY.md
- Roadmap: docs/roadmap.md
Awesome Lists containing this project
README
# Instagram Comment Activity Deleter
Private browser automation utility for deleting your own Instagram comment activity from the desktop web activity page.
This repository is the maintained version of the original gist at .
## What It Does
- Opens Instagram's comment activity page in selection mode.
- Selects comments in small batches.
- Clicks Instagram's delete and confirmation controls.
- Waits between actions to avoid rushing the UI.
- Stops when no more selectable comments are visible.
The script runs in your browser against the page you already have open. It does not use Instagram credentials, APIs, or external services.
## Safety Notes
This is destructive automation. Review the generated script before running it.
- It is intended only for deleting comments from your own Instagram account.
- Instagram can change its page markup at any time, which can break selectors.
- Start with `dryRun: true` and a small `maxBatches` value before deleting anything.
- Keep the browser window focused on the Instagram comments activity page while it runs.
## Quick Start
Verify the repo:
```sh
npm install
npm run check
```
Build the browser-ready script:
```sh
npm run build
```
The build creates:
- `dist/instagram-comment-activity-deleter.console.js`
- `dist/instagram-comment-activity-deleter.user.js`
- `apps/chrome-extension/dist/`
Open Instagram's comments activity page:
```text
https://www.instagram.com/your_activity/interactions/comments
```
Paste the generated console script from `dist/instagram-comment-activity-deleter.console.js` into the browser console.
## Chrome Extension
The repo includes a Manifest V3 extension workspace at `apps/chrome-extension`.
Build it:
```sh
npm run build:extension
```
Load the generated extension folder as an unpacked extension:
1. Open your Chromium-based browser's extensions page:
- Chrome: `chrome://extensions`
- Edge: `edge://extensions`
- Brave: `brave://extensions`
2. Enable Developer Mode.
3. Choose "Load unpacked".
4. Select the generated folder: `apps/chrome-extension/dist`.
5. Pin the extension from the browser toolbar if you want quick access.
After rebuilding, return to the extensions page and choose the extension's reload button so the browser picks up the new files.
The extension uses `scripting` plus host access for `https://www.instagram.com/*`, injects the content script after you open the popup, and enables itself only on:
```text
https://www.instagram.com/your_activity/interactions/comments
```
Dry run is enabled by default. To delete comments, turn off dry run and type `DELETE` in the confirmation field.
## Runtime Options
Edit the final invocation in the generated console script before running:
```js
await InstagramCommentActivityDeleter.run({
dryRun: true,
batchSize: 3,
maxBatches: 1,
})
```
Common options:
- `dryRun`: selects comments but skips the delete confirmation flow.
- `batchSize`: number of comments selected per batch.
- `maxBatches`: optional cap for testing a limited run.
- `actionDelayMs`: delay between major actions.
- `checkboxDelayMs`: delay between checkbox clicks.
- `selectButtonTimeoutMs`: timeout for waiting on Instagram's select button.
## Development
TypeScript source lives in `src/`.
- `src/deleter.ts`: testable DOM automation engine.
- `src/console-entry.ts`: browser global entrypoint for generated scripts.
- `apps/chrome-extension/`: Manifest V3 extension workspace.
- `scripts/build.mjs`: creates browser-ready files in `dist/`.
- `scripts/build-extension.mjs`: creates unpacked extension files in `apps/chrome-extension/dist/`.
- `scripts/transpile-typescript.mjs`: stable TypeScript compiler-based transform used by the build scripts.
- `test/`: Node test coverage using lightweight DOM fakes.
Run all checks:
```sh
npm run check
```
The generated browser scripts have no runtime dependencies. Development uses TypeScript for strict type checking.
## Releases
Releases are automated with Semantic Release on pushes to `main`. The repository uses Conventional Commits to calculate SemVer versions and create GitHub releases.
- `package.json` intentionally stays at `0.0.0-semantic-release`.
- Release tags use `v${version}`.
- Release assets include the console script, userscript, and unpacked Chrome extension files.
- PR titles and commit messages must follow Conventional Commits.