Notandi:Obersachse/monobook.js
Athugaðu: Eftir útgáfu kann að vera að þú þurfir að komast hjá skyndiminni vafrans þíns til að sjá breytingarnar.
- Firefox / Safari: Haltu Shift samtímis og þú smellir á Endurhlaða (Reload), eða ýttu á annaðhvort Ctrl-F5 eða Ctrl-R (⌘-R á Mac)
- Google Chrome: Ýttu á Ctrl-Shift-R (⌘-Shift-R á Mac)
- Internet Explorer / Edge: Haltu Ctrl samtímis og þú smellir á Endurnýja (Refresh), eða ýttu á Ctrl-F5
- Opera: Farðu í Verkfæri (Tools) → Stillingar (Preferences) og svo Friðhelgi og öryggi (Privacy & security) → Hreinsa vafragögn (Clear browsing data) → Myndir og skrár í skyndiminni (Chached images and files)
function liveClock()
{
liveClock.node = mw.util.addPortletLink( 'p-personal', mw.config.get('wgServer') + mw.config.get('wgScriptPath') + '/index.php?title=' + encodeURIComponent(mw.config.get('wgPageName')) + '&action=purge', '', 'utcdate' )
if (!liveClock.node) return
liveClock.node.style.fontSize = 'larger'
liveClock.node.style.fontWeight = 'bolder'
showTime()
}
$(liveClock)
function showTime()
{
var dateNode = liveClock.node
if( !dateNode ) return
var now = new Date()
var hh = now.getUTCHours()
var mm = now.getUTCMinutes()
var ss = now.getUTCSeconds()
var time = ( hh < 10 ? '0' + hh : hh ) + ':' + ( mm < 10 ? '0' + mm : mm ) + ':' + ( ss < 10 ? '0' + ss : ss )
dateNode.firstChild.replaceChild( document.createTextNode( time ), dateNode.firstChild.firstChild )
window.setTimeout(showTime, 1000)
}