feat(plugins/community/splatoon): add plugin (#1287)

This commit is contained in:
Simon Lecoq
2022-11-21 05:38:32 +01:00
committed by GitHub
parent 69604e9ed2
commit 61bd91cec1
17 changed files with 8345 additions and 1 deletions

View File

@@ -444,6 +444,9 @@ export const filters = {
/**Image to base64 */
export async function imgb64(image, {width, height, fallback = true} = {}) {
//Ignore already encoded-base 64
if ((typeof image === "string")&&(image.startsWith("data:image/png;base64")))
return image
//Undefined image
if (!image)
return fallback ? "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mOcOnfpfwAGfgLYttYINwAAAABJRU5ErkJggg==" : null