Non-relative Workflow Time

Appends the actual DateTime to GitHub workflows

目前为 2023-02-10 提交的版本。查看 最新版本

// ==UserScript==
// @name         Non-relative Workflow Time
// @namespace    CMG
// @version      0.1
// @description  Appends the actual DateTime to GitHub workflows
// @author       Ned Wilbur
// @match        https://github.com/**/actions/workflows/*.yaml
// @icon         https://www.google.com/s2/favicons?sz=64&domain=github.com
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    displayDateTime();

    // Attach change listener
    for (const row of document.querySelectorAll('.js-updatable-content')) {
        time.addEventListener('socket:message', displayDateTime)
    }
})();


function displayDateTime() {
    for (const time of document.querySelectorAll('relative-time')) {
        time.shadowRoot.innerHTML = time.shadowRoot.innerHTML + '<br>' + time.getAttribute('title')
    }
}

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址