mirror of
https://github.com/NohamR/Pocket-Bird.git
synced 2026-05-26 04:07:24 +00:00
Compare commits
19 Commits
absolute-p
...
extension
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4b206f638d | ||
|
|
6124fcd969 | ||
|
|
b9304fe11b | ||
|
|
7f9c388853 | ||
|
|
3aa0308746 | ||
|
|
f45eb0ce61 | ||
|
|
e55f0e7412 | ||
|
|
ff98390e10 | ||
|
|
f73e29a723 | ||
|
|
bf1bb74219 | ||
|
|
ca3bc5be4b | ||
|
|
29f1766a95 | ||
|
|
5298b7801b | ||
|
|
bed3d37940 | ||
|
|
bae44cc98c | ||
|
|
2767caeb84 | ||
|
|
270367139d | ||
|
|
9fca0b2046 | ||
|
|
5860171184 |
@@ -1,8 +1,8 @@
|
||||
# Browser Bird (Work in Progress!)
|
||||
# Pocket Bird (Work in Progress!)
|
||||
|
||||
This project is still being worked on, but if you wish to help me beta test it, join the [Discord](https://discord.gg/6yxE9prcNc) and follow the installation instructions below!
|
||||
|
||||
1. Install [Tampermonkey](https://www.tampermonkey.net/) on your web browser
|
||||
2. Enable the Tampermonkey extension and give it the permissions requested
|
||||
3. Install my Browser Bird script by going to this link and clicking install: [https://github.com/IdreesInc/Browser-Bird/raw/refs/heads/main/dist/birb.user.js](https://github.com/IdreesInc/Browser-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/birb.user.js](https://github.com/IdreesInc/Pocket-Bird/raw/refs/heads/main/dist/birb.user.js)
|
||||
4. Now any websites you visit will have a little bird hopping around!
|
||||
33
build.js
33
build.js
@@ -20,27 +20,48 @@ const spriteSheets = [
|
||||
const STYLESHEET_PATH = "./stylesheet.css";
|
||||
const STYLESHEET_KEY = "___STYLESHEET___";
|
||||
|
||||
let version = "0.0.0";
|
||||
// Try to read version from manifest.json
|
||||
const now = new Date();
|
||||
const versionDate = `${now.getFullYear()}.${now.getMonth() + 1}.${now.getDate()}`;
|
||||
|
||||
// Get current build number from manifest.json
|
||||
let buildNumber = 0;
|
||||
try {
|
||||
const manifest = JSON.parse(readFileSync('manifest.json', 'utf8'));
|
||||
if (manifest.version) {
|
||||
version = manifest.version;
|
||||
if (manifest.version.startsWith(versionDate)) {
|
||||
// Same day, increment build number
|
||||
const parts = manifest.version.split('.');
|
||||
if (parts.length === 4) {
|
||||
buildNumber = parseInt(parts[3], 10) + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
console.error("Could not read version from manifest.json");
|
||||
throw e;
|
||||
}
|
||||
|
||||
// Update manifest.json with new version
|
||||
const version = `${versionDate}.${buildNumber}`;
|
||||
try {
|
||||
const manifest = JSON.parse(readFileSync('manifest.json', 'utf8'));
|
||||
manifest.version = version;
|
||||
writeFileSync('manifest.json', JSON.stringify(manifest, null, 4), 'utf8');
|
||||
} catch (e) {
|
||||
console.error("Could not update version in manifest.json");
|
||||
throw e;
|
||||
}
|
||||
|
||||
|
||||
const userScriptHeader =
|
||||
`// ==UserScript==
|
||||
// @name Browser Bird
|
||||
// @name Pocket Bird
|
||||
// @namespace https://idreesinc.com
|
||||
// @version ${version}
|
||||
// @description birb
|
||||
// @author Idrees
|
||||
// @downloadURL https://github.com/IdreesInc/Browser-Bird/raw/refs/heads/main/dist/birb.user.js
|
||||
// @updateURL https://github.com/IdreesInc/Browser-Bird/raw/refs/heads/main/dist/birb.user.js
|
||||
// @downloadURL 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/birb.user.js
|
||||
// @match *://*/*
|
||||
// @grant GM_setValue
|
||||
// @grant GM_getValue
|
||||
|
||||
819
dist/birb.js
vendored
819
dist/birb.js
vendored
File diff suppressed because it is too large
Load Diff
827
dist/birb.user.js
vendored
827
dist/birb.user.js
vendored
File diff suppressed because it is too large
Load Diff
@@ -1,29 +1,36 @@
|
||||
{
|
||||
"manifest_version": 3,
|
||||
"name": "Browser 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"]
|
||||
}
|
||||
],
|
||||
"permissions": [
|
||||
"storage",
|
||||
"activeTab"
|
||||
],
|
||||
"web_accessible_resources": [
|
||||
{
|
||||
"resources": ["images/*"],
|
||||
"matches": ["<all_urls>"]
|
||||
}
|
||||
],
|
||||
"browser_specific_settings": {
|
||||
"gecko": {
|
||||
"id": "birb@idreesinc.com"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
"manifest_version": 3,
|
||||
"name": "Pocket Bird",
|
||||
"description": "It's a bird, in your browser. What more could you want?",
|
||||
"version": "2025.10.25.130",
|
||||
"homepage_url": "https://idreesinc.com",
|
||||
"content_scripts": [
|
||||
{
|
||||
"matches": [
|
||||
"<all_urls>"
|
||||
],
|
||||
"js": [
|
||||
"./dist/birb.js"
|
||||
]
|
||||
}
|
||||
],
|
||||
"permissions": [
|
||||
"storage",
|
||||
"activeTab"
|
||||
],
|
||||
"web_accessible_resources": [
|
||||
{
|
||||
"resources": [
|
||||
"images/*"
|
||||
],
|
||||
"matches": [
|
||||
"<all_urls>"
|
||||
]
|
||||
}
|
||||
],
|
||||
"browser_specific_settings": {
|
||||
"gecko": {
|
||||
"id": "birb@idreesinc.com"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,7 @@
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "node build.js",
|
||||
"dev": "nodemon --watch birb.js --watch stylesheet.css --watch build.js --watch manifest.json --exec \"npm run build\""
|
||||
"dev": "nodemon --watch birb.js --watch stylesheet.css --watch build.js --exec \"npm run build\""
|
||||
},
|
||||
"devDependencies": {
|
||||
"nodemon": "^3.1.10"
|
||||
|
||||
@@ -21,6 +21,10 @@
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.birb-absolute {
|
||||
position: absolute !important;
|
||||
}
|
||||
|
||||
.birb-decoration {
|
||||
image-rendering: pixelated;
|
||||
position: fixed;
|
||||
@@ -237,8 +241,8 @@
|
||||
flex-direction: row;
|
||||
padding-top: 4px;
|
||||
padding-bottom: 4px;
|
||||
padding-left: 15px;
|
||||
padding-right: 15px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@@ -285,12 +289,12 @@
|
||||
}
|
||||
|
||||
.birb-field-guide-description {
|
||||
width: calc(100% - 16px);
|
||||
margin-top: 10px;
|
||||
width: calc(100% - 20px);
|
||||
margin-top: 5px;
|
||||
padding: 8px;
|
||||
padding-top: 4px;
|
||||
padding-bottom: 4px;
|
||||
margin-bottom: 6px;
|
||||
margin-bottom: 10px;
|
||||
font-size: 14px;
|
||||
box-sizing: border-box;
|
||||
color: rgb(124, 108, 75);
|
||||
|
||||
Reference in New Issue
Block a user