Skip to content

Commit 6ea502f

Browse files
committed
doc: reuse the word run in @run-at info
1 parent 07f10be commit 6ea502f

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

content/api/metadata-block.md

+5-7
Original file line numberDiff line numberDiff line change
@@ -133,25 +133,23 @@ Examples:
133133

134134
### @run-at
135135

136-
Decide when the script will execute.
137-
138-
Several values can be set for `@run-at`:
136+
Specifies **when** the script will run.
139137

140138
- `document-start`
141139

142-
The userscript executes as early as possible, `document.documentElement` is present, but may be without either `document.head` or `document.body` or both. Other scripts in the page may run earlier, see the note below.
140+
Run as early as possible, `document.documentElement` is present, but may be without either `document.head` or `document.body` or both. Other scripts in the page may run earlier, see the note below.
143141

144142
- `document-body` *(since v2.12.10)*
145143

146-
The userscript executes after `document.body` appears, possibly with some child elements inside, because detection is asynchronous (using a one-time MutationObserver).
144+
Run after `document.body` appears, possibly with some child elements inside, because detection is asynchronous (using a one-time MutationObserver).
147145

148146
- `document-end` <Label name="default" />
149147

150-
The userscript executes when `DOMContentLoaded` is fired synchronously. At this time, the basic HTML of the page is ready and other resources like images might still be on the way.
148+
Run when `DOMContentLoaded` is fired, synchronously. At this time, the basic HTML of the page is ready and other resources like images might still be on the way.
151149

152150
- `document-idle`
153151

154-
The userscript executes after `DOMContentLoaded` is fired asynchronously, i.e. after yielding to the previously scheduled callbacks or urgent tasks like rendering. Prefer this mode for scripts that take more than a couple of milliseconds to compile and run (you can see it in devtools performance profiler), so that they don't delay the moment the page becomes usable.
152+
Run after `DOMContentLoaded` is fired, asynchronously, i.e. after yielding to the previously scheduled callbacks or urgent tasks like rendering. Prefer this mode for scripts that take more than a couple of milliseconds to compile and run (you can see it in devtools performance profiler), so that they don't delay the moment the page becomes usable.
155153

156154
When using `document-start` in Violentmonkey ManifestV2 there's a limited method of ensuring the userscript runs before other scripts in the page:
157155

0 commit comments

Comments
 (0)