Greasy Fork is available in English.

GitLab - show absolute timestamps

Replaces relative GitLab timestamps with their full title

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         GitLab - show absolute timestamps
// @namespace    https://gitlab.com/
// @version      1.0
// @description  Replaces relative GitLab timestamps with their full title
// @match        https://gitlab.com/*
// @grant        none
// @license      CC0-1.0
// ==/UserScript==
(function () {
    'use strict';

    function replaceTimes(root = document) {
        root.querySelectorAll('time[title]').forEach(time => {
            const title = time.getAttribute('title');

            if (title && time.textContent !== title) {
                time.textContent = title;
            }
        });
    }

    // Elementy obecne przy załadowaniu strony
    replaceTimes();

    // Elementy dodawane dynamicznie przez GitLaba
    const observer = new MutationObserver(mutations => {
        for (const mutation of mutations) {
            for (const node of mutation.addedNodes) {
                if (node.nodeType !== Node.ELEMENT_NODE) {
                    continue;
                }

                if (node.matches && node.matches('time[title]')) {
                    node.textContent = node.getAttribute('title');
                }

                replaceTimes(node);
            }
        }
    });

    observer.observe(document.body, {
        childList: true,
        subtree: true
    });
})();