diff --git a/src/shared/meta.ts b/src/shared/meta.ts index 7142f69..bfb5be0 100644 --- a/src/shared/meta.ts +++ b/src/shared/meta.ts @@ -74,6 +74,9 @@ export const META_FIELDS_STRING = [ "downloadURL", "supportURL", "unwrap", + // Only valid for Violent Monkey @see {@link https://violentmonkey.github.io/api/metadata-block/#inject-into} + "inject-into", + "injectInto" ] as const export const META_FIELDS = [ @@ -89,4 +92,5 @@ export const META_FIELD_ALIAS: { [K in keyof Meta]?: ConditionalKeys } = { runAt: "run-at", + injectInto: "inject-into", } diff --git a/tests/cases/basic/__snapshots__/basic.test.ts/build-1.txt b/tests/cases/basic/__snapshots__/basic.test.ts/build-1.txt index 683c7a8..495ed84 100644 --- a/tests/cases/basic/__snapshots__/basic.test.ts/build-1.txt +++ b/tests/cases/basic/__snapshots__/basic.test.ts/build-1.txt @@ -1,9 +1,10 @@ // ==UserScript== -// @name Hello world -// @grant GM_log -// @match *://*/* -// @version 1.0.0 -// @run-at document-end +// @name Hello world +// @grant GM_log +// @match *://*/* +// @version 1.0.0 +// @run-at document-end +// @inject-into content // ==/UserScript== ;(() => { diff --git a/tests/cases/basic/meta.js b/tests/cases/basic/meta.js index 5a04901..5ec0b4c 100644 --- a/tests/cases/basic/meta.js +++ b/tests/cases/basic/meta.js @@ -2,6 +2,6 @@ module.exports = { name: "Hello world", version: "1.0.0", match: ["*://*/*"], - 'run-at': "document-start", runAt: "document-end", + 'inject-into': "content" }