Add Time

Add TCT to all pages

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği yüklemek için Tampermonkey gibi bir uzantı yüklemeniz gerekir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği indirebilmeniz için ayrıca Tampermonkey gibi bir eklenti kurmanız gerekmektedir.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

Bu stili yüklemek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için Stylus gibi bir uzantı kurmanız gerekir.

Bu stili yükleyebilmek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı kurmanız gerekir.

Bu stili yükleyebilmek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name         Add Time
// @namespace    http://tampermonkey.net/
// @version      0.5
// @description  Add TCT to all pages
// @author       Mist3rM [2154120] & hannes3510 [2150804] 
// @match        https://www.torn.com/*
// @grant        GM_addStyle
// Special thanks to Hannes3510 for helping me with the auto refresh; CroWtheGreat for assisting with the CSS; Mauk with the new code removing JQuery
// ==/UserScript==

GM_addStyle(`
	.add-time-display {
		padding: 0 20px;
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%
        font-size: 12pt;
        font-weight: bold;
        font-color: white;
	}
`)

const format = (date) => date.toISOString().slice(11, 19)
const display = (date = new Date()) => `Current Torn Time: ${format(date)}`

const target = document.createElement('time')
target.classList.add('header-bottom-text', 'add-time-display')

document.querySelector('.header-wrapper-bottom').appendChild(target)

const update = () => target.textContent = display()

setInterval(update, 1000)
update()