// ==UserScript== // @name florr.io magic/shiny firefly timer // @namespace http://tampermonkey.net/ // @version 2.4.18 // @description it tells you, visually // @author Kosuken // @match https://florr.io/* // @grant none // @license MIT // @downloadURL none // ==/UserScript== (function () { 'use strict'; // shit const timerBox = document.createElement('div'); timerBox.id = 'mff-timer'; timerBox.style.position = 'fixed'; timerBox.style.top = '20px'; timerBox.style.left = '20px'; timerBox.style.padding = '10px'; timerBox.style.backgroundColor = 'rgba(119, 234, 249, 0.8)'; timerBox.style.color = 'white'; timerBox.style.textShadow = '1px 1px 0 black, -1px 1px 0 black, 1px -1px 0 black, -1px -1px 0 black'; timerBox.style.fontFamily = '"Ubuntu", sans-serif'; timerBox.style.fontWeight = 'bold'; timerBox.style.border = '5px solid rgba(96, 190, 202, 0.5)'; timerBox.style.borderRadius = '8px'; timerBox.style.zIndex = '10000'; timerBox.style.cursor = 'move'; document.body.appendChild(timerBox); let eventNow = false; let eventEndsTimeout; function updateTimer() { const intv = 4732; const startT = 0; // Tnow = time now const Tnow = Math.floor(Date.now() / 1000); // next time and sex left const nextT = startT + (Math.floor((Tnow - startT) / intv) + 1) * intv; const secsLeft = nextT - Tnow; if (secsLeft >= intv) { // show the end countdown if (!eventNow) { eventNow = true; let eventLength = 60; eventEndsTimeout = setInterval(() => { timerBox.innerHTML = `