Skip to content

Commit d3e5f9b

Browse files
committed
issue #64 - added release 10.0 documentation and mv3 updates
1 parent 21c1acc commit d3e5f9b

File tree

10 files changed

+77
-7
lines changed

10 files changed

+77
-7
lines changed

pages/documentation/actions/bg-inject.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,18 @@ weight: 3
55
edit: documentation/actions/bg-inject.md
66
---
77

8+
# bg-inject is deprecated since CBA version 10.0
9+
10+
Since [Manifest Version 3](https://developer.chrome.com/docs/extensions/develop/migrate/improve-security#remove-execution-of-strings) it's
11+
not allowed to evaluate script in the context of the extension, meaning CBA users can no more use `bg-inject` command. Previously `bg-inject` was used for injecting script into the background page of the extension where you can also access browser api and create very flexible and powerful Automation.
12+
Currently only extension hosted code can be executed in the context of the background page and the only way to do it is by using [bg-function](/bg-function) command. I am happy to accept commands you have used with `bg-inject` and add them to the `bg-function` command, so please let me know by
13+
[filing an issue](https://github.com/browser-automation/cba/issues) or feel free to creating a PR. Please let me know about your use-cases that you can
14+
no more support with the new MV3 compliance rules, I will try helping you there.
15+
16+
Learn more about [MV3 compliance changes](/mv3).
17+
18+
## bg-inject in CBA version 9.0 and less
19+
820
`bg-inject` provides ability of injecting script into backroung page of the
921
extension where you can also access browser api.
1022

pages/documentation/actions/inject-cs.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@ weight: 2
55
edit: documentation/actions/inject-cs.md
66
---
77

8+
# cs-inject is works similar to inject since CBA version 10.0
9+
10+
Since [Manifest Version 3](https://developer.chrome.com/docs/extensions/develop/migrate/improve-security#use-external-libraries) it's not allowed to evaluate user script in the context of the extension, meaning CBA users can no more use `cs-inject` command as they used to. Previously `cs-inject` was allowing users to inject script into the content script of the extension where it was following Extensions content security policy. Now `cs-inject` and `inject` functions are same, they both are loading scripts into the page Main context. This is another limitation introduced by the new [Manifest version 3](https://developer.chrome.com/docs/extensions/develop/migrate/what-is-mv3) rules for Browser extensions. This behavior may change after platforms implement [userScripts.execute()](https://github.com/w3c/webextensions/pull/540).
11+
12+
Learn more about [MV3 compliance changes](/mv3).
13+
14+
## cs-inject in CBA version 9.0 and less
15+
816
Inject is the Action that Injects javascript code into content script during
917
project workflow, also you can use Jquery. It uses javascript `eval()` function
1018
to inject your code. so here you can write your javascript code using functions
@@ -18,7 +26,9 @@ $("body").html("Hello World");
1826
```
1927
</div>
2028

21-
## async/await
29+
## ~~async/await~~
30+
31+
**Note:** Since CBA version 10.0, `async/await` is not supported in the `cs-inject`.
2232

2333
You can also use async/await in the `cs-inject` that way you can wait for an
2434
async function execution before proceeding with the next action.

pages/mv3.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
title: Manifest version 3
3+
edit: mv3.md
4+
---
5+
6+
Starting from [version 10](/new_10-0) CBA is now [MV3 compliant](https://developer.chrome.com/docs/extensions/develop/migrate/what-is-mv3), meaning you still able to use it with newer Chrome versions. But there are multiple limitations.
7+
8+
## Limitations
9+
10+
- Extensions are no more allowed to execute arbitrary code in the background page, which means that CBA can no more support [bg-inject](/bg-inject) command:
11+
- Background pages are no more persistence and from time to time the clipboard value may be lost, we will be fixing it with current [issue](https://github.com/browser-automation/cba/issues/119).
12+
- [cs-inject](/inject-cs) and [inject](/inject) functions now are same, they both are loading scripts into the page Main contextScript.
13+
14+
15+
### bg-inject
16+
17+
Since [Manifest Version 3](https://developer.chrome.com/docs/extensions/develop/migrate/improve-security#remove-execution-of-strings) it's
18+
not allowed to evaluate script in the context of the extension, meaning CBA users can no more use `bg-inject` command. Previously `bg-inject` was used for injecting script into the background page of the extension where you can also access browser api and create very flexible and powerful Automation.
19+
Currently only extension hosted code can be executed in the context of the background page and the only way to do it is by using [bg-function](/bg-function) command. I am happy to accept commands you have used with `bg-inject` and add them to the `bg-function` command, so please let me know by
20+
[filing an issue](https://github.com/browser-automation/cba/issues) or feel free to creating a PR. Please let me know about your use-cases that you can
21+
no more support with the new MV3 compliance rules, I will try helping you there.
22+
23+
### cs-inject
24+
25+
Since [Manifest Version 3](https://developer.chrome.com/docs/extensions/develop/migrate/improve-security#use-external-libraries) it's not allowed to evaluate user script in the context of the extension, meaning CBA users can no more use `cs-inject` command as they used to. Previously `cs-inject` was allowing users to inject script into the content script of the extension where it was following Extensions content security policy. Now `cs-inject` and `inject` functions are same, they both are loading scripts into the page Main context. This is another limitation introduced by the new [Manifest version 3](https://developer.chrome.com/docs/extensions/develop/migrate/what-is-mv3) rules for Browser extensions. This behavior may change after platforms implement [userScripts.execute()](https://github.com/w3c/webextensions/pull/540).

pages/releases/beta.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ new:
3838
- CBA has been open-sourced.
3939
- Website has been migrated from slow Drupal instance to blazing fast <a
4040
href="https://cmints.io/">CMintS</a> website.
41-
weight: 1
41+
weight: 10
4242
edit: releases/beta.md
4343
---
4444

pages/releases/varsion-9.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Version 9.0
33
permalink: new_9-0
4-
weight: 1
4+
weight: 2
55
edit: releases/varsion-9.md
66
---
77

pages/releases/version-10.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
title: Version 10.0(MV3)
3+
permalink: new_10-0
4+
weight: 1
5+
edit: releases/varsion-10.md
6+
---
7+
8+
Current release introduces multiple breaking changes, those changes was due to the
9+
[new compliance rules introduced by the Chrome Platform](https://developer.chrome.com/docs/extensions/develop/migrate/what-is-mv3). There are
10+
multiple limitations introduced by the MV3, which are described in the [MV3 documentation](/mv3). See [list of all changes here](https://github.com/browser-automation/cba/releases/tag/10.0.0):
11+
- CBA is now [MV3 compliant](https://developer.chrome.com/docs/extensions/develop/migrate/what-is-mv3), meaning you still able to use it with newer Chrome versions.
12+
- [bg-inject](/bg-inject) - command is deprecated, Chrome platform no more
13+
supports injecting user script into Background page.
14+
- If your automation highly relies on bg-inject, please let me know by [filing an issue](https://github.com/browser-automation/cba/issues), I will try add new
15+
[bg-function](/bg-function) command for those commands that suppose to be
16+
injected in the background. I am also happy to accept PRs for this.
17+
- [cs-inject](/inject-cs) and [inject](/inject) functions now are same, they
18+
both are loading scripts into the page Main contextScript. This is another
19+
limitation introduced by the new [Manifest version 3](https://developer.chrome.com/docs/extensions/develop/migrate/what-is-mv3)
20+
extensions.
21+
- Background pages are no more persistence and they will always be reloaded when
22+
you execute action, or open CBA popup. Which means the clipboard content might
23+
be lost on followup execution if that happens [unless current issue is fixed](https://github.com/browser-automation/cba/issues/119).

pages/releases/version-5.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Version 5.0
33
permalink: new_5
4-
weight: 5
4+
weight: 6
55
edit: releases/version-5.md
66
---
77

pages/releases/version-6.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Version 6.0
33
permalink: new_6
4-
weight: 4
4+
weight: 5
55
edit: releases/version-6.md
66
---
77

pages/releases/version-7.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Version 7.0
3-
weight: 3
3+
weight: 4
44
edit: releases/version-7.md
55
---
66

pages/releases/version-8.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Version 8.0
33
permalink: new_8
4-
weight: 2
4+
weight: 3
55
edit: releases/version-8.md
66
---
77

0 commit comments

Comments
 (0)