mirror of
https://github.com/NohamR/Pocket-Bird.git
synced 2026-05-24 19:59:36 +00:00
Add userscript build step
This commit is contained in:
20
build.js
20
build.js
@@ -16,6 +16,21 @@ const spriteSheets = [
|
||||
path: "./sprites/decorations.png"
|
||||
}
|
||||
];
|
||||
const userScriptHeader =
|
||||
`// ==UserScript==
|
||||
// @name birb
|
||||
// @namespace https://idreesinc.com
|
||||
// @version 2025-01-09
|
||||
// @description birb
|
||||
// @author Idrees
|
||||
// @match *://*/*
|
||||
// @grant GM_setValue
|
||||
// @grant GM_getValue
|
||||
// @grant GM_deleteValue
|
||||
// ==/UserScript==
|
||||
|
||||
`;
|
||||
|
||||
|
||||
let birbJs = readFileSync('birb.js', 'utf8');
|
||||
|
||||
@@ -24,4 +39,7 @@ for (const spriteSheet of spriteSheets) {
|
||||
birbJs = birbJs.replaceAll(spriteSheet.key, `data:image/png;base64,${dataUri}`);
|
||||
}
|
||||
|
||||
writeFileSync('./dist/birb.js', birbJs);
|
||||
writeFileSync('./dist/birb.js', birbJs);
|
||||
|
||||
const userScript = userScriptHeader + birbJs;
|
||||
writeFileSync('./dist/birb-userscript.js', userScript);
|
||||
Reference in New Issue
Block a user