Skip to content

Instantly share code, notes, and snippets.

@cpuschma
Last active April 16, 2020 15:56
Show Gist options
  • Save cpuschma/7a628ac833b686c6fde2bdf609a76aa6 to your computer and use it in GitHub Desktop.
Save cpuschma/7a628ac833b686c6fde2bdf609a76aa6 to your computer and use it in GitHub Desktop.
Lernsax sekunden genau
(() => {
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