Загрузка...

Help the young startuper finalize the code

Thread in HTML templates, landing pages created by Levzxc Mar 1, 2025. 257 views

  1. Levzxc
    Levzxc Topic starter Mar 1, 2025 0 Mar 14, 2023
    Мне нужно что бы мой сайт при нажатии большой кнопки посередине издавал громкий звук закинул запрос в дип чик он мне написал етот код прошу у знающих и опытных людей его доработать

    КОД. \/

    HTML
    <!DOCTYPE html> 

    <html>

    <head>

    <title>EARTHQUAKE BUTTON</title>

    <style>

    body { margin: 0; overflow: hidden; }

    #doomButton {

    position: fixed;

    width: 200vw;

    height: 200vh;

    background: repeating-linear-gradient(45deg, #ff0000 0%, #000000 100%);

    transform: rotate(15deg);

    cursor: url('data:image/png;base64,iVBORw0...'), auto;

    animation: pulse 0.5s infinite;

    }

    @keyframes pulse {

    0% { transform: scale(1); }

    50% { transform: scale(1.2); }

    100% { transform: scale(1); }

    }

    </style>

    </head>

    <body>

    <button id="doomButton"></button>



    <script>

    // Мегазвук через Web Audio API (нужен файл explosion.wav)

    const audioContext = new (window.AudioContext || window.webkitAudioContext)();

    let buffer;

    fetch('explosion.wav')

    .then(r => r.arrayBuffer())

    .then(d => audioContext.decodeAudioData(d))

    .then(b => buffer = b);

    document.getElementById('doomButton').onclick = () => {

    const source = audioContext.createBufferSource();

    source.buffer = buffer;

    const gainNode = audioContext.createGain();

    gainNode.gain.setValueAtTime(500, audioContext.currentTime); // Усиление x500

    source.connect(gainNode).connect(audioContext.destination);

    source.start();

    // Эффект "разрушения экрана"

    document.body.style.transform = 'rotate(360deg) scale(5)';

    setTimeout(() => { window.close() }, 500);

    };

    </script>

    </body>

    </html>
     
  2. Dexter
    Dexter Mar 1, 2025 БАБЫНБУБЕНБУБЗ 25 Jan 28, 2020
    скинь в виде кода
     
  3. сомния
    сомния Mar 1, 2025 11:11 означает смену эпох и зарождение нового мира 1691 Apr 4, 2022
    "+" -> код
     
    1. Levzxc Topic starter
Loading...
Top