List of user reviews and ratings for YYYY-MM-DD Github
Total ratings
4.00
(Rating count:
1)
User reviews
Recent rating average:
4.00
All time rating average:
4.00
Rating filters
5 star 4 star
3 star
2 star
1 star
Date | Author | Rating | Comment |
---|---|---|---|
2024-08-06 | VoidsShadow | Version 1.0.0 of this extension is a single script. It could very well be distributed as a cross-browser UserScript in addition to per-browser extensions. I would like it if I could set a preference for a full date-time format such as ${YYYY}-${MM}-${DD}T${hh}:${mm}:${ss}(+/-)${TZ}. https://ijmacd.github.io/rfc3339-iso8601/ For those with security concerns... The script loops through the DOM "relative-time" elements. These elements have a "datetime" attribute with an RFC3339 and ISO-8601 compliant date-time string e.g. 2024-08-05T14:51:54-07:00. The script simply grabs the first ten characters from this string, prepends "at ", and *replaces* the relative-time element the `at ${date}`. Because pages often load asynchronously, the above loop is executed again in a `for` loop with an incrementally increasing timeout. I wonder why Serdar Sanli used a loop instead of Event hooks e.g. ```js if (document.readyState === "loading") { // Loading hasn't finished yet document.addEventListener("DOMContentLoaded", doit); } else { // `DOMContentLoaded` has already fired doit(); } ``` However, there's no event for when content is changed by scripts *after* DOMContentLoaded. From what I'm reading on StackOverflow, a [MutationObserver](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver) would handle this scenario. |