mirror of
https://github.com/NohamR/Pocket-Bird.git
synced 2026-05-26 12:17:23 +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!
|
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
|
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 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!
|
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_PATH = "./stylesheet.css";
|
||||||
const STYLESHEET_KEY = "___STYLESHEET___";
|
const STYLESHEET_KEY = "___STYLESHEET___";
|
||||||
|
|
||||||
let version = "0.0.0";
|
const now = new Date();
|
||||||
// Try to read version from manifest.json
|
const versionDate = `${now.getFullYear()}.${now.getMonth() + 1}.${now.getDate()}`;
|
||||||
|
|
||||||
|
// Get current build number from manifest.json
|
||||||
|
let buildNumber = 0;
|
||||||
try {
|
try {
|
||||||
const manifest = JSON.parse(readFileSync('manifest.json', 'utf8'));
|
const manifest = JSON.parse(readFileSync('manifest.json', 'utf8'));
|
||||||
if (manifest.version) {
|
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) {
|
} catch (e) {
|
||||||
console.error("Could not read version from manifest.json");
|
console.error("Could not read version from manifest.json");
|
||||||
throw e;
|
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 =
|
const userScriptHeader =
|
||||||
`// ==UserScript==
|
`// ==UserScript==
|
||||||
// @name Browser Bird
|
// @name Pocket Bird
|
||||||
// @namespace https://idreesinc.com
|
// @namespace https://idreesinc.com
|
||||||
// @version ${version}
|
// @version ${version}
|
||||||
// @description birb
|
// @description birb
|
||||||
// @author Idrees
|
// @author Idrees
|
||||||
// @downloadURL 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/Browser-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 *://*/*
|
// @match *://*/*
|
||||||
// @grant GM_setValue
|
// @grant GM_setValue
|
||||||
// @grant GM_getValue
|
// @grant GM_getValue
|
||||||
|
|||||||
769
dist/birb.js
vendored
769
dist/birb.js
vendored
File diff suppressed because it is too large
Load Diff
777
dist/birb.user.js
vendored
777
dist/birb.user.js
vendored
File diff suppressed because it is too large
Load Diff
@@ -1,13 +1,17 @@
|
|||||||
{
|
{
|
||||||
"manifest_version": 3,
|
"manifest_version": 3,
|
||||||
"name": "Browser 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.9.16.1",
|
"version": "2025.10.25.130",
|
||||||
"homepage_url": "https://idreesinc.com",
|
"homepage_url": "https://idreesinc.com",
|
||||||
"content_scripts": [
|
"content_scripts": [
|
||||||
{
|
{
|
||||||
"matches": ["<all_urls>"],
|
"matches": [
|
||||||
"js": ["birb.js"]
|
"<all_urls>"
|
||||||
|
],
|
||||||
|
"js": [
|
||||||
|
"./dist/birb.js"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"permissions": [
|
"permissions": [
|
||||||
@@ -16,8 +20,12 @@
|
|||||||
],
|
],
|
||||||
"web_accessible_resources": [
|
"web_accessible_resources": [
|
||||||
{
|
{
|
||||||
"resources": ["images/*"],
|
"resources": [
|
||||||
"matches": ["<all_urls>"]
|
"images/*"
|
||||||
|
],
|
||||||
|
"matches": [
|
||||||
|
"<all_urls>"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"browser_specific_settings": {
|
"browser_specific_settings": {
|
||||||
@@ -26,4 +34,3 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "node build.js",
|
"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": {
|
"devDependencies": {
|
||||||
"nodemon": "^3.1.10"
|
"nodemon": "^3.1.10"
|
||||||
|
|||||||
@@ -21,6 +21,10 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.birb-absolute {
|
||||||
|
position: absolute !important;
|
||||||
|
}
|
||||||
|
|
||||||
.birb-decoration {
|
.birb-decoration {
|
||||||
image-rendering: pixelated;
|
image-rendering: pixelated;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
@@ -237,8 +241,8 @@
|
|||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
padding-top: 4px;
|
padding-top: 4px;
|
||||||
padding-bottom: 4px;
|
padding-bottom: 4px;
|
||||||
padding-left: 15px;
|
padding-left: 10px;
|
||||||
padding-right: 15px;
|
padding-right: 10px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -285,12 +289,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.birb-field-guide-description {
|
.birb-field-guide-description {
|
||||||
width: calc(100% - 16px);
|
width: calc(100% - 20px);
|
||||||
margin-top: 10px;
|
margin-top: 5px;
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
padding-top: 4px;
|
padding-top: 4px;
|
||||||
padding-bottom: 4px;
|
padding-bottom: 4px;
|
||||||
margin-bottom: 6px;
|
margin-bottom: 10px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
color: rgb(124, 108, 75);
|
color: rgb(124, 108, 75);
|
||||||
|
|||||||
Reference in New Issue
Block a user