Build into separate folders
@@ -4,5 +4,5 @@ This project is still being worked on, but if you wish to help me beta test it,
|
|||||||
|
|
||||||
1. Install [Tampermonkey](https://www.tampermonkey.net/) on your web browser
|
1. Install [Tampermonkey](https://www.tampermonkey.net/) on your web browser
|
||||||
2. Enable the Tampermonkey extension and give it the permissions requested
|
2. Enable the Tampermonkey extension and give it the permissions requested
|
||||||
3. Install my Pocket Bird script by going to this link and clicking install: [https://github.com/IdreesInc/Pocket-Bird/raw/refs/heads/main/dist/birb.user.js](https://github.com/IdreesInc/Pocket-Bird/raw/refs/heads/main/dist/birb.user.js)
|
3. Install my Pocket Bird script by going to this link and clicking install: [https://github.com/IdreesInc/Pocket-Bird/raw/refs/heads/main/dist/userscript/birb.user.js](https://github.com/IdreesInc/Pocket-Bird/raw/refs/heads/main/dist/userscript/birb.user.js)
|
||||||
4. Now any websites you visit will have a little bird hopping around!
|
4. Now any websites you visit will have a little bird hopping around!
|
||||||
28
build.js
@@ -1,7 +1,7 @@
|
|||||||
// @ts-check
|
// @ts-check
|
||||||
|
|
||||||
import { rollup } from 'rollup';
|
import { rollup } from 'rollup';
|
||||||
import { readFileSync, writeFileSync, mkdirSync, unlinkSync } from 'fs';
|
import { readFileSync, writeFileSync, mkdirSync, unlinkSync, cpSync } from 'fs';
|
||||||
|
|
||||||
const spriteSheets = [
|
const spriteSheets = [
|
||||||
{
|
{
|
||||||
@@ -56,8 +56,8 @@ const userScriptHeader =
|
|||||||
// @version ${version}
|
// @version ${version}
|
||||||
// @description birb
|
// @description birb
|
||||||
// @author Idrees
|
// @author Idrees
|
||||||
// @downloadURL https://github.com/IdreesInc/Pocket-Bird/raw/refs/heads/main/dist/birb.user.js
|
// @downloadURL https://github.com/IdreesInc/Pocket-Bird/raw/refs/heads/main/dist/userscript/birb.user.js
|
||||||
// @updateURL https://github.com/IdreesInc/Pocket-Bird/raw/refs/heads/main/dist/birb.user.js
|
// @updateURL https://github.com/IdreesInc/Pocket-Bird/raw/refs/heads/main/dist/userscript/birb.user.js
|
||||||
// @match *://*/*
|
// @match *://*/*
|
||||||
// @grant GM_setValue
|
// @grant GM_setValue
|
||||||
// @grant GM_getValue
|
// @grant GM_getValue
|
||||||
@@ -80,6 +80,9 @@ await bundle.close();
|
|||||||
|
|
||||||
let birbJs = readFileSync('dist/birb.bundled.js', 'utf8');
|
let birbJs = readFileSync('dist/birb.bundled.js', 'utf8');
|
||||||
|
|
||||||
|
// Delete bundled file
|
||||||
|
unlinkSync('./dist/birb.bundled.js');
|
||||||
|
|
||||||
// Replace version placeholder
|
// Replace version placeholder
|
||||||
birbJs = birbJs.replaceAll('__VERSION__', version);
|
birbJs = birbJs.replaceAll('__VERSION__', version);
|
||||||
|
|
||||||
@@ -96,9 +99,20 @@ birbJs = birbJs.replace(STYLESHEET_KEY, stylesheetContent);
|
|||||||
// Build standard javascript file
|
// Build standard javascript file
|
||||||
writeFileSync('./dist/birb.js', birbJs);
|
writeFileSync('./dist/birb.js', birbJs);
|
||||||
|
|
||||||
// Delete bundled file
|
|
||||||
unlinkSync('./dist/birb.bundled.js');
|
|
||||||
|
|
||||||
// Build user script
|
// Build user script
|
||||||
|
mkdirSync('./dist/userscript', { recursive: true });
|
||||||
const userScript = userScriptHeader + birbJs;
|
const userScript = userScriptHeader + birbJs;
|
||||||
writeFileSync('./dist/birb.user.js', userScript);
|
writeFileSync('./dist/userscript/birb.user.js', userScript);
|
||||||
|
|
||||||
|
// Build browser extension
|
||||||
|
mkdirSync('./dist/extension', { recursive: true });
|
||||||
|
// Copy birb.js
|
||||||
|
writeFileSync('./dist/extension/birb.js', birbJs);
|
||||||
|
// Copy manifest.json
|
||||||
|
const manifestContent = readFileSync('./manifest.json', 'utf8');
|
||||||
|
writeFileSync('./dist/extension/manifest.json', manifestContent);
|
||||||
|
// Copy icons folder
|
||||||
|
mkdirSync('./dist/extension/images/icons', { recursive: true });
|
||||||
|
cpSync('./images/icons/transparent', './dist/extension/images/icons/transparent', { recursive: true });
|
||||||
|
|
||||||
|
console.log(`Build completed: version ${version}`);
|
||||||
2
dist/birb.js
vendored
@@ -1867,7 +1867,7 @@
|
|||||||
insertModal(`${birdBirb()} Mode`, message);
|
insertModal(`${birdBirb()} Mode`, message);
|
||||||
}),
|
}),
|
||||||
new Separator(),
|
new Separator(),
|
||||||
new MenuItem("2025.11.2.44", () => { alert("Thank you for using Pocket Bird! You are on version: 2025.11.2.44"); }, false),
|
new MenuItem("2025.11.2.60", () => { alert("Thank you for using Pocket Bird! You are on version: 2025.11.2.60"); }, false),
|
||||||
];
|
];
|
||||||
|
|
||||||
const styleElement = document.createElement("style");
|
const styleElement = document.createElement("style");
|
||||||
|
|||||||
2659
dist/extension/birb.js
vendored
Normal file
BIN
dist/extension/images/icons/transparent/1024x1024x1.png
vendored
Normal file
|
After Width: | Height: | Size: 6.8 KiB |
BIN
dist/extension/images/icons/transparent/1024x768x1.png
vendored
Normal file
|
After Width: | Height: | Size: 5.4 KiB |
BIN
dist/extension/images/icons/transparent/128x128x1.png
vendored
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
dist/extension/images/icons/transparent/128x128x2.png
vendored
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
dist/extension/images/icons/transparent/16x16x1.png
vendored
Normal file
|
After Width: | Height: | Size: 635 B |
BIN
dist/extension/images/icons/transparent/16x16x2.png
vendored
Normal file
|
After Width: | Height: | Size: 829 B |
BIN
dist/extension/images/icons/transparent/256x256x1.png
vendored
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
dist/extension/images/icons/transparent/256x256x2.png
vendored
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
dist/extension/images/icons/transparent/27x20x2.png
vendored
Normal file
|
After Width: | Height: | Size: 848 B |
BIN
dist/extension/images/icons/transparent/27x20x3.png
vendored
Normal file
|
After Width: | Height: | Size: 944 B |
BIN
dist/extension/images/icons/transparent/29x29x2.png
vendored
Normal file
|
After Width: | Height: | Size: 914 B |
BIN
dist/extension/images/icons/transparent/29x29x3.png
vendored
Normal file
|
After Width: | Height: | Size: 1018 B |
BIN
dist/extension/images/icons/transparent/32x24x2.png
vendored
Normal file
|
After Width: | Height: | Size: 881 B |
BIN
dist/extension/images/icons/transparent/32x24x3.png
vendored
Normal file
|
After Width: | Height: | Size: 953 B |
BIN
dist/extension/images/icons/transparent/32x32x1.png
vendored
Normal file
|
After Width: | Height: | Size: 829 B |
BIN
dist/extension/images/icons/transparent/32x32x2.png
vendored
Normal file
|
After Width: | Height: | Size: 936 B |
BIN
dist/extension/images/icons/transparent/48x48x1.png
vendored
Normal file
|
After Width: | Height: | Size: 856 B |
BIN
dist/extension/images/icons/transparent/512x512x1.png
vendored
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
dist/extension/images/icons/transparent/512x512x2.png
vendored
Normal file
|
After Width: | Height: | Size: 6.8 KiB |
BIN
dist/extension/images/icons/transparent/60x45x2.png
vendored
Normal file
|
After Width: | Height: | Size: 1014 B |
BIN
dist/extension/images/icons/transparent/60x45x3.png
vendored
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
dist/extension/images/icons/transparent/67x50x2.png
vendored
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
dist/extension/images/icons/transparent/74x55x2.png
vendored
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
dist/extension/images/icons/transparent/96x96x1.png
vendored
Normal file
|
After Width: | Height: | Size: 1018 B |
BIN
dist/extension/images/icons/transparent/icon-transparent.png
vendored
Normal file
|
After Width: | Height: | Size: 10 KiB |
41
dist/extension/manifest.json
vendored
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
{
|
||||||
|
"manifest_version": 3,
|
||||||
|
"name": "Pocket Bird",
|
||||||
|
"description": "It's a bird, in your browser. What more could you want?",
|
||||||
|
"version": "2025.11.2.60",
|
||||||
|
"homepage_url": "https://idreesinc.com",
|
||||||
|
"icons": {
|
||||||
|
"48": "images/icons/transparent/48x48x1.png",
|
||||||
|
"96": "images/icons/transparent/96x96x1.png",
|
||||||
|
"128": "images/icons/transparent/128x128x1.png"
|
||||||
|
},
|
||||||
|
"content_scripts": [
|
||||||
|
{
|
||||||
|
"matches": [
|
||||||
|
"<all_urls>"
|
||||||
|
],
|
||||||
|
"js": [
|
||||||
|
"birb.js"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"permissions": [
|
||||||
|
"storage",
|
||||||
|
"activeTab"
|
||||||
|
],
|
||||||
|
"web_accessible_resources": [
|
||||||
|
{
|
||||||
|
"resources": [
|
||||||
|
"images/*"
|
||||||
|
],
|
||||||
|
"matches": [
|
||||||
|
"<all_urls>"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"browser_specific_settings": {
|
||||||
|
"gecko": {
|
||||||
|
"id": "birb@idreesinc.com"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name Pocket Bird
|
// @name Pocket Bird
|
||||||
// @namespace https://idreesinc.com
|
// @namespace https://idreesinc.com
|
||||||
// @version 2025.11.2.44
|
// @version 2025.11.2.60
|
||||||
// @description birb
|
// @description birb
|
||||||
// @author Idrees
|
// @author Idrees
|
||||||
// @downloadURL https://github.com/IdreesInc/Pocket-Bird/raw/refs/heads/main/dist/birb.user.js
|
// @downloadURL https://github.com/IdreesInc/Pocket-Bird/raw/refs/heads/main/dist/userscript/birb.user.js
|
||||||
// @updateURL https://github.com/IdreesInc/Pocket-Bird/raw/refs/heads/main/dist/birb.user.js
|
// @updateURL https://github.com/IdreesInc/Pocket-Bird/raw/refs/heads/main/dist/userscript/birb.user.js
|
||||||
// @match *://*/*
|
// @match *://*/*
|
||||||
// @grant GM_setValue
|
// @grant GM_setValue
|
||||||
// @grant GM_getValue
|
// @grant GM_getValue
|
||||||
@@ -1881,7 +1881,7 @@
|
|||||||
insertModal(`${birdBirb()} Mode`, message);
|
insertModal(`${birdBirb()} Mode`, message);
|
||||||
}),
|
}),
|
||||||
new Separator(),
|
new Separator(),
|
||||||
new MenuItem("2025.11.2.44", () => { alert("Thank you for using Pocket Bird! You are on version: 2025.11.2.44"); }, false),
|
new MenuItem("2025.11.2.60", () => { alert("Thank you for using Pocket Bird! You are on version: 2025.11.2.60"); }, false),
|
||||||
];
|
];
|
||||||
|
|
||||||
const styleElement = document.createElement("style");
|
const styleElement = document.createElement("style");
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
"manifest_version": 3,
|
"manifest_version": 3,
|
||||||
"name": "Pocket Bird",
|
"name": "Pocket Bird",
|
||||||
"description": "It's a bird, in your browser. What more could you want?",
|
"description": "It's a bird, in your browser. What more could you want?",
|
||||||
"version": "2025.11.2.44",
|
"version": "2025.11.2.60",
|
||||||
"homepage_url": "https://idreesinc.com",
|
"homepage_url": "https://idreesinc.com",
|
||||||
"icons": {
|
"icons": {
|
||||||
"48": "images/icons/transparent/48x48x1.png",
|
"48": "images/icons/transparent/48x48x1.png",
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
"<all_urls>"
|
"<all_urls>"
|
||||||
],
|
],
|
||||||
"js": [
|
"js": [
|
||||||
"./dist/birb.js"
|
"birb.js"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||