Skip to content

Merge multiple listeners into one #8

@timii

Description

@timii

Currently, we use multiple functions that call sendMessage just with different action. So make the code cleaner, the goal is to merge all the functions into one function that takes the following arguments:

  • action as a string to call different listeners
  • currentTab as a tab object to use the id of the currentTab in the sendMessage function
  • args as an object with additional information for the specific use case

Additionally, we can merge the listeners into one big listener with a switch case for the different actions, so only one listener per file should be needed. Possibly change single-time requests into a long-lived connections

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestotherIssue about some other functionality

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions