Greasy Fork is available in English.

halloween timer 2.0

Affiche le temps restant jusqu'à Halloween

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

You will need to install an extension such as Tampermonkey to install this script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name         halloween timer 2.0
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  Affiche le temps restant jusqu'à Halloween
// @author       Elfen_lied + Porn
// @icon         https://image.noelshack.com/fichiers/2022/40/4/1665057946-jesuscitrouillerevenantgentil.png
// @grant        none
// @match        https://onche.org/forum/*
// @match        https://onche.org/topic/*
// @require https://code.jquery.com/jquery-3.6.0.min.js
// @run-at document-start
// @license      GNU GPLv3
// ==/UserScript==

    //cree nouvel element
    $("#right").append($('<div class="bloc border hallorange"><div class="title halloweentitle">Timer Halloween </div><div class="content links pink"><a class="halloween">zebi</a></div></div></div>'))
    $('.halloweentitle').css('color', '#ff9900')
    $('head').append('<style>.bloc.border.hallorange:before{background: #ff9900;}</style>');

    // Timer Halloween
(function timer() {
    const currentYear = new Date().getFullYear();
    const halloweenDate = new Date(currentYear, 9, 31);
    const timeUntilHalloween = halloweenDate - $.now();
    $(".halloween")[0].innerText = `${Math.floor(timeUntilHalloween / (1000 * 60 * 60 * 24))}j, ${Math.floor((timeUntilHalloween % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60))}h, ${Math.floor((timeUntilHalloween % (1000 * 60 * 60)) / (1000 * 60))}min, ${Math.floor((timeUntilHalloween % (1000 * 60)) / 1000)}s`;
    setTimeout(timer, 1000);
})();


//Image Citrouille

$('<img />').attr('src', "https://image.noelshack.com/fichiers/2022/40/4/1665057946-jesuscitrouillerevenantgentil.png").width('25px').height('20px').appendTo($('.halloweentitle'));