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

Browser Extension #73

Open
chrissimon-au opened this issue Jul 28, 2024 · 1 comment
Open

Browser Extension #73

chrissimon-au opened this issue Jul 28, 2024 · 1 comment

Comments

@chrissimon-au
Copy link
Contributor

Is your feature request related to a problem? Please describe.
A browser extension that provides IDE-like Contextive support for any given webpage (hover/autocomplate for domain specific terminology).

Describe the solution you'd like
An extension in each of the major browsers (chrome/derivatives, firefox, edge, safari...)

Describe alternatives you've considered
App-specific addins/plugins/extensions.

Additional context
Links that may help:

https://github.com/davedawkins/sutil-template-chromex/tree/main
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Build_a_cross_browser_extension

@chrissimon-au
Copy link
Contributor Author

Open Questions

Configuration

After #54, when working with a file in the IDE, contextive will know which definitions apply by searching up the folder tree to find the nearest contextive.yml file which implicitly applies to all files in the subtree underneath it.

Even if all possible contextive.yml files are made available at a given URL, how will the browser extension know which context applies when working on a given page?

Proposal is to define a new configuration file which effectively maps URL globs/regexes and/or page content globs/regexs to contexts. This configuration file would be hosted at it's own URL, and configuring the browser extension is just a matter of pointing at this file. The file would look something like:

{
   "contexts": {
      "contextAName": "url to definitions file",
      "contextBName": "url to definitions file"
   },
   "pageMaps": [
      {
         "matches": {
            "url": "*",
            "title": "Context A",
            "content": "*"
         },
         "contexts": [
             "contextAName"
         ]
      },
      {
         "matches": {
            "url": "*",
            "title": "Context B",
            "content": "*"
         },
         "contexts": [
             "contextBName"
         ]
      }
   ]
}

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

No branches or pull requests

1 participant