Current Local Date

Shows current date in a slim overlay

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

ستحتاج إلى تثبيت إضافة مثل Stylus لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتتمكن من تثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

ستحتاج إلى تثبيت إضافة لإدارة أنماط المستخدم لتثبيت هذا النمط.

(لدي بالفعل مثبت أنماط للمستخدم، دعني أقم بتثبيته!)

// ==UserScript==
// @name         Current Local Date
// @version      1.5
// @description  Shows current date in a slim overlay
// @author       You
// @match        *://deadshot.io/*
// @grant        none
// @license MIT
// @namespace https://greasyfork.org/users/1527574
// ==/UserScript==

(function() {
    'use strict';


    const overlayStyle = `
    #metricOverlay {
        position: fixed;
        top: 7px;  /* 7 pixels from top */
        left: 7px; /* 7 pixels from left */
        background: rgba(0, 0, 0, 0.6);
        padding: 7px 12px;
        border-radius: 6px;
        color: #fff;
        border: 2px solid #fff;  /* White border */
        z-index: 100000;
        font-size: 15px;
        white-space: nowrap;
        display: flex;
        flex-direction: column;
        visibility: hidden; /* Start hidden */
    }`;

    const styleElement = document.createElement("style");
    styleElement.type = "text/css";
    styleElement.innerText = overlayStyle;
    document.head.appendChild(styleElement);

    const metricOverlay = document.createElement('div');
    metricOverlay.id = 'metricOverlay';
    metricOverlay.innerText = 'Initializing metrics...';
    document.body.appendChild(metricOverlay);


    setInterval(() => {
        const currentDate = new Date().toLocaleDateString();
        metricOverlay.innerHTML = `Date: ${currentDate}`;

        // Make the overlay visible after the first update
        metricOverlay.style.visibility = 'visible';
    }, 1800000);

    // Run the update immediately on load
    const initialDate = new Date().toLocaleDateString();
    metricOverlay.innerHTML = `Date: ${initialDate}`;
    metricOverlay.style.visibility = 'visible';

})();