mirror of
https://github.com/NohamR/Pocket-Bird.git
synced 2026-05-25 19:59:38 +00:00
Prevent landing on sticky notes
This commit is contained in:
3
birb.js
3
birb.js
@@ -299,6 +299,7 @@ const species = {
|
|||||||
[UNDERBELLY]: "#f5ea63",
|
[UNDERBELLY]: "#f5ea63",
|
||||||
[WING]: "#e8e079",
|
[WING]: "#e8e079",
|
||||||
[WING_EDGE]: "#191919",
|
[WING_EDGE]: "#191919",
|
||||||
|
[THEME_HIGHLIGHT]: "#ffcc00"
|
||||||
}),
|
}),
|
||||||
barnSwallow: new BirdType("Barn Swallow",
|
barnSwallow: new BirdType("Barn Swallow",
|
||||||
"Agile birds that often roost in man-made structures, these birds are known to build nests near Ospreys for protection.", {
|
"Agile birds that often roost in man-made structures, these birds are known to build nests near Ospreys for protection.", {
|
||||||
@@ -1623,7 +1624,7 @@ Promise.all([loadSpriteSheetPixels(SPRITE_SHEET), loadSpriteSheetPixels(DECORATI
|
|||||||
}
|
}
|
||||||
|
|
||||||
function focusOnElement() {
|
function focusOnElement() {
|
||||||
const elements = document.querySelectorAll("img, video, .birb-sticky-note");
|
const elements = document.querySelectorAll("img, video");
|
||||||
const inWindow = Array.from(elements).filter((img) => {
|
const inWindow = Array.from(elements).filter((img) => {
|
||||||
const rect = img.getBoundingClientRect();
|
const rect = img.getBoundingClientRect();
|
||||||
return rect.left >= 0 && rect.top >= 80 && rect.right <= window.innerWidth && rect.top <= window.innerHeight;
|
return rect.left >= 0 && rect.top >= 80 && rect.right <= window.innerWidth && rect.top <= window.innerHeight;
|
||||||
|
|||||||
3
dist/birb.js
vendored
3
dist/birb.js
vendored
@@ -619,6 +619,7 @@ const species = {
|
|||||||
[UNDERBELLY]: "#f5ea63",
|
[UNDERBELLY]: "#f5ea63",
|
||||||
[WING]: "#e8e079",
|
[WING]: "#e8e079",
|
||||||
[WING_EDGE]: "#191919",
|
[WING_EDGE]: "#191919",
|
||||||
|
[THEME_HIGHLIGHT]: "#ffcc00"
|
||||||
}),
|
}),
|
||||||
barnSwallow: new BirdType("Barn Swallow",
|
barnSwallow: new BirdType("Barn Swallow",
|
||||||
"Agile birds that often roost in man-made structures, these birds are known to build nests near Ospreys for protection.", {
|
"Agile birds that often roost in man-made structures, these birds are known to build nests near Ospreys for protection.", {
|
||||||
@@ -1943,7 +1944,7 @@ Promise.all([loadSpriteSheetPixels(SPRITE_SHEET), loadSpriteSheetPixels(DECORATI
|
|||||||
}
|
}
|
||||||
|
|
||||||
function focusOnElement() {
|
function focusOnElement() {
|
||||||
const elements = document.querySelectorAll("img, video, .birb-sticky-note");
|
const elements = document.querySelectorAll("img, video");
|
||||||
const inWindow = Array.from(elements).filter((img) => {
|
const inWindow = Array.from(elements).filter((img) => {
|
||||||
const rect = img.getBoundingClientRect();
|
const rect = img.getBoundingClientRect();
|
||||||
return rect.left >= 0 && rect.top >= 80 && rect.right <= window.innerWidth && rect.top <= window.innerHeight;
|
return rect.left >= 0 && rect.top >= 80 && rect.right <= window.innerWidth && rect.top <= window.innerHeight;
|
||||||
|
|||||||
3
dist/birb.user.js
vendored
3
dist/birb.user.js
vendored
@@ -633,6 +633,7 @@ const species = {
|
|||||||
[UNDERBELLY]: "#f5ea63",
|
[UNDERBELLY]: "#f5ea63",
|
||||||
[WING]: "#e8e079",
|
[WING]: "#e8e079",
|
||||||
[WING_EDGE]: "#191919",
|
[WING_EDGE]: "#191919",
|
||||||
|
[THEME_HIGHLIGHT]: "#ffcc00"
|
||||||
}),
|
}),
|
||||||
barnSwallow: new BirdType("Barn Swallow",
|
barnSwallow: new BirdType("Barn Swallow",
|
||||||
"Agile birds that often roost in man-made structures, these birds are known to build nests near Ospreys for protection.", {
|
"Agile birds that often roost in man-made structures, these birds are known to build nests near Ospreys for protection.", {
|
||||||
@@ -1957,7 +1958,7 @@ Promise.all([loadSpriteSheetPixels(SPRITE_SHEET), loadSpriteSheetPixels(DECORATI
|
|||||||
}
|
}
|
||||||
|
|
||||||
function focusOnElement() {
|
function focusOnElement() {
|
||||||
const elements = document.querySelectorAll("img, video, .birb-sticky-note");
|
const elements = document.querySelectorAll("img, video");
|
||||||
const inWindow = Array.from(elements).filter((img) => {
|
const inWindow = Array.from(elements).filter((img) => {
|
||||||
const rect = img.getBoundingClientRect();
|
const rect = img.getBoundingClientRect();
|
||||||
return rect.left >= 0 && rect.top >= 80 && rect.right <= window.innerWidth && rect.top <= window.innerHeight;
|
return rect.left >= 0 && rect.top >= 80 && rect.right <= window.innerWidth && rect.top <= window.innerHeight;
|
||||||
|
|||||||
Reference in New Issue
Block a user