Here's the working tampermonkey script (copy the entire green part and paste it in tampermonkey (browser extension)
// ==UserScript==
// [@name](/u/name) relative dates
// [@namespace](/u/namespace) http://tampermonkey.net/
// [@version](/u/version) 0.1
// [@description](/u/description) convert abs to rel dates
// [@author](/u/author) AOU
// [@match](/u/match) https://poal.co/*
// [@grant](/u/grant) none
// ==/UserScript==
(function updateTimestamps() {
'use strict';
var myTimes = document.getElementsByClassName('mytime');
for(var i=0; i<myTimes.length; i++) {
var time = myTimes[i];
var datetimeStringOld = time.getAttribute('datetime');
var dateSeconds = Date.parse(datetimeStringOld);
var date = new Date(dateSeconds);
var localString = date.toLocaleString();
time.innerHTML = localString;
}
var timerVar = setInterval( function(){ updateTimestamps() }, 5000);
})();
Just saw this now, was AFK for a bit. And holy shit, it works like the proverbial charm.
That's really cool. Thank you for the time!
Cheers!
(post is archived)