Last active
April 16, 2020 15:56
-
-
Save cpuschma/7a628ac833b686c6fde2bdf609a76aa6 to your computer and use it in GitHub Desktop.
Lernsax sekunden genau
This file contains 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
(() => { | |
const doc = window.document.querySelector("iframe").contentDocument || window.document; | |
for (const entry of doc.querySelectorAll(".c_c_date")) { | |
if (typeof entry.attributes.sort !== "undefined") { | |
const originalText = entry.innerHTML, | |
createdAt = new Date(0); | |
createdAt.setUTCSeconds(entry.attributes.sort.value); | |
entry.innerHTML = `${createdAt.toLocaleDateString()} ${createdAt.toLocaleTimeString()}` + entry.innerHTML.substring(16); | |
} | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment