diff --git a/build.js b/build.js index 0d83103..fc437c6 100644 --- a/build.js +++ b/build.js @@ -158,8 +158,17 @@ archive.finalize(); // Build Obsidian plugin mkdirSync(OBSIDIAN_DIR, { recursive: true }); -// Copy birb.js to main.js -writeFileSync(OBSIDIAN_DIR + '/main.js', birbJs); +// Wrap birb.js with plugin boilerplate +const obsidianPlugin = ` +const { Plugin, Notice } = require('obsidian'); +module.exports = class MyPlugin extends Plugin { + onload() { + ${birbJs} + } +};` + +// Create main.js with plugin code +writeFileSync(OBSIDIAN_DIR + '/main.js', obsidianPlugin); // Copy manifest.json let obsidianManifest = readFileSync(OBSIDIAN_MANIFEST, 'utf8'); diff --git a/dist/birb.js b/dist/birb.js index ce2a95a..c85f4bf 100644 --- a/dist/birb.js +++ b/dist/birb.js @@ -1902,7 +1902,7 @@ insertModal(`${birdBirb()} Mode`, message); }), new Separator(), - new MenuItem("2025.11.3.40", () => { alert("Thank you for using Pocket Bird! You are on version: 2025.11.3.40"); }, false), + new MenuItem("2025.11.13.1", () => { alert("Thank you for using Pocket Bird! You are on version: 2025.11.13.1"); }, false), ]; const styleElement = document.createElement("style"); diff --git a/dist/extension.zip b/dist/extension.zip index c720120..91cc8fd 100644 Binary files a/dist/extension.zip and b/dist/extension.zip differ diff --git a/dist/extension/birb.js b/dist/extension/birb.js index ce2a95a..c85f4bf 100644 --- a/dist/extension/birb.js +++ b/dist/extension/birb.js @@ -1902,7 +1902,7 @@ insertModal(`${birdBirb()} Mode`, message); }), new Separator(), - new MenuItem("2025.11.3.40", () => { alert("Thank you for using Pocket Bird! You are on version: 2025.11.3.40"); }, false), + new MenuItem("2025.11.13.1", () => { alert("Thank you for using Pocket Bird! You are on version: 2025.11.13.1"); }, false), ]; const styleElement = document.createElement("style"); diff --git a/dist/extension/manifest.json b/dist/extension/manifest.json index 09eb809..36d3602 100644 --- a/dist/extension/manifest.json +++ b/dist/extension/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 3, "name": "Pocket Bird", "description": "It's a pet bird in your browser, what more could you want?", - "version": "2025.11.3.40", + "version": "2025.11.13.1", "homepage_url": "https://idreesinc.com", "icons": { "48": "images/icons/transparent/48x48x1.png", diff --git a/dist/obsidian/main.js b/dist/obsidian/main.js index ce2a95a..5e8eb3c 100644 --- a/dist/obsidian/main.js +++ b/dist/obsidian/main.js @@ -1,4 +1,8 @@ -(function () { + +const { Plugin, Notice } = require('obsidian'); +module.exports = class MyPlugin extends Plugin { + onload() { + (function () { 'use strict'; const Directions = { @@ -1902,7 +1906,7 @@ insertModal(`${birdBirb()} Mode`, message); }), new Separator(), - new MenuItem("2025.11.3.40", () => { alert("Thank you for using Pocket Bird! You are on version: 2025.11.3.40"); }, false), + new MenuItem("2025.11.13.1", () => { alert("Thank you for using Pocket Bird! You are on version: 2025.11.13.1"); }, false), ]; const styleElement = document.createElement("style"); @@ -2692,3 +2696,6 @@ }); })(); + + } +}; diff --git a/dist/obsidian/manifest.json b/dist/obsidian/manifest.json index 34e3d99..ef306db 100644 --- a/dist/obsidian/manifest.json +++ b/dist/obsidian/manifest.json @@ -1,7 +1,7 @@ { "id": "pocket-bird", "name": "Pocket Bird", - "version": "2025.11.3.40", + "version": "2025.11.13.1", "minAppVersion": "0.15.0", "description": "It's a pet bird in your Obsidian, what more could you want?", "author": "Idrees Hassan", diff --git a/dist/userscript/birb.user.js b/dist/userscript/birb.user.js index 785482f..a17a07a 100644 --- a/dist/userscript/birb.user.js +++ b/dist/userscript/birb.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name Pocket Bird // @namespace https://idreesinc.com -// @version 2025.11.3.40 +// @version 2025.11.13.1 // @description It's a bird that hops around your web browser, the future is here // @author Idrees // @downloadURL https://github.com/IdreesInc/Pocket-Bird/raw/refs/heads/main/dist/userscript/birb.user.js @@ -1916,7 +1916,7 @@ insertModal(`${birdBirb()} Mode`, message); }), new Separator(), - new MenuItem("2025.11.3.40", () => { alert("Thank you for using Pocket Bird! You are on version: 2025.11.3.40"); }, false), + new MenuItem("2025.11.13.1", () => { alert("Thank you for using Pocket Bird! You are on version: 2025.11.13.1"); }, false), ]; const styleElement = document.createElement("style");