twitter_full_tarih

Bu script tweetlerdeki relative zamanı normal tarihe çevirir.

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

You will need to install an extension such as Tampermonkey to install this script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name         twitter_full_tarih
// @namespace    http://tampermonkey.net/
// @version      1.1
// @description  Bu script tweetlerdeki relative zamanı normal tarihe çevirir.
// @author       [email protected]
// @match        https://twitter.com/*
// @grant        none
// ==/UserScript==


$(document).ready(function() {
    basla();
});


function basla(){
    $(".js-relative-timestamp").each(function(){
        timestamp = $(this).attr("data-time");
        full_tarih = timeConverter(timestamp);
        yazilacaklar = " <span id='full_tarih' title='" + timestamp + "'>" + full_tarih + "</span>";

        $(this).parent().append(yazilacaklar);

    });
}

function timeConverter(UNIX_timestamp){
  var a = new Date(UNIX_timestamp * 1000);
  var months = ['Ocak','Şubat','Mart','Nisan','Mayıs','Haziran','Temmuz','Ağustos','Eylül','Ekim','Kasım','Aralık'];
  var year = a.getFullYear();
  var month = months[a.getMonth()];
  var date = a.getDate();
  var hour = a.getHours();
  var min = a.getMinutes();
  var sec = a.getSeconds();
  //var time = date + ' ' + month + ' ' + year + ' ' + hour + ':' + min + ':' + sec ;
  var time = date + ' ' + month + ' ' + ' ' + hour + ':' + min + ':' + sec ;
  return time;
}