2 Commits

Author SHA1 Message Date
Idrees Hassan
45e53d7697 Update manifest.json 2025-11-15 14:56:31 -05:00
Idrees Hassan
bc794c99d5 Update distributed code to fix review issues 2025-11-15 14:53:41 -05:00
20 changed files with 418 additions and 3377 deletions

12
.vscode/launch.json vendored
View File

@@ -1,12 +0,0 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceFolder}/dist/vscode"]
}
]
}

View File

@@ -37,11 +37,7 @@ It's a pet bird that hops around your computer, what more could you want?
### Obsidian ### Obsidian
1. Install the [Beta Plugin Manager (BRAT)](https://obsidian.md/plugins?id=obsidian42-brat) plugin for Obsidian _Coming soon!_
2. Enable the BRAT plugin and open its settings
3. In the BRAT settings, click "Add Beta Plugin" and enter the following URL: `https://github.com/IdreesInc/PB-Obsidian-Releases`
4. Select "Latest version" and click "Add Plugin"
5. Enjoy a pet bird in your Obsidian notes!
### Userscript ### Userscript

View File

@@ -15,14 +15,11 @@ const DIST_DIR = "./dist";
const BROWSER_MANIFEST = "./platform-specific/extension/manifest.json"; const BROWSER_MANIFEST = "./platform-specific/extension/manifest.json";
const OBSIDIAN_MANIFEST = "./platform-specific/obsidian/manifest.json"; const OBSIDIAN_MANIFEST = "./platform-specific/obsidian/manifest.json";
const USERSCRIPT_HEADER = "./platform-specific/userscript/header.txt"; const USERSCRIPT_HEADER = "./platform-specific/userscript/header.txt";
const VSCODE_PACKAGE = "./platform-specific/vscode/package.json";
const OBSIDIAN_WRAPPER = "./platform-specific/obsidian/wrapper.js"; const OBSIDIAN_WRAPPER = "./platform-specific/obsidian/wrapper.js";
const VSCODE_WRAPPER = "./platform-specific/vscode/extension.js";
const USERSCRIPT_DIR = DIST_DIR + "/userscript"; const USERSCRIPT_DIR = DIST_DIR + "/userscript";
const EXTENSION_DIR = DIST_DIR + "/extension"; const EXTENSION_DIR = DIST_DIR + "/extension";
const OBSIDIAN_DIR = DIST_DIR + "/obsidian"; const OBSIDIAN_DIR = DIST_DIR + "/obsidian";
const VSCODE_DIR = DIST_DIR + "/vscode";
const STYLESHEET_PATH = SRC_DIR + "/stylesheet.css"; const STYLESHEET_PATH = SRC_DIR + "/stylesheet.css";
const APPLICATION_ENTRY = SRC_DIR + "/application.js"; const APPLICATION_ENTRY = SRC_DIR + "/application.js";
@@ -70,8 +67,7 @@ if (buildCache.version && buildCache.version.startsWith(versionDate)) {
} }
} }
// const version = `${versionDate}.${buildNumber}`; const version = `${versionDate}.${buildNumber}`;
const version = `${versionDate}`; // Disable build number for now
// Update build cache // Update build cache
buildCache.version = version; buildCache.version = version;
@@ -186,21 +182,4 @@ let obsidianManifest = readFileSync(OBSIDIAN_MANIFEST, 'utf8');
obsidianManifest = obsidianManifest.replace(/"version":\s*".*"/, `"version": "${version}"`); obsidianManifest = obsidianManifest.replace(/"version":\s*".*"/, `"version": "${version}"`);
writeFileSync(OBSIDIAN_DIR + '/manifest.json', obsidianManifest); writeFileSync(OBSIDIAN_DIR + '/manifest.json', obsidianManifest);
// =============================================
// Build VSCode extension
// =============================================
mkdirSync(VSCODE_DIR, { recursive: true });
// Wrap birb.js with VSCode extension boilerplate
let vscodeExtension = readFileSync(VSCODE_WRAPPER, 'utf8').replace(VERSION_KEY, version).replace(CODE_KEY, birbJs);
// Create extension.js with extension code
writeFileSync(VSCODE_DIR + '/extension.js', vscodeExtension);
// Copy package.json
let vscodePackage = readFileSync(VSCODE_PACKAGE, 'utf8');
vscodePackage = vscodePackage.replace(VERSION_KEY, version);
writeFileSync(VSCODE_DIR + '/package.json', vscodePackage);
console.log(`Build complete: ${version}`); console.log(`Build complete: ${version}`);

4
dist/birb.js vendored
View File

@@ -6,7 +6,7 @@
RIGHT: 1, RIGHT: 1,
}; };
let debugMode = window.location.hostname === "127.0.0.1"; let debugMode = location.hostname === "127.0.0.1";
/** /**
* @returns {boolean} Whether debug mode is enabled * @returns {boolean} Whether debug mode is enabled
@@ -2046,7 +2046,7 @@
insertModal(`${birdBirb()} Mode`, message); insertModal(`${birdBirb()} Mode`, message);
}), }),
new Separator(), new Separator(),
new MenuItem("2025.11.15", () => { alert("Thank you for using Pocket Bird! You are on version: 2025.11.15"); }, false), new MenuItem("2025.11.14.205", () => { alert("Thank you for using Pocket Bird! You are on version: 2025.11.14.205"); }, false),
]; ];
const styleElement = document.createElement("style"); const styleElement = document.createElement("style");

BIN
dist/extension.zip vendored

Binary file not shown.

View File

@@ -6,7 +6,7 @@
RIGHT: 1, RIGHT: 1,
}; };
let debugMode = window.location.hostname === "127.0.0.1"; let debugMode = location.hostname === "127.0.0.1";
/** /**
* @returns {boolean} Whether debug mode is enabled * @returns {boolean} Whether debug mode is enabled
@@ -2046,7 +2046,7 @@
insertModal(`${birdBirb()} Mode`, message); insertModal(`${birdBirb()} Mode`, message);
}), }),
new Separator(), new Separator(),
new MenuItem("2025.11.15", () => { alert("Thank you for using Pocket Bird! You are on version: 2025.11.15"); }, false), new MenuItem("2025.11.14.205", () => { alert("Thank you for using Pocket Bird! You are on version: 2025.11.14.205"); }, false),
]; ];
const styleElement = document.createElement("style"); const styleElement = document.createElement("style");

View File

@@ -2,7 +2,7 @@
"manifest_version": 3, "manifest_version": 3,
"name": "Pocket Bird", "name": "Pocket Bird",
"description": "It's a pet bird in your browser, what more could you want?", "description": "It's a pet bird in your browser, what more could you want?",
"version": "2025.11.15", "version": "2025.11.14.205",
"homepage_url": "https://idreesinc.com", "homepage_url": "https://idreesinc.com",
"icons": { "icons": {
"48": "images/icons/transparent/48x48x1.png", "48": "images/icons/transparent/48x48x1.png",

450
dist/obsidian/main.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -1,9 +1,9 @@
{ {
"id": "pocket-bird", "id": "pocket-bird",
"name": "Pocket Bird", "name": "Pocket Bird",
"version": "2025.11.15", "version": "2025.11.14",
"minAppVersion": "0.15.0", "minAppVersion": "0.15.0",
"description": "Add a pet bird to fly around your notes and keep you company!", "description": "It's a pet bird in your Obsidian, what more could you want?",
"author": "Idrees Hassan", "author": "Idrees Hassan",
"authorUrl": "https://idreesinc.com", "authorUrl": "https://idreesinc.com",
"isDesktopOnly": false "isDesktopOnly": false

372
dist/obsidian/styles.css vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -1,7 +1,7 @@
// ==UserScript== // ==UserScript==
// @name Pocket Bird // @name Pocket Bird
// @namespace https://idreesinc.com // @namespace https://idreesinc.com
// @version 2025.11.15 // @version 2025.11.14.205
// @description It's a pet bird in your browser, what more could you want? // @description It's a pet bird in your browser, what more could you want?
// @author Idrees // @author Idrees
// @downloadURL https://github.com/IdreesInc/Pocket-Bird/raw/refs/heads/main/dist/userscript/birb.user.js // @downloadURL https://github.com/IdreesInc/Pocket-Bird/raw/refs/heads/main/dist/userscript/birb.user.js
@@ -20,7 +20,7 @@
RIGHT: 1, RIGHT: 1,
}; };
let debugMode = window.location.hostname === "127.0.0.1"; let debugMode = location.hostname === "127.0.0.1";
/** /**
* @returns {boolean} Whether debug mode is enabled * @returns {boolean} Whether debug mode is enabled
@@ -2060,7 +2060,7 @@
insertModal(`${birdBirb()} Mode`, message); insertModal(`${birdBirb()} Mode`, message);
}), }),
new Separator(), new Separator(),
new MenuItem("2025.11.15", () => { alert("Thank you for using Pocket Bird! You are on version: 2025.11.15"); }, false), new MenuItem("2025.11.14.205", () => { alert("Thank you for using Pocket Bird! You are on version: 2025.11.14.205"); }, false),
]; ];
const styleElement = document.createElement("style"); const styleElement = document.createElement("style");

2834
dist/vscode/extension.js vendored

File diff suppressed because it is too large Load Diff

View File

@@ -1,21 +0,0 @@
{
"name": "pocket-bird",
"version": "2025.11.15",
"engines": {
"vscode": "^1.32.0"
},
"activationEvents": [
"onStartupFinished"
],
"main": "extension.js",
"contributes": {
"commands": [
{
"command": "pocket-bird.helloWorld",
"title": "Hello World",
"category": "Example"
}
]
}
}

10
manifest.json Normal file
View File

@@ -0,0 +1,10 @@
{
"id": "pocket-bird",
"name": "Pocket Bird",
"version": "2025.11.14.205",
"minAppVersion": "0.15.0",
"description": "Add a pet bird to fly around your notes and keep you company!",
"author": "Idrees Hassan",
"authorUrl": "https://idreesinc.com",
"isDesktopOnly": false
}

View File

@@ -3,7 +3,7 @@
"name": "Pocket Bird", "name": "Pocket Bird",
"version": "__VERSION__", "version": "__VERSION__",
"minAppVersion": "0.15.0", "minAppVersion": "0.15.0",
"description": "Add a pet bird to fly around your notes and keep you company!", "description": "It's a pet bird in your Obsidian, what more could you want?",
"author": "Idrees Hassan", "author": "Idrees Hassan",
"authorUrl": "https://idreesinc.com", "authorUrl": "https://idreesinc.com",
"isDesktopOnly": false "isDesktopOnly": false

View File

@@ -1,16 +0,0 @@
// The module 'vscode' contains the VS Code extensibility API
const vscode = require("vscode");
module.exports = {
activate,
deactivate,
};
function activate(context) {
console.log("Loading Pocket Bird...");
__CODE__
console.log("Pocket Bird loaded!");
}
function deactivate() {}

View File

@@ -1,5 +0,0 @@
#!/bin/bash
# my-vscode
export NODE_OPTIONS="--require /Users/idrees/Documents/Programs/JavaScript/Birb/platform-specific/vscode/patch.js"
"/Applications/Visual Studio Code.app/Contents/MacOS/Electron" \
"$@"

View File

@@ -1,21 +0,0 @@
{
"name": "pocket-bird",
"version": "__VERSION__",
"engines": {
"vscode": "^1.32.0"
},
"activationEvents": [
"onStartupFinished"
],
"main": "extension.js",
"contributes": {
"commands": [
{
"command": "pocket-bird.helloWorld",
"title": "Hello World",
"category": "Example"
}
]
}
}

View File

@@ -1 +0,0 @@
console.log("Birb patch for VSCode loaded.");

View File

@@ -3,7 +3,7 @@ export const Directions = {
RIGHT: 1, RIGHT: 1,
}; };
let debugMode = window.location.hostname === "127.0.0.1"; let debugMode = location.hostname === "127.0.0.1";
/** /**
* @returns {boolean} Whether debug mode is enabled * @returns {boolean} Whether debug mode is enabled