Skip to content

Commit 6839c2d

Browse files
committed
feat: Add userscript header's license
1 parent fd879b2 commit 6839c2d

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

plugins/userscript.plugin.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ interface UserScriptOptions {
2323
updateURL: string;
2424
downloadURL: string;
2525
supportURL: string;
26+
license: string;
2627
include: string[];
2728
match: string[];
2829
exclude: string[];
@@ -131,6 +132,10 @@ export function generateHeader() {
131132
if (userscript.supportURL) {
132133
headers.push(`// @supportURL ${userscript.supportURL}`);
133134
}
135+
// Add userscript header's license.
136+
if (userscript.license) {
137+
headers.push(`// @license ${userscript.license}`);
138+
}
134139
// Add userscript header's includes.
135140
if (userscript.include && userscript.include instanceof Array) {
136141
for (const include of userscript.include) {

0 commit comments

Comments
 (0)