mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +02:00
feat: uh hahaha you'll see ... again!
This commit is contained in:
1 parent
9538a03afb
commit
9475d22472
5 files changed
+111
-3
No files matched your search
@@ -0,0 +1,43 @@
|
||||
<script>
|
||||
function funnify() {
|
||||
document.body.querySelectorAll('*').forEach((element) => {
|
||||
element.childNodes.forEach((node) => {
|
||||
if (
|
||||
node.nodeType !== 3 ||
|
||||
!node.textContent ||
|
||||
!(node instanceof HTMLElement) ||
|
||||
node.classList.contains('no-funny')
|
||||
)
|
||||
return;
|
||||
|
||||
node.textContent = node.textContent
|
||||
.replaceAll(/[tdkqgp]/g, 'w')
|
||||
.replaceAll(/[TDKQGP]/g, 'W');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
funnify();
|
||||
setInterval(funnify, 1000);
|
||||
|
||||
let mouseDown = false;
|
||||
|
||||
document.addEventListener('mousedown', () => (mouseDown = true));
|
||||
document.addEventListener('mouseup', () => (mouseDown = false));
|
||||
|
||||
document.addEventListener('mousemove', (e) => {
|
||||
if (mouseDown) return;
|
||||
|
||||
const star = document.createElement('div');
|
||||
star.classList.add('star');
|
||||
star.innerHTML = '⭐';
|
||||
document.body.appendChild(star);
|
||||
|
||||
star.style.left = `${e.clientX}px`;
|
||||
star.style.top = `${e.clientY}px`;
|
||||
|
||||
setTimeout(() => {
|
||||
star.remove();
|
||||
}, 600);
|
||||
});
|
||||
</script>
|
||||
Reference in new issue
Block a user