Skip to content

Commit

Permalink
Merge branch 'master' into alt-text-warning
Browse files Browse the repository at this point in the history
  • Loading branch information
marcustyphoon committed Sep 14, 2024
2 parents e9cf62e + db19915 commit 8bc8573
Show file tree
Hide file tree
Showing 77 changed files with 1,246 additions and 1,644 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ jobs:
run: npm test --ignore-scripts

- name: Sign WebExtension
run: npx web-ext sign
continue-on-error: true
run: npx web-ext sign --approval-timeout=0
env:
WEB_EXT_API_KEY: ${{ secrets.WEB_EXT_API_KEY }}
WEB_EXT_API_SECRET: ${{ secrets.WEB_EXT_API_SECRET }}
WEB_EXT_ID: ${{ secrets.WEB_EXT_ID }}
WEB_EXT_API_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 8bc8573

Please sign in to comment.