Open chrissimon-au opened 3 months ago
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"
]
}
]
}
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