// ==UserScript== // @name FB: full timestamps // @match https://www.facebook.com/* // @match https://*.facebook.com/* // @match http://www.facebook.com/* // @match http://*.facebook.com/* // @run-at document-start // @grant GM_addStyle // @author wOxxOm & JZersche // @require https://greasyfork.org/scripts/12228/code/setMutationHandler.js // @ require http://momentjs.com/downloads/moment.min.js // @version 1.18 // @namespace https://greasyfork.org/users/95175 // @description Shows full timestamps on Facebook posts // @downloadURL none // ==/UserScript== var options = { weekday: 'long', year: 'numeric', month: 'numeric', day: '2-digit' }; GM_addStyle( '.full-timestamp { opacity: 0.65; color: #59709c; }' + '.full-timestamp:hover { opacity: 1.0; }' + '.full-timestamp:before { content: ""; }' + '.full-timestamp:after { content: ""; }' + '.timestampContent {display: none; }' ); // process the already loaded portion of the page if any expandDates(document.querySelectorAll('abbr[data-utime]')); // process the stuff added from now on setMutationHandler(document, 'abbr[data-utime]', expandDates); function expandDates(nodes) { for (var i = 0, abbr; (abbr = nodes[i++]); ) { if (abbr.querySelector('.full-timestamp')) { // already processed continue; } abbr.insertAdjacentHTML('beforeend', ''+ abbr.title.substr(0, abbr.title.substr.length0) .replace(' at ','at · ') .replace('','