@@ -68,7 +68,7 @@ Use the `options(opts: Partial<InjectCssOptions>)` method to merge or override o
6868
6969## API
7070
71- ### ` injectCss(options: InjectCssUnionOptions ): InjectCssContract `
71+ ### ` injectCss(options: InjectCssOptions ): InjectCssContract `
7272
7373Creates a new CSS injector instance. Detects the manifest version (V2 or V3) via ` @adnbn/browser ` and delegates to the appropriate implementation.
7474
@@ -82,12 +82,14 @@ Creates a new CSS injector instance. Detects the manifest version (V2 or V3) via
8282
8383The injector accepts the following options (passed to ` injectCss(options) ` and/or ` injector.options(opts) ` ):
8484
85- - ` tabId ` (number, required): Target browser tab ID.
86- - ` frameId ` (boolean | number | number[ ] , optional): Select frames to inject into. ` true ` for all frames; a number or array of numbers for specific frame IDs.
87- - ` matchAboutBlank ` (boolean, optional): (Manifest V2 only) Include ` about:blank ` and similar subframes. Defaults to ` true ` .
88- - ` runAt ` (` 'document_start' ` | ` 'document_end' ` | ` 'document_idle' ` , optional): (Manifest V2 only) Injection timing, matching Chrome's ` runAt ` in ` insertCSS ` .
89- - ` documentId ` (string | string[ ] , optional): (Manifest V3 only) Document IDs for scripting targets.
90- - ` origin ` (` 'author' ` | ` 'user' ` , optional): CSS origin matching Chrome's API (` cssOrigin ` in V2, ` origin ` in V3).
85+ | Option | Type | Description |
86+ | --------------- | ----------------------------------------------------- | -------------------------------------------------------------------------------------------- |
87+ | tabId | number | Required. Target browser tab ID. |
88+ | frameId | boolean \| number \| number[ ] | Optional. Select frames to inject into: ` true ` for all frames; number or array for specific. |
89+ | matchAboutBlank | boolean | Optional. (V2 only) Include ` about:blank ` and similar subframes. Defaults to ` true ` . |
90+ | runAt | 'document_start' \| 'document_end' \| 'document_idle' | Optional. (V2 only) Injection timing, matches Chrome's ` runAt ` in ` insertCSS ` . |
91+ | documentId | string \| string[ ] | Optional. (V3 only) Document IDs for scripting targets. |
92+ | origin | 'author' \| 'user' | Optional. CSS origin matching Chrome's API (` cssOrigin ` in V2, ` origin ` in V3). |
9193
9294## Examples
9395
@@ -112,9 +114,23 @@ await injector.file(["styles/reset.css", "styles/theme.css"]);
112114
113115## Development
114116
115- - Build: ` npm run build `
116- - Watch: ` npm run build:watch `
117- - Format: ` npm run format `
117+ ### Build
118+
119+ ``` bash
120+ npm run build
121+ ```
122+
123+ ### Watch
124+
125+ ``` bash
126+ npm run build:watch
127+ ```
128+
129+ ### Format
130+
131+ ``` bash
132+ npm run format
133+ ```
118134
119135## Contributing
120136
0 commit comments