Made the background black
This commit is contained in:
parent
5d58ed8175
commit
79fe7e0957
@ -14,9 +14,8 @@ export default async function handler(req, res) {
|
|||||||
|
|
||||||
const imagePath = cacheDir + path.sep + mapHash + "." + ext;
|
const imagePath = cacheDir + path.sep + mapHash + "." + ext;
|
||||||
const exists = fs.existsSync(imagePath);
|
const exists = fs.existsSync(imagePath);
|
||||||
console.log(`https://na.cdn.beatsaver.com/${mapHash}.${ext}`)
|
|
||||||
if (!exists) {
|
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();
|
let buffer = await data.buffer();
|
||||||
buffer = await sharp(buffer).resize(150, 150).toBuffer()
|
buffer = await sharp(buffer).resize(150, 150).toBuffer()
|
||||||
fs.writeFileSync(imagePath, buffer);
|
fs.writeFileSync(imagePath, buffer);
|
||||||
|
@ -7,6 +7,13 @@
|
|||||||
line-height: 0.3em;
|
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 {
|
.loading {
|
||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user