TampermonkeyScripts
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

27 lines
833 B

const header = require('./tampermonkey.header')
const config = {
entry: './src/index.js'
}
module.exports.config = config
module.exports.header = header
module.exports.buildedHeader = () => {
const headerString = []
headerString.push('// ==UserScript==')
for (const headerKey in header) {
if (Array.isArray(header[headerKey])) {
if (header[headerKey].length > 0) headerString.push('//')
for (let p in header[headerKey]) {
headerString.push(
'// @' + headerKey.padEnd(13) + header[headerKey][p]
)
}
} else {
headerString.push('// @' + headerKey.padEnd(13) + header[headerKey])
}
}
headerString.push('// ==/UserScript==')
headerString.push('')
return headerString.join('\n')
}