[ Home / rules / bans ] [ squirrel / raid / qa ] [ craft / nuts / art / irl ] [ booru / cytube / archive ] [ Overboard ] [ Contact ]

/squirrel/ - Squirreljaks

Nigga, that's nuts!
Email
Subject
Comment
File
Embed
Password (For file deletion.)

File: 1750264053614.png (70.21 KB, 1000x1000, squirrel feral hand holdin….png)

 No.1468

Can you guys try putting this into your extra JS and CSS and seeing if it works?
JS
const nutContainer = document.createElement('div');
nutContainer.style.position = 'absolute';
nutContainer.style.top = '0';
nutContainer.style.left = '0';
nutContainer.style.width = '100%';
nutContainer.style.pointerEvents = 'none';
nutContainer.style.zIndex = '-1';
document.body.appendChild(nutContainer);

const nutEmojis = ['🥜', '🌰'];

function updateContainerHeight() {
nutContainer.style.height = document.body.scrollHeight + 'px';
}
updateContainerHeight();

window.addEventListener('resize', updateContainerHeight);
window.addEventListener('scroll', updateContainerHeight);

function createNut() {
const nut = document.createElement('div');
nut.classList.add('nut');
nut.textContent = nutEmojis[Math.floor(Math.random() * nutEmojis.length)];

nut.style.position = 'absolute';
nut.style.left = Math.random() * window.innerWidth + 'px';

const size = 20 + Math.random() * 40;
nut.style.fontSize = size + 'px';

nut.style.top = '-50px';

nutContainer.appendChild(nut);

const duration = 15000 + Math.random() * 15000; // 15–30 sec fall

const start = performance.now();

const totalHeight = document.body.scrollHeight + 100;

function animate(time) {
const elapsed = time - start;
const progress = elapsed / duration;

if (progress < 1) {
const y = progress * totalHeight;
nut.style.transform = `translateY(${y}px) rotate(${progress * 360}deg)`;
requestAnimationFrame(animate);
} else {
nut.remove();
}
}

requestAnimationFrame(animate);
}

// Spawn every 400ms for steady flow, no limits
setInterval(createNut, 400);

CSS
.nut {
user-select: none;
pointer-events: none;
opacity: 0.9;
position: absolute;
left: 0;
top: 0;
}

 No.1469

pin this until you fix it

 No.1470

hello from switch

-Mr Z

 No.1471

>>1468
OP here give me images you think I should add/replace the nuts with



[Return][Go to top] Catalog [Post a Reply]
Delete Post [ ]
[ Home / rules / bans ] [ squirrel / raid / qa ] [ craft / nuts / art / irl ] [ booru / cytube / archive ] [ Overboard ] [ Contact ]