mirror of
https://github.com/NohamR/Pocket-Bird.git
synced 2026-05-24 19:59:36 +00:00
Add jsconfig file
This commit is contained in:
15
dist/birb.js
vendored
15
dist/birb.js
vendored
@@ -1,16 +1,12 @@
|
|||||||
(function () {
|
(function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
// @ts-check
|
|
||||||
|
|
||||||
const Directions = {
|
const Directions = {
|
||||||
LEFT: -1,
|
LEFT: -1,
|
||||||
RIGHT: 1,
|
RIGHT: 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
// @ts-check
|
/** Indicators for parts of the base bird sprite sheet */
|
||||||
|
|
||||||
// Sprite theme color indicators
|
|
||||||
const Sprite = {
|
const Sprite = {
|
||||||
THEME_HIGHLIGHT: "theme-highlight",
|
THEME_HIGHLIGHT: "theme-highlight",
|
||||||
TRANSPARENT: "transparent",
|
TRANSPARENT: "transparent",
|
||||||
@@ -210,8 +206,6 @@
|
|||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
|
|
||||||
// @ts-check
|
|
||||||
|
|
||||||
class Layer {
|
class Layer {
|
||||||
/**
|
/**
|
||||||
* @param {string[][]} pixels
|
* @param {string[][]} pixels
|
||||||
@@ -223,8 +217,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// @ts-check
|
|
||||||
|
|
||||||
class Frame {
|
class Frame {
|
||||||
|
|
||||||
/** @type {{ [tag: string]: string[][] }} */
|
/** @type {{ [tag: string]: string[][] }} */
|
||||||
@@ -291,9 +283,6 @@
|
|||||||
} } }
|
} } }
|
||||||
}
|
}
|
||||||
|
|
||||||
// @ts-check
|
|
||||||
|
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
const SHARED_CONFIG = {
|
const SHARED_CONFIG = {
|
||||||
birbCssScale: 1,
|
birbCssScale: 1,
|
||||||
@@ -1017,7 +1006,6 @@
|
|||||||
const canvas = document.createElement("canvas");
|
const canvas = document.createElement("canvas");
|
||||||
|
|
||||||
/** @type {CanvasRenderingContext2D} */
|
/** @type {CanvasRenderingContext2D} */
|
||||||
// @ts-expect-error
|
|
||||||
const ctx = canvas.getContext("2d");
|
const ctx = canvas.getContext("2d");
|
||||||
|
|
||||||
const States = {
|
const States = {
|
||||||
@@ -1389,7 +1377,6 @@
|
|||||||
|
|
||||||
const textarea = noteElement.querySelector(".birb-sticky-note-input");
|
const textarea = noteElement.querySelector(".birb-sticky-note-input");
|
||||||
if (textarea && textarea instanceof HTMLTextAreaElement) {
|
if (textarea && textarea instanceof HTMLTextAreaElement) {
|
||||||
/** @type {NodeJS.Timeout | undefined} */
|
|
||||||
let saveTimeout;
|
let saveTimeout;
|
||||||
// Save after debounce
|
// Save after debounce
|
||||||
textarea.addEventListener("input", () => {
|
textarea.addEventListener("input", () => {
|
||||||
|
|||||||
17
dist/birb.user.js
vendored
17
dist/birb.user.js
vendored
@@ -1,7 +1,7 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name Pocket Bird
|
// @name Pocket Bird
|
||||||
// @namespace https://idreesinc.com
|
// @namespace https://idreesinc.com
|
||||||
// @version 2025.10.26.37
|
// @version 2025.10.26.43
|
||||||
// @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/birb.user.js
|
||||||
@@ -15,16 +15,12 @@
|
|||||||
(function () {
|
(function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
// @ts-check
|
|
||||||
|
|
||||||
const Directions = {
|
const Directions = {
|
||||||
LEFT: -1,
|
LEFT: -1,
|
||||||
RIGHT: 1,
|
RIGHT: 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
// @ts-check
|
/** Indicators for parts of the base bird sprite sheet */
|
||||||
|
|
||||||
// Sprite theme color indicators
|
|
||||||
const Sprite = {
|
const Sprite = {
|
||||||
THEME_HIGHLIGHT: "theme-highlight",
|
THEME_HIGHLIGHT: "theme-highlight",
|
||||||
TRANSPARENT: "transparent",
|
TRANSPARENT: "transparent",
|
||||||
@@ -224,8 +220,6 @@
|
|||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
|
|
||||||
// @ts-check
|
|
||||||
|
|
||||||
class Layer {
|
class Layer {
|
||||||
/**
|
/**
|
||||||
* @param {string[][]} pixels
|
* @param {string[][]} pixels
|
||||||
@@ -237,8 +231,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// @ts-check
|
|
||||||
|
|
||||||
class Frame {
|
class Frame {
|
||||||
|
|
||||||
/** @type {{ [tag: string]: string[][] }} */
|
/** @type {{ [tag: string]: string[][] }} */
|
||||||
@@ -305,9 +297,6 @@
|
|||||||
} } }
|
} } }
|
||||||
}
|
}
|
||||||
|
|
||||||
// @ts-check
|
|
||||||
|
|
||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
const SHARED_CONFIG = {
|
const SHARED_CONFIG = {
|
||||||
birbCssScale: 1,
|
birbCssScale: 1,
|
||||||
@@ -1031,7 +1020,6 @@
|
|||||||
const canvas = document.createElement("canvas");
|
const canvas = document.createElement("canvas");
|
||||||
|
|
||||||
/** @type {CanvasRenderingContext2D} */
|
/** @type {CanvasRenderingContext2D} */
|
||||||
// @ts-expect-error
|
|
||||||
const ctx = canvas.getContext("2d");
|
const ctx = canvas.getContext("2d");
|
||||||
|
|
||||||
const States = {
|
const States = {
|
||||||
@@ -1403,7 +1391,6 @@
|
|||||||
|
|
||||||
const textarea = noteElement.querySelector(".birb-sticky-note-input");
|
const textarea = noteElement.querySelector(".birb-sticky-note-input");
|
||||||
if (textarea && textarea instanceof HTMLTextAreaElement) {
|
if (textarea && textarea instanceof HTMLTextAreaElement) {
|
||||||
/** @type {NodeJS.Timeout | undefined} */
|
|
||||||
let saveTimeout;
|
let saveTimeout;
|
||||||
// Save after debounce
|
// Save after debounce
|
||||||
textarea.addEventListener("input", () => {
|
textarea.addEventListener("input", () => {
|
||||||
|
|||||||
7
jsconfig.json
Normal file
7
jsconfig.json
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"checkJs": true,
|
||||||
|
"target": "es2017"
|
||||||
|
},
|
||||||
|
"include": ["src"]
|
||||||
|
}
|
||||||
@@ -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.10.26.37",
|
"version": "2025.10.26.43",
|
||||||
"homepage_url": "https://idreesinc.com",
|
"homepage_url": "https://idreesinc.com",
|
||||||
"content_scripts": [
|
"content_scripts": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
// @ts-check
|
|
||||||
import { Directions } from './sharedConstants.js';
|
import { Directions } from './sharedConstants.js';
|
||||||
import { Sprite, BirdType } from './sprites.js';
|
import { Sprite, BirdType } from './sprites.js';
|
||||||
import Layer from './layer.js';
|
import Layer from './layer.js';
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
// @ts-check
|
|
||||||
|
|
||||||
class Layer {
|
class Layer {
|
||||||
/**
|
/**
|
||||||
* @param {string[][]} pixels
|
* @param {string[][]} pixels
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
// @ts-check
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
Directions
|
Directions
|
||||||
} from './sharedConstants.js';
|
} from './sharedConstants.js';
|
||||||
@@ -402,7 +400,6 @@ Promise.all([
|
|||||||
const canvas = document.createElement("canvas");
|
const canvas = document.createElement("canvas");
|
||||||
|
|
||||||
/** @type {CanvasRenderingContext2D} */
|
/** @type {CanvasRenderingContext2D} */
|
||||||
// @ts-expect-error
|
|
||||||
const ctx = canvas.getContext("2d");
|
const ctx = canvas.getContext("2d");
|
||||||
|
|
||||||
const States = {
|
const States = {
|
||||||
@@ -774,7 +771,6 @@ Promise.all([
|
|||||||
|
|
||||||
const textarea = noteElement.querySelector(".birb-sticky-note-input");
|
const textarea = noteElement.querySelector(".birb-sticky-note-input");
|
||||||
if (textarea && textarea instanceof HTMLTextAreaElement) {
|
if (textarea && textarea instanceof HTMLTextAreaElement) {
|
||||||
/** @type {NodeJS.Timeout | undefined} */
|
|
||||||
let saveTimeout;
|
let saveTimeout;
|
||||||
// Save after debounce
|
// Save after debounce
|
||||||
textarea.addEventListener("input", () => {
|
textarea.addEventListener("input", () => {
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
// @ts-check
|
|
||||||
import { Directions } from './sharedConstants.js';
|
import { Directions } from './sharedConstants.js';
|
||||||
import { Sprite, BirdType } from './sprites.js';
|
import { Sprite, BirdType } from './sprites.js';
|
||||||
import Layer from './layer.js';
|
import Layer from './layer.js';
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
// @ts-check
|
|
||||||
|
|
||||||
class Layer {
|
class Layer {
|
||||||
/**
|
/**
|
||||||
* @param {string[][]} pixels
|
* @param {string[][]} pixels
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
// @ts-check
|
|
||||||
|
|
||||||
export const Directions = {
|
export const Directions = {
|
||||||
LEFT: -1,
|
LEFT: -1,
|
||||||
RIGHT: 1,
|
RIGHT: 1,
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
// @ts-check
|
/** Indicators for parts of the base bird sprite sheet */
|
||||||
|
|
||||||
// Sprite theme color indicators
|
|
||||||
export const Sprite = {
|
export const Sprite = {
|
||||||
THEME_HIGHLIGHT: "theme-highlight",
|
THEME_HIGHLIGHT: "theme-highlight",
|
||||||
TRANSPARENT: "transparent",
|
TRANSPARENT: "transparent",
|
||||||
|
|||||||
Reference in New Issue
Block a user