Last active
April 29, 2023 13:59
-
-
Save bmidgley/5d626f62252cf169bbb896838b8e2ca7 to your computer and use it in GitHub Desktop.
create as a bookmarklet and run it to show real times on a github page -- why does github hide times??
This file contains hidden or 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
javascript:(function() { | |
document.querySelectorAll("relative-time").forEach(function(el) { | |
var parent = el.parentNode; | |
var timestamp = el.title; | |
var span = document.createElement("span"); | |
span.innerHTML = timestamp.replace(/20\d\d, /,""); | |
parent.removeChild(el); | |
parent.appendChild(span); | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I had to remove the year because the time is too long to fit some fields