Mediawiki:common.js

Вернуться

Строка 1767: Строка 1767:
     
     
    init: function() {
    init: function() {
        this.createTestButton();
        this.startTimeCheck();
        this.startTimeCheck();
    },
   
    createTestButton: function() {
        // Создаем кнопку для тестирования
        var button = document.createElement('button');
        button.id = 'fireworks-test-btn';
        button.textContent = '🎆 Тест фейерверков';
        button.style.cssText =
            'position: fixed;' +
            'bottom: 20px;' +
            'right: 20px;' +
            'z-index: 99999;' +
            'padding: 10px 15px;' +
            'background: #ff6b6b;' +
            'color: white;' +
            'border: none;' +
            'border-radius: 25px;' +
            'cursor: pointer;' +
            'font-size: 14px;' +
            'box-shadow: 0 4px 6px rgba(0,0,0,0.3);' +
            'transition: all 0.3s;';
       
        var self = this;
        button.addEventListener('mouseenter', function() {
            this.style.transform = 'scale(1.05)';
            this.style.boxShadow = '0 6px 8px rgba(0,0,0,0.4)';
        });
       
        button.addEventListener('mouseleave', function() {
            this.style.transform = 'scale(1)';
            this.style.boxShadow = '0 4px 6px rgba(0,0,0,0.3)';
        });
       
        button.addEventListener('click', function() {
            self.toggleFireworks();
        });
       
        document.body.appendChild(button);
    },
    },