added storage cap

This commit is contained in:
2024-04-25 11:59:56 -07:00
parent f176e7d773
commit 46374404f3
2 changed files with 7 additions and 2 deletions
+6 -1
View File
@@ -24,6 +24,7 @@ function updatePosition(emote) {
}
// Create multiple emotes and make them bounce around
if (Number(localStorage.getItem('alen')) > 10000) localStorage.setItem('alen', '20');
const aLength = (localStorage.getItem('alen')) ? Number(localStorage.getItem('alen')) : 20;
let emotes = Array.from({ length: aLength }, createEmote);
@@ -126,9 +127,13 @@ document.addEventListener('DOMContentLoaded', () => {
animIntTime = (animIntTime <= 500) ? 2000 : animIntTime - 500;
console.debug(animIntTime);
animIntId = setInterval(animateEmotes, animIntTime);
}
else if (event.ctrlKey && event.key === 'l') {
event.preventDefault();
window.open("https://ion606.com", "_blank");
}
});
});