User:PabloS/blast.js: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Protected "User:PabloS/blast.js" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
No edit summary
Line 4: Line 4:
      
      
             if (date.getFullYear() === 2024 && date.getMonth() === 10 && date.getDate() === 16) {
             if (date.getFullYear() === 2024 && date.getMonth() === 10 && date.getDate() === 16) {
                 for (let i = 1; i < 15; i++) {
                 waitFor("confetti", function() {
                    confetti({
                    for (let i = 1; i < 15; i++) {
                        particleCount: 100,
                        confetti({
                        startVelocity: 30,
                            particleCount: 100,
                        spread: 360,
                            startVelocity: 30,
                        origin: {
                            spread: 360,
                            x: Math.random(),
                            origin: {
                            y: Math.random() - .2
                                x: Math.random(),
                        },
                                y: Math.random() - .2
                        disableForReducedMotion: true
                            },
                    });
                            disableForReducedMotion: true
           
                        });
                    await new Promise(r => setTimeout(r, 1000));
               
                 }
                        await new Promise(r => setTimeout(r, 1000));
                    }
                 });
             }
             }
         }
         }
     }
     }

Revision as of 22:09, 15 November 2024

async function blast() {
        if (window.location.href.includes("Half-Life_2")) {
            const date = new Date();
    
            if (date.getFullYear() === 2024 && date.getMonth() === 10 && date.getDate() === 16) {
                waitFor("confetti", function() {
                    for (let i = 1; i < 15; i++) {
                        confetti({
                            particleCount: 100,
                            startVelocity: 30,
                            spread: 360,
                            origin: {
                                x: Math.random(),
                                y: Math.random() - .2
                            },
                            disableForReducedMotion: true
                        });
                
                        await new Promise(r => setTimeout(r, 1000));
                    }
                });
            }
        }
    }