Add Time

Add TCT to all pages

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

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

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==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()