Made the background black

This commit is contained in:
RealFascinated 2022-04-03 18:06:48 +01:00
parent 5d58ed8175
commit 79fe7e0957
2 changed files with 8 additions and 2 deletions

@ -14,9 +14,8 @@ export default async function handler(req, res) {
const imagePath = cacheDir + path.sep + mapHash + "." + ext;
const exists = fs.existsSync(imagePath);
console.log(`https://na.cdn.beatsaver.com/${mapHash}.${ext}`)
if (!exists) {
const data = await fetch(`https://na.cdn.beatsaver.com/${mapHash}.${ext}` );
const data = await fetch(`https://eu.cdn.beatsaver.com/${mapHash}.${ext}` );
let buffer = await data.buffer();
buffer = await sharp(buffer).resize(150, 150).toBuffer()
fs.writeFileSync(imagePath, buffer);

@ -7,6 +7,13 @@
line-height: 0.3em;
}
/* Needed to see the UI in the browser,
* when using OBS it overrides the background color anyway
*/
*, html, html * {
background-color: black;
}
.loading {
color: black;
}