mirror of
https://github.com/NohamR/Pocket-Bird.git
synced 2026-07-10 10:23:05 +00:00
Prevent landing on sticky notes
This commit is contained in:
1 parent
9e95603322
commit
8991be23b0
3 files changed
+6
-3
No files matched your search
@@ -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;
|
||||||
|
|||||||
Vendored
+2
-1
@@ -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;
|
||||||
|
|||||||
Vendored
+2
-1
@@ -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