Closed Gribbs closed 4 years ago
@Gribbs That's as expected because duplicated keys inside an object are not allowed in JavaScript (nothing about this plugin), only the last value of the duplicated keys is passed into the constructor.
Provide an array as the value instead since the value of a HeaderObject can be a string or an array of strings. (See HeaderObject)
{
version:
mode === "development" ? `[version]-build.[buildNo]` : `[version]`,
require: "https://greasemonkey.github.io/gm4-polyfill/gm4-polyfill.js",
grant: [
"GM.xmlHttpRequest",
"GM_xmlhttpRequest",
"none"
],
match: process.env.TAMPERMONKEY_MATCH_URL_VALUE,
description:
"adds a button to the page",
"run-at": "document-end"
},
pretty: true
}
Awesome! Thanks for the clarification and quick action
Feel free to reopen the issue or file a new one if there are any questions or bugs. Happy scripting!
Really useful plugin! I've noticed a bug when you need multiple @grant lines like this
The first 2 grant lines end up overridden by the last grant line resulting in a greasemonkey header like