ISO Formatted Time/Date for Github & StackOverflow

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

< Părere la script-ul ISO Formatted Time/Date for Github & StackOverflow

Recenzie: Rau - script-ul nu merge

§
Postat în: 09-10-2024
Editat în: 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;
        })
    }

Postează un raspuns

Autentifică-te pentru a posta un răspuns.