Ставим расширение Tampermonkey (кликабельно) Удаляем стандартный текст, вставляем мой. *время по МСК* // ==UserScript== // @name Новогодний таймер на Форуме // @author stealyourbrain // @match https://zelenka.guru/* // ==/UserScript== (function () { 'use strict'; const countdownTimer = document.createElement('div'); countdownTimer.id = 'ny-timer'; document.body.appendChild(countdownTimer); const newYearDate = new Date('January 1, 2024 00:00:00 GMT+03:00'); function updateTimer() { const currentDate = new Date(); const timeDiff = newYearDate - currentDate; const days = Math.floor(timeDiff / (1000 * 60 * 60 * 24)); const hours = Math.floor((timeDiff % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); const minutes = Math.floor((timeDiff % (1000 * 60 * 60)) / (1000 * 60)); const seconds = Math.floor((timeDiff % (1000 * 60)) / 1000); countdownTimer.innerHTML = ` <div class="ny-timer-block"> <span class="ny-timer-number">${days}</span> <span class="ny-timer-label">дней</span> </div> <div class="ny-timer-block"> <span class="ny-timer-number">${hours}</span> <span class="ny-timer-label">часов</span> </div> <div class="ny-timer-block"> <span class="ny-timer-number">${minutes}</span> <span class="ny-timer-label">минут</span> </div> <div class="ny-timer-block"> <span class="ny-timer-number">${seconds}</span> <span class="ny-timer-label">секунд</span> </div> `; } const styles = ` #ny-timer { position: fixed; bottom: 100px; right: 1px; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; display: flex; background-color: #333; padding: 5px; border-radius: 5px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); } .ny-timer-block { margin-right: 10px; text-align: center; color: #fff; } .ny-timer-number { font-size: 12px; font-weight: bold; } .ny-timer-label { font-size: 8px; } `; const styleSheet = document.createElement('style'); styleSheet.type = 'text/css'; styleSheet.innerText = styles; document.head.appendChild(styleSheet); setInterval(updateTimer, 1000); updateTimer(); })(); JS // ==UserScript== // @name Новогодний таймер на Форуме // @author stealyourbrain // @match https://zelenka.guru/* // ==/UserScript== (function () { 'use strict'; const countdownTimer = document.createElement('div'); countdownTimer.id = 'ny-timer'; document.body.appendChild(countdownTimer); const newYearDate = new Date('January 1, 2024 00:00:00 GMT+03:00'); function updateTimer() { const currentDate = new Date(); const timeDiff = newYearDate - currentDate; const days = Math.floor(timeDiff / (1000 * 60 * 60 * 24)); const hours = Math.floor((timeDiff % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); const minutes = Math.floor((timeDiff % (1000 * 60 * 60)) / (1000 * 60)); const seconds = Math.floor((timeDiff % (1000 * 60)) / 1000); countdownTimer.innerHTML = ` <div class="ny-timer-block"> <span class="ny-timer-number">${days}</span> <span class="ny-timer-label">дней</span> </div> <div class="ny-timer-block"> <span class="ny-timer-number">${hours}</span> <span class="ny-timer-label">часов</span> </div> <div class="ny-timer-block"> <span class="ny-timer-number">${minutes}</span> <span class="ny-timer-label">минут</span> </div> <div class="ny-timer-block"> <span class="ny-timer-number">${seconds}</span> <span class="ny-timer-label">секунд</span> </div> `; } const styles = ` #ny-timer { position: fixed; bottom: 100px; right: 1px; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; display: flex; background-color: #333; padding: 5px; border-radius: 5px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); } .ny-timer-block { margin-right: 10px; text-align: center; color: #fff; } .ny-timer-number { font-size: 12px; font-weight: bold; } .ny-timer-label { font-size: 8px; } `; const styleSheet = document.createElement('style'); styleSheet.type = 'text/css'; styleSheet.innerText = styles; document.head.appendChild(styleSheet); setInterval(updateTimer, 1000); updateTimer(); })();
Шейх, думаю просто эту строчку const newYearDate = new Date('January 1, 2024 00:00:00 GMT+03:00'); меняешь и всё на свою дату
В данной теме вы найдёте все дополнения сделанные мной. *тема будет обновляться* Как установить Tampermonkey ? 1. Переходим на сайт Tampermonkey 2. Находим блок загрузки и нажимаем "Перейти в магазин" 3. На открывшейся странице нажимаем "Установить" 4. Готово! Мои дополнения: Показ времени LOLZTEAM Установить Скрыть иконку чата Установить Кнопка "Бабло" (Быстрое открытие розыгрышей) Установить Скрипт для удобного ответа на вопросы в Тематических вопросах. Установить Красивый снежок на Форум + Маркет + Снеговик(отдельно) Установить (без снеговика) Установить (со снеговиком) *корректно работает только если браузер открыт на весь экран* Таймер с обратным отчётом до Нового Года *время по МСК* Установить Новогодный <title> Установить