Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Reddit - Timestamp
- // @author gavin19
- // @description Show timestamp in the user bar
- // @match http://*.reddit.com/*
- // @include http://*.reddit.com/*
- // @version 0.1
- // ==/UserScript==
- if(!!document.querySelector('.pref-lang')){
- var timeStamp = document.createElement('span'),
- userBar = document.querySelector('#header-bottom-right'),
- prefLang = document.querySelector('#header-bottom-right .flat-list'),
- dt = new Date(),
- hn = dt.getHours(),
- mn = dt.getMinutes();
- if(hn.toString().length === 1)hn = "0"+hn;
- if(mn.toString().length === 1)mn = "0"+mn;
- timeStamp.textContent = hn+":"+mn+" | ";
- userBar.insertBefore(timeStamp,prefLang);
- }
Add Comment
Please, Sign In to add comment