MediaWiki:EthTime.js: Difference between revisions
Jump to navigation
Jump to search
No edit summary Tag: Reverted |
No edit summary Tag: Reverted |
||
| Line 4: | Line 4: | ||
var ethTimeLinkedDiv = document.getElementById('eth-time-linked'); | var ethTimeLinkedDiv = document.getElementById('eth-time-linked'); | ||
const now = new Date(); | const now = new Date(); | ||
var result = | var result = ethTimeExact(now); | ||
result *= 100; | result *= 100; | ||
result = Math.round(result); | result = Math.round(result); | ||
Revision as of 12:57, 6 October 2025
importScript('MediaWiki:Util.js');
$(function () {
var ethTimeDiv = document.getElementById('eth-time');
var ethTimeLinkedDiv = document.getElementById('eth-time-linked');
const now = new Date();
var result = ethTimeExact(now);
result *= 100;
result = Math.round(result);
result /= 100;
try {
if (ethTimeDiv.innerHTML != null) ethTimeDiv.innerHTML = result + "Ð";
}
catch (error) {
try {
if (ethTimeLinkedDiv.innerHTML != null) ethTimeLinkedDiv.innerHTML = result +
"<a href=\"https://thorildsby.com/index.php?title=%C4%90-Time\">Ð</a>";
}
catch (error2) {
//LOL
}
}
}());