Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Content scripts reloading #25

Merged
merged 11 commits into from
Jul 10, 2023
Merged

feat: Content scripts reloading #25

merged 11 commits into from
Jul 10, 2023

Conversation

aklinker1
Copy link
Collaborator

@aklinker1 aklinker1 commented Jul 4, 2023

Overview

This closes #4!

MV3: The background script can register and unregister content scripts, so we should do that as the code changes.

MV2: We can't dynamically register content scripts, but we can reload the pages as they change, and they should get the new content. Edit: reloading pages won't work with run_at, I need to actually register the content script, and those APIs are new in MV3. So we won't be able to reload a content script without reloading an entire extension.

Todo

  • MV3 reloading
  • MV3 initial registration
  • Reload extension for MV2
  • Unit tests

@aklinker1 aklinker1 self-assigned this Jul 4, 2023
@aklinker1 aklinker1 changed the title feat: Reload content scripts without reloading the entire extension feat: Content scripts reloading Jul 6, 2023
@aklinker1 aklinker1 merged commit 249aa5e into main Jul 10, 2023
1 check passed
@aklinker1 aklinker1 deleted the content-script-reloading branch July 10, 2023 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reload and manage content scripts from background
1 participant