Skip to content

Fix content script re-execution in the same chat - #2

Open
ribonuclecode wants to merge 1 commit into
paradox-solver:mainfrom
ribonuclecode:fix/1-content-script-reexecution
Open

Fix content script re-execution in the same chat#2
ribonuclecode wants to merge 1 commit into
paradox-solver:mainfrom
ribonuclecode:fix/1-content-script-reexecution

Conversation

@ribonuclecode

Copy link
Copy Markdown

Summary

Fixes the content script failing when executed more than once in the same chat.

TEMPLATE_HTML was declared outside the existing IIFE, causing a
redeclaration error when the script was executed again.

Changes

  • Move TEMPLATE_HTML inside the content script IIFE.
  • Keep the template scoped to each script execution.

Testing

  • Verified the content script works on the first execution.
  • Verified it can be executed repeatedly in the same chat.
  • Verified switching between chats does not introduce the redeclaration error.

Notes

I've tried to follow your commit conventions and keep the changes as minimal as possible, in line with the principles outlined in the README. If there's anything you'd like me to adjust, please let me know.

[ Fixes #1 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Content script fails on second execution because TEMPLATE_HTML is redeclared

1 participant