Last active
July 10, 2025 21:14
-
-
Save ramblingflan/43fe315151d643855f25e72e7b1719a9 to your computer and use it in GitHub Desktop.
Bluesky Full Timestamps on Feed
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
| // ==UserScript== | |
| // @name Bluesky Full Timestamps | |
| // @namespace https://github.com/ramblingflan | |
| // @version 1.2.2 | |
| // @description Show full date/time on Bluesky posts and notifications instead of the vague "2h ago" stuff. | |
| // @author ramblingflan (https://ramblingflan.bsky.social/) | |
| // @match https://bsky.app/* | |
| // @grant none | |
| // ==/UserScript== | |
| (() => { | |
| const isDatetimeString = (text) => { | |
| return text.match(/\d{4}\D*\d{1,2}[:.]\d{2}\s*(AM|PM)?/i) | |
| } | |
| const tweakTimestamp = (el, fullText) => { | |
| el.textContent = fullText; | |
| el.style.fontSize = '0.85rem'; | |
| el.style.fontWeight = '500'; | |
| el.dataset.fullTimestampApplied = '1'; | |
| }; | |
| const updateTimestamps = (root = document) => { | |
| const nodes = root.querySelectorAll('a[href*="/post/"][data-tooltip], span[data-tooltip]:not(:has(*))'); | |
| nodes.forEach(node => { | |
| if (node.dataset.fullTimestampApplied) return; | |
| const full = node.getAttribute('data-tooltip'); | |
| if (!full) return; | |
| if (isDatetimeString(full) && node.textContent !== full) { | |
| tweakTimestamp(node, full); | |
| } | |
| }); | |
| }; | |
| // Initial sweep | |
| updateTimestamps(); | |
| // Keep checking for new stuff as you scroll | |
| const observer = new MutationObserver(muts => { | |
| for (const mut of muts) { | |
| mut.addedNodes.forEach(node => { | |
| if (node.nodeType === Node.ELEMENT_NODE) { | |
| updateTimestamps(node); | |
| } | |
| }); | |
| } | |
| }); | |
| observer.observe(document.body, { childList: true, subtree: true }); | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment