-
-
Save hyper-neutrino/53ef6e1f48fea9d5a5daeb27e6422b42 to your computer and use it in GitHub Desktop.
SE Chat - UTC Clock Userscript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Chat UTC Clock | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description UTC Clock for Stack Exchange Chat | |
// @author hyper-neutrino | |
// @match https://chat.stackexchange.com/rooms/* | |
// @match https://chat.meta.stackexchange.com/rooms/* | |
// @match https://chat.stackoverflow.com/rooms/* | |
// @match https://chat.stackexchange.com/transcript/* | |
// @match https://chat.meta.stackexchange.com/transcript/* | |
// @match https://chat.stackoverflow.com/transcript/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
let clock = $("<span id='utcclock'>"); | |
let tritem = $("#info>.noprint>.msg-small"); | |
$("#chat-buttons").append(clock); | |
clock.css("background-color", "#00000088"); | |
clock.css("color", "white"); | |
clock.css("padding", "4px 6px"); | |
clock.css("margin", "5px 0"); | |
clock.css("border-radius", "5px"); | |
setInterval(function() { | |
clock.html(new Date().toUTCString()); | |
tritem.html("all times are UTC. It is currently " + new Date().toUTCString()); | |
}, 500); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment