osu! disable timeago

disable timeago and use local time. Suwako's request.

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name           osu! disable timeago
// @description    disable timeago and use local time. Suwako's request.
// @author         JebwizOscar
// @icon           http://osu.ppy.sh/favicon.ico
// @include        http://osu.ppy.sh/*
// @include        https://osu.ppy.sh/*
// @version        0.1u
// @namespace https://greasyfork.org/users/3079
// ==/UserScript=====
function loadInCurrentTab(page)
{
    if(activeRequest) {
        activeRequest.abort();
    }
    activeRequest = $.get(page, null, function(text){
        activeRequest = null;
        
        $("#" + activeTab).html(text);
        $("#" + activeTab).stop(true,true).fadeTo(50,1,function() {    $("#" + activeTab).css('filter', 'none'); });
        $("#" + activeTab).addClass("loaded");
        $(".timeago").removeClass('timeago').addClass('timeago_');
        $('.timeago_').each(function(){$(this).html((new Date(Date.parse($(this).attr('title')))).Format("yyyy-MM-dd hh:mm:ss"))});
    });
}
Date.prototype.Format = function(fmt) 
{ //author: meizz 
  var o = { 
    "M+" : this.getMonth()+1,
    "d+" : this.getDate(),
    "h+" : this.getHours(),
    "m+" : this.getMinutes(),
    "s+" : this.getSeconds(),
  }; 
  if(/(y+)/.test(fmt)) 
    fmt=fmt.replace(RegExp.$1, (this.getFullYear()+"").substr(4 - RegExp.$1.length)); 
  for(var k in o) 
    if(new RegExp("("+ k +")").test(fmt)) 
  fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length))); 
  return fmt; 
}
 
script = document.createElement("script");
script.innerHTML = loadInCurrentTab;
document.body.appendChild(script);
$(".timeago").removeClass('timeago').addClass('timeago_');
$('.timeago_').each(function(){$(this).html((new Date(Date.parse($(this).attr('title')))).Format("yyyy-MM-dd hh:mm:ss"))});
$( document ).ajaxComplete(function( event, xhr, settings ) {
    $(".timeago").removeClass('timeago').addClass('timeago_');
    $('.timeago_').each(function(){$(this).html((new Date(Date.parse($(this).attr('title')))).Format("yyyy-MM-dd hh:mm:ss"))});
});