jomarko commented on issue #151:
URL:
https://github.com/apache/incubator-kie-issues/issues/151#issuecomment-1885065409
The manifest files we have, contain similar snippets:
```
"content_scripts": [
{
"run_at": "document_idle",
"js": ["content_scripts/github.js"],
"matches": ["https://*.github.com/*"],
"all_frames": true
}
],
```
please notice especially `matches`. Its capabilities are documented
[here](https://developer.chrome.com/docs/extensions/develop/concepts/match-patterns).
what is kind of problematic, because if I undestand documentation properly,
we can not put there 'regex' like `"https://*.github.*.com/*"` to match for
example `https://github.ibm.com`
So options I see are:
### List of github instances as precondition
If the list of supported github instances would be somehow hardcoded (be
subjuct of some agreement), then we could have something like:
```
"content_scripts": [
{
"run_at": "document_idle",
"js": ["content_scripts/github.js"],
"matches": ["https://*.github.com/*",
"https://*.github.company.one.com/*", "https://*.github.company.two.com/*"],
"all_frames": true
}
],
```
But I tend to think it is very hardly achievable as we are in the opensource
software field, and basically anyone is our user. Am I right?
### Dynamic github instance name
So the manifest would look like:
```
"content_scripts": [
{
"run_at": "document_idle",
"js": ["content_scripts/github.js"],
"matches": [$GITHUB_INSTANCE_NAME],
"all_frames": true
}
],
```
where `$GITHUB_INSTANCE_NAME` is set by user, so during installing
chrome-extension into browser, or in some chrome-extension setting panel.
Maybe
https://developer.chrome.com/docs/extensions/reference/manifest#register-a-content-script

I think setting `$GITHUB_INSTANCE_NAME` during `build:dev/build:prod` phase
doesn't solve our problem.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]