Skip to content

Commit

Permalink
Merge branch 'master' into mute
Browse files Browse the repository at this point in the history
  • Loading branch information
marcustyphoon committed Sep 19, 2024
2 parents 05c4cff + 27c9254 commit f8e8b8e
Show file tree
Hide file tree
Showing 74 changed files with 1,166 additions and 1,628 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ jobs:

- name: Sign WebExtension
run: npx web-ext sign
continue-on-error: true
env:
WEB_EXT_API_KEY: ${{ secrets.WEB_EXT_API_KEY }}
WEB_EXT_API_SECRET: ${{ secrets.WEB_EXT_API_SECRET }}
WEB_EXT_APPROVAL_TIMEOUT: 0
WEB_EXT_CHANNEL: listed
chrome:
name: Chrome
runs-on: ubuntu-latest
Expand Down
14 changes: 10 additions & 4 deletions docs/Chapter 4.2 - Feature modules.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Feature modules

Each module is required to export at least two async functions.
Modules may export any of the following:

## `main()`
- Type: Async Function
- Required: Yes
- Required: No

The main function of the feature. Will be called whenever the user enables the feature, even if the tab(s) XKit is running in is/are not focused. Will also be called upon pageload if the script is enabled.

## `clean()`
- Type: Async Function
- Required: Yes
- Required: No

The cleanup function of the feature. Called whenever the user disables the feature, also regardless of tab focus.

Expand All @@ -24,4 +24,10 @@ The preference-handling code of the feature. Added as a `browser.storage.onChang
- Type: Boolean
- Required: No

Whether the feature has a stylesheet. If true, there should be a `.css` file of matching name in the same directory level. The stylesheet is automatically added and removed during the feature's lifecycle.
Whether the feature has a static stylesheet. If true, there should be a `.css` file of matching name in the same directory level. The stylesheet is automatically added and removed during the feature's lifecycle.

## `styleElement`
- Type: HTMLStyleElement
- Required: No

An HTML `<style>` element containing computed and/or dynamic styles, as created by the `buildStyle` utility function. The element is automatically added to the document root and removed during the feature's lifecycle.
Loading

0 comments on commit f8e8b8e

Please sign in to comment.