Fix manifest

This commit is contained in:
Idrees Hassan
2025-10-25 19:01:04 -04:00
parent f73e29a723
commit ff98390e10
4 changed files with 20 additions and 2 deletions

View File

@@ -443,6 +443,8 @@ function loadSpriteSheetPixels(dataUri, templateColors = true) {
});
}
log("Loading sprite sheets...");
// @ts-ignore
Promise.all([loadSpriteSheetPixels(SPRITE_SHEET), loadSpriteSheetPixels(DECORATIONS_SPRITE_SHEET, false), loadSpriteSheetPixels(FEATHER_SPRITE_SHEET)]).then(([birbPixels, decorationPixels, featherPixels]) => {
const SPRITE_SHEET = birbPixels;
@@ -924,8 +926,10 @@ Promise.all([loadSpriteSheetPixels(SPRITE_SHEET), loadSpriteSheetPixels(DECORATI
function init() {
if (window !== window.top) {
// Skip installation if within an iframe
log("In iframe, skipping Birb script initialization");
return;
}
log("Sprite sheets loaded successfully, initializing bird...");
// Preload font
const MONOCRAFT_SRC = "https://cdn.jsdelivr.net/gh/idreesinc/Monocraft@99b32ab40612ff2533a69d8f14bd8b3d9e604456/dist/Monocraft.otf";
@@ -1834,6 +1838,8 @@ Promise.all([loadSpriteSheetPixels(SPRITE_SHEET), loadSpriteSheetPixels(DECORATI
}
canvas.style.bottom = `${bottom}px`;
}
}).catch((e) => {
error("Error while loading sprite sheets: ", e);
});
/**

6
dist/birb.js vendored
View File

@@ -786,6 +786,8 @@ function loadSpriteSheetPixels(dataUri, templateColors = true) {
});
}
log("Loading sprite sheets...");
// @ts-ignore
Promise.all([loadSpriteSheetPixels(SPRITE_SHEET), loadSpriteSheetPixels(DECORATIONS_SPRITE_SHEET, false), loadSpriteSheetPixels(FEATHER_SPRITE_SHEET)]).then(([birbPixels, decorationPixels, featherPixels]) => {
const SPRITE_SHEET = birbPixels;
@@ -1267,8 +1269,10 @@ Promise.all([loadSpriteSheetPixels(SPRITE_SHEET), loadSpriteSheetPixels(DECORATI
function init() {
if (window !== window.top) {
// Skip installation if within an iframe
log("In iframe, skipping Birb script initialization");
return;
}
log("Sprite sheets loaded successfully, initializing bird...");
// Preload font
const MONOCRAFT_SRC = "https://cdn.jsdelivr.net/gh/idreesinc/Monocraft@99b32ab40612ff2533a69d8f14bd8b3d9e604456/dist/Monocraft.otf";
@@ -2177,6 +2181,8 @@ Promise.all([loadSpriteSheetPixels(SPRITE_SHEET), loadSpriteSheetPixels(DECORATI
}
canvas.style.bottom = `${bottom}px`;
}
}).catch((e) => {
error("Error while loading sprite sheets: ", e);
});
/**

6
dist/birb.user.js vendored
View File

@@ -800,6 +800,8 @@ function loadSpriteSheetPixels(dataUri, templateColors = true) {
});
}
log("Loading sprite sheets...");
// @ts-ignore
Promise.all([loadSpriteSheetPixels(SPRITE_SHEET), loadSpriteSheetPixels(DECORATIONS_SPRITE_SHEET, false), loadSpriteSheetPixels(FEATHER_SPRITE_SHEET)]).then(([birbPixels, decorationPixels, featherPixels]) => {
const SPRITE_SHEET = birbPixels;
@@ -1281,8 +1283,10 @@ Promise.all([loadSpriteSheetPixels(SPRITE_SHEET), loadSpriteSheetPixels(DECORATI
function init() {
if (window !== window.top) {
// Skip installation if within an iframe
log("In iframe, skipping Birb script initialization");
return;
}
log("Sprite sheets loaded successfully, initializing bird...");
// Preload font
const MONOCRAFT_SRC = "https://cdn.jsdelivr.net/gh/idreesinc/Monocraft@99b32ab40612ff2533a69d8f14bd8b3d9e604456/dist/Monocraft.otf";
@@ -2191,6 +2195,8 @@ Promise.all([loadSpriteSheetPixels(SPRITE_SHEET), loadSpriteSheetPixels(DECORATI
}
canvas.style.bottom = `${bottom}px`;
}
}).catch((e) => {
error("Error while loading sprite sheets: ", e);
});
/**

View File

@@ -1,13 +1,13 @@
{
"manifest_version": 3,
"name": "Browser Bird",
"name": "Pocket Bird",
"description": "It's a bird, in your browser. What more could you want?",
"version": "2025.9.16.1",
"homepage_url": "https://idreesinc.com",
"content_scripts": [
{
"matches": ["<all_urls>"],
"js": ["birb.js"]
"js": ["./dist/birb.js"]
}
],
"permissions": [