ISO Formatted Time/Date for Github & StackOverflow

Change time/date to ISO format for Github and stackoverflow websites.

< Valutazione su ISO Formatted Time/Date for Github & StackOverflow

Recensione: Male - lo script non funziona

§
Pubblicato: 09/10/2024
Modificato: 09/10/2024

replaceTime 函数替换为如下来可以修复当前bug

Update replaceTime function to fix bug

    function replaceTime(){
        var time_list = document.querySelectorAll("relative-time");
        time_list.forEach(function(ele) {
            console.log(ele);
            let t = new Date(ele.title);
            let t_str = t.toLocaleString();
            ele.title = t_str;
        })
    }

Pubblica risposta

Accedi per pubblicare una risposta.