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

Generify background.js Phases 1,2: Use the manifest for non-tabular data #229

Open
eyalroz opened this issue Jul 29, 2024 · 0 comments
Open

Comments

@eyalroz
Copy link
Owner

eyalroz commented Jul 29, 2024

Let's try to make background.js a completely generic file, which relies on declarative specification, by the extension, of its contents, and loads it.

This will hinge on getting data from the package manifest, in manifest.json

This should have three phases:

  1. Make the manifest usable in background.js
  2. Use the manifest to obtain/generate non-tabular data, like the options dialog URI and the default pref file path
  3. Use the manifest to obtain/generate the tabular data passed to WindowsListener: The per-window overlay injectors, and the Chrome URLs for registration. That means the tables will go into the manifest.json, in some form or another - or alternative, will be generated from inspecting package files and directories.

Once this is done, we might take a crack at dropping the overlay injectors altogether and making that part declarative as well.

Anyway, this bug is about phases (1.) and (2.)

@eyalroz eyalroz added the task label Jul 29, 2024
@eyalroz eyalroz self-assigned this Jul 29, 2024
eyalroz added a commit that referenced this issue Jul 29, 2024
* `manifest.json` now contains a `short_name` property, which can be used for generating a default prefs file path and an options dialog URI
* `background.js` now utilizes the manifest to lookup the extension's short name, and to generate that default prefs path and dialog URI for registration
eyalroz added a commit that referenced this issue Jul 29, 2024
* `manifest.json` now contains a `short_name` property, which can be used for generating a default prefs file path and an options dialog URI
* `background.js` now utilizes the manifest to lookup the extension's short name, and to generate that default prefs path and dialog URI for registration
eyalroz added a commit that referenced this issue Jul 29, 2024
* `manifest.json` now contains a `short_name` property, which can be used for generating a default prefs file path and an options dialog URI
* `background.js` now utilizes the manifest to lookup the extension's short name, and to generate that default prefs path and dialog URI for registration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant