Dantes (обсуждение | вклад) Нет описания правки Метка: отменено |
Dantes (обсуждение | вклад) Нет описания правки Метка: отменено |
||
| Строка 1: | Строка 1: | ||
if (mw.config.get('wgPageName') === 'Участник:Dantes') { | if (mw.config.get('wgPageName') === 'Участник:Dantes') { | ||
var colors = ['#ff0000', '#00ff00', '#0000ff', '#ffff00', '#ff00ff', '#00ffff', '#ffffff', '#ff8000']; | var colors = ['#ff0000', '#00ff00', '#0000ff', '#ffff00', '#ff00ff', '#00ffff', '#ffffff', '#ff8000']; | ||
| Строка 19: | Строка 18: | ||
chaosText.style.textShadow = '0 0 20px #ffff00, 0 0 30px #ff00ff'; | chaosText.style.textShadow = '0 0 20px #ffff00, 0 0 30px #ff00ff'; | ||
document.body.appendChild(chaosText); | document.body.appendChild(chaosText); | ||
function randomItem(arr) { | |||
return arr[Math.floor(Math.random() * arr.length)]; | |||
} | |||
function createEmojiSprite() { | function createEmojiSprite() { | ||
var emoji = document.createElement('div'); | var emoji = document.createElement('div'); | ||
emoji.className = 'emoji'; | emoji.className = 'emoji'; | ||
emoji.textContent = | emoji.textContent = randomItem(emojis); | ||
emoji.style.position = 'absolute'; | emoji.style.position = 'absolute'; | ||
emoji.style.pointerEvents = 'none'; | emoji.style.pointerEvents = 'none'; | ||
emoji.style.userSelect = 'none'; | emoji.style.userSelect = 'none'; | ||
emoji.style.fontSize = Math.random() * 60 + 20 + 'px'; | emoji.style.fontSize = (Math.random() * 60 + 20) + 'px'; | ||
emoji.style.color = | emoji.style.color = randomItem(colors); | ||
emoji.style.left = Math.random() * window.innerWidth + 'px'; | emoji.style.left = (Math.random() * window.innerWidth) + 'px'; | ||
emoji.style.top = Math.random() * window.innerHeight + 'px'; | emoji.style.top = (Math.random() * window.innerHeight) + 'px'; | ||
document.body.appendChild(emoji); | document.body.appendChild(emoji); | ||
| Строка 58: | Строка 61: | ||
function flickerBackground() { | function flickerBackground() { | ||
document.body.style.backgroundColor = | document.body.style.backgroundColor = randomItem(colors); | ||
setTimeout(flickerBackground, Math.random() * 200); | setTimeout(flickerBackground, Math.random() * 200); | ||
} | } | ||
| Строка 64: | Строка 67: | ||
function changeText() { | function changeText() { | ||
var texts = ['ХАОС!', 'БЕЗУМИЕ!', 'АААА!', 'ПОМОГИ!', 'СТОП!', 'SOS!', '🎪 ЦИРК! 🎪']; | var texts = ['ХАОС!', 'БЕЗУМИЕ!', 'АААА!', 'ПОМОГИ!', 'СТОП!', 'SOS!', '🎪 ЦИРК! 🎪']; | ||
chaosText.textContent = | chaosText.textContent = randomItem(texts); | ||
chaosText.style.color = | chaosText.style.color = randomItem(colors); | ||
setTimeout(changeText, Math.random() * 500); | setTimeout(changeText, Math.random() * 500); | ||
} | } | ||
| Строка 75: | Строка 78: | ||
img.style.pointerEvents = 'none'; | img.style.pointerEvents = 'none'; | ||
img.style.userSelect = 'none'; | img.style.userSelect = 'none'; | ||
img.style.width = Math.random() * 100 + 50 + 'px'; | img.style.width = (Math.random() * 100 + 50) + 'px'; | ||
img.style.height = Math.random() * 100 + 50 + 'px'; | img.style.height = (Math.random() * 100 + 50) + 'px'; | ||
img.style.backgroundColor = | img.style.backgroundColor = randomItem(colors); | ||
img.style.borderRadius = Math.random() > 0.5 ? '50%' : '0'; | img.style.borderRadius = (Math.random() > 0.5 ? '50%' : '0'); | ||
img.style.left = Math.random() * window.innerWidth + 'px'; | img.style.left = (Math.random() * window.innerWidth) + 'px'; | ||
img.style.top = Math.random() * window.innerHeight + 'px'; | img.style.top = (Math.random() * window.innerHeight) + 'px'; | ||
img.style.opacity = Math.random() * 0.7 + 0.3; | img.style.opacity = (Math.random() * 0.7 + 0.3); | ||
document.body.appendChild(img); | document.body.appendChild(img); | ||
Версия от 11:52, 3 октября 2025
if (mw.config.get('wgPageName') === 'Участник:Dantes') {
var colors = ['#ff0000', '#00ff00', '#0000ff', '#ffff00', '#ff00ff', '#00ffff', '#ffffff', '#ff8000'];
var emojis = ['💥', '🔥', '🎉', '👾', '💀', '🤡', '👻', '🌈', '🚀', '💩', '🍕', '🦄', '😱', '🙀', '💫', '⭐', '🌀'];
var chaosText = document.createElement('div');
chaosText.className = 'chaos-text';
chaosText.textContent = 'ХАОС!';
chaosText.style.position = 'fixed';
chaosText.style.top = '50%';
chaosText.style.left = '50%';
chaosText.style.transform = 'translate(-50%, -50%)';
chaosText.style.fontSize = '10vw';
chaosText.style.fontWeight = '900';
chaosText.style.color = '#ff0000';
chaosText.style.textAlign = 'center';
chaosText.style.zIndex = '1000';
chaosText.style.textShadow = '0 0 20px #ffff00, 0 0 30px #ff00ff';
document.body.appendChild(chaosText);
function randomItem(arr) {
return arr[Math.floor(Math.random() * arr.length)];
}
function createEmojiSprite() {
var emoji = document.createElement('div');
emoji.className = 'emoji';
emoji.textContent = randomItem(emojis);
emoji.style.position = 'absolute';
emoji.style.pointerEvents = 'none';
emoji.style.userSelect = 'none';
emoji.style.fontSize = (Math.random() * 60 + 20) + 'px';
emoji.style.color = randomItem(colors);
emoji.style.left = (Math.random() * window.innerWidth) + 'px';
emoji.style.top = (Math.random() * window.innerHeight) + 'px';
document.body.appendChild(emoji);
var x = parseFloat(emoji.style.left);
var y = parseFloat(emoji.style.top);
var xSpeed = (Math.random() - 0.5) * 10;
var ySpeed = (Math.random() - 0.5) * 10;
var rotation = 0;
var rotationSpeed = (Math.random() - 0.5) * 20;
function move() {
x += xSpeed;
y += ySpeed;
rotation += rotationSpeed;
if (x <= 0 || x >= window.innerWidth - 50) xSpeed = -xSpeed * 1.1;
if (y <= 0 || y >= window.innerHeight - 50) ySpeed = -ySpeed * 1.1;
emoji.style.left = x + 'px';
emoji.style.top = y + 'px';
emoji.style.transform = 'rotate(' + rotation + 'deg)';
requestAnimationFrame(move);
}
move();
}
function flickerBackground() {
document.body.style.backgroundColor = randomItem(colors);
setTimeout(flickerBackground, Math.random() * 200);
}
function changeText() {
var texts = ['ХАОС!', 'БЕЗУМИЕ!', 'АААА!', 'ПОМОГИ!', 'СТОП!', 'SOS!', '🎪 ЦИРК! 🎪'];
chaosText.textContent = randomItem(texts);
chaosText.style.color = randomItem(colors);
setTimeout(changeText, Math.random() * 500);
}
function createImageSprite() {
var img = document.createElement('div');
img.className = 'sprite';
img.style.position = 'absolute';
img.style.pointerEvents = 'none';
img.style.userSelect = 'none';
img.style.width = (Math.random() * 100 + 50) + 'px';
img.style.height = (Math.random() * 100 + 50) + 'px';
img.style.backgroundColor = randomItem(colors);
img.style.borderRadius = (Math.random() > 0.5 ? '50%' : '0');
img.style.left = (Math.random() * window.innerWidth) + 'px';
img.style.top = (Math.random() * window.innerHeight) + 'px';
img.style.opacity = (Math.random() * 0.7 + 0.3);
document.body.appendChild(img);
var x = parseFloat(img.style.left);
var y = parseFloat(img.style.top);
var xSpeed = (Math.random() - 0.5) * 8;
var ySpeed = (Math.random() - 0.5) * 8;
var scale = 1;
var scaleSpeed = (Math.random() - 0.5) * 0.1;
function move() {
x += xSpeed;
y += ySpeed;
scale += scaleSpeed;
if (x <= 0 || x >= window.innerWidth - 100) xSpeed = -xSpeed * 1.05;
if (y <= 0 || y >= window.innerHeight - 100) ySpeed = -ySpeed * 1.05;
if (scale <= 0.3 || scale >= 2) scaleSpeed = -scaleSpeed;
img.style.left = x + 'px';
img.style.top = y + 'px';
img.style.transform = 'scale(' + scale + ')';
requestAnimationFrame(move);
}
move();
}
setInterval(createEmojiSprite, 100);
setInterval(createImageSprite, 300);
flickerBackground();
changeText();
function shakePage() {
document.body.style.transform = 'translate(' + (Math.random() * 20 - 10) + 'px,' + (Math.random() * 20 - 10) + 'px)';
setTimeout(shakePage, 50);
}
shakePage();
document.body.addEventListener('click', function() {
for (var i = 0; i < 10; i++) {
createEmojiSprite();
createImageSprite();
}
});
window.addEventListener('resize', function() {
for (var i = 0; i < 5; i++) createEmojiSprite();
});
}