Giter Site home page Giter Site logo

Comments (4)

zdrzdr avatar zdrzdr commented on July 19, 2024

应该是汉化的了,但是好像正则功能坏掉了

from github-i18n-plugin.

Alice0000000 avatar Alice0000000 commented on July 19, 2024

同求

from github-i18n-plugin.

itodouble avatar itodouble commented on July 19, 2024

我写了个 不好的话 不要介意

// ==UserScript==
// @name         github-datetime-format
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        https://github.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=github.com
// @grant        none
// @require      https://cdn.bootcdn.net/ajax/libs/jquery/3.6.4/jquery.min.js
// @require      http://momentjs.cn/downloads/moment.min.js
// @run-at       document-idle
// ==/UserScript==

(function() {
    'use strict';
    function formatGithubDateTime(){
        var timeHeader = $('.Box-header relative-time');
        timeHeader.parent().html(fromatDateTime(timeHeader.attr('datetime')));
        var items = $('.js-details-container div relative-time');
        items.each(function() {
            $(this).parent().html(fromatDateTime($(this).attr('datetime')));
        });
        $('.js-details-container div .text-right').css('width', '');
    }
    function fromatDateTime(dateTime){
        var appendHtml = '<time title="'+moment(dateTime).fromNow()+'">'+moment(dateTime).format('YYYY-MM-DD HH:mm:ss')+'</time>';
        return appendHtml;
    }
    formatGithubDateTime();

})();


from github-i18n-plugin.

k1995 avatar k1995 commented on July 19, 2024

已优化,请更新最新版本

from github-i18n-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.