[AUTO-002] Remove dead content.js and unused Formatter.postToWebhook #2
Labels
No labels
forge-sync
priority:critical
priority:high
priority:low
priority:medium
status:blocked
status:done
status:skipped
status:todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
frank/discord-share-extension#2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Task ID: AUTO-002
Priority: P2
Status: TODO
Priority: P2
Status: TODO
Goal: Delete dead code identified in the 2026-07-10 code health pass.
Why it matters:
content.js'sCAPTURE_CONTEXTlistener is never sent by anything — background.js and popup.js both use inlinechrome.scripting.executeScriptinstead — yet content.js still gets injected into every page (matches: ["<all_urls>"]) for no purpose.Formatter.postToWebhook(formatter.js:50-65) is also defined but never called; background.js'shandleSendreimplements the same logic inline.Scope: Remove content.js and its manifest.json content_script registration if confirmed unused; either delete
Formatter.postToWebhookor refactorhandleSendto call it instead of duplicating fetch/response-check logic.Expected files or areas: content.js, manifest.json, formatter.js, background.js.
Acceptance criteria: No behavior change for any existing send flow (text selection, link, image); one fewer unnecessary content-script injection; no duplicated webhook-post logic.
Validation:
node --checkon touched files; manually exercise each send type in a loaded extension to confirm no regression.Risks or assumptions: Assumes content.js truly has no other consumer — re-grep for
CAPTURE_CONTEXTbefore deleting to be sure.Notes: None.
Synced from
.ai/AUTONOMOUS_PLAN.mdbyforge sync.Closed by
forge sync— task status changed to DONE.