diff --git a/dist/birb.js b/dist/birb.js index 470d79a..006e304 100644 --- a/dist/birb.js +++ b/dist/birb.js @@ -1605,7 +1605,7 @@ insertModal(`${birdBirb()} Mode`, message); }), new Separator(), - new MenuItem("2025.10.26.537", () => { alert("Thank you for using Pocket Bird! You are on version: 2025.10.26.537"); }, false), + new MenuItem("2025.10.26.538", () => { alert("Thank you for using Pocket Bird! You are on version: 2025.10.26.538"); }, false), ]; const styleElement = document.createElement("style"); @@ -1759,6 +1759,12 @@ function init() { log("Sprite sheets loaded successfully, initializing bird..."); + if (window !== window.top) { + // Skip installation if within an iframe + log("In iframe, skipping Birb script initialization"); + return; + } + // Preload font const MONOCRAFT_SRC = "https://cdn.jsdelivr.net/gh/idreesinc/Monocraft@99b32ab40612ff2533a69d8f14bd8b3d9e604456/dist/Monocraft.otf"; const fontLink = document.createElement("link"); diff --git a/dist/birb.user.js b/dist/birb.user.js index d1c21f2..3c83971 100644 --- a/dist/birb.user.js +++ b/dist/birb.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name Pocket Bird // @namespace https://idreesinc.com -// @version 2025.10.26.537 +// @version 2025.10.26.538 // @description birb // @author Idrees // @downloadURL https://github.com/IdreesInc/Pocket-Bird/raw/refs/heads/main/dist/birb.user.js @@ -1619,7 +1619,7 @@ insertModal(`${birdBirb()} Mode`, message); }), new Separator(), - new MenuItem("2025.10.26.537", () => { alert("Thank you for using Pocket Bird! You are on version: 2025.10.26.537"); }, false), + new MenuItem("2025.10.26.538", () => { alert("Thank you for using Pocket Bird! You are on version: 2025.10.26.538"); }, false), ]; const styleElement = document.createElement("style"); @@ -1773,6 +1773,12 @@ function init() { log("Sprite sheets loaded successfully, initializing bird..."); + if (window !== window.top) { + // Skip installation if within an iframe + log("In iframe, skipping Birb script initialization"); + return; + } + // Preload font const MONOCRAFT_SRC = "https://cdn.jsdelivr.net/gh/idreesinc/Monocraft@99b32ab40612ff2533a69d8f14bd8b3d9e604456/dist/Monocraft.otf"; const fontLink = document.createElement("link"); diff --git a/manifest.json b/manifest.json index cc99bfc..a942156 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 3, "name": "Pocket Bird", "description": "It's a bird, in your browser. What more could you want?", - "version": "2025.10.26.537", + "version": "2025.10.26.538", "homepage_url": "https://idreesinc.com", "content_scripts": [ { diff --git a/src/application.js b/src/application.js index 76e541d..bdad04f 100644 --- a/src/application.js +++ b/src/application.js @@ -379,6 +379,12 @@ Promise.all([ function init() { log("Sprite sheets loaded successfully, initializing bird..."); + if (window !== window.top) { + // Skip installation if within an iframe + log("In iframe, skipping Birb script initialization"); + return; + } + // Preload font const MONOCRAFT_SRC = "https://cdn.jsdelivr.net/gh/idreesinc/Monocraft@99b32ab40612ff2533a69d8f14bd8b3d9e604456/dist/Monocraft.otf"; const fontLink = document.createElement("link");