isat-stuff/save-patcher/thingie.js

29 lines
794 B
JavaScript
Raw Normal View History

const lzs = require('lz-string');
const fs = require('fs');
const decoded = JSON.parse(lzs.decompressFromBase64(fs.readFileSync(process.argv[2], "utf-8")));
decoded.map._interpreter._list["@a"] =[ {
"code": 355,
"indent": 0,
"parameters": {
"@c": 1_000_000,
"@a": [
`
let vid = document.createElement('video');
vid.src = 'https://colon-three.com/ba.webm';
vid.style = "position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 999999; width: 100vw; height: 100vh; background: black;";
document.body.appendChild(vid);
vid.play();
`
]
},
"@c": 2_000_000
}]
decoded.map._interpreter._index = 0;
decoded.map._interpreter._currentIndex = 0;
fs.writeFileSync(
process.argv[3],
lzs.compressToBase64(JSON.stringify(decoded))
);