NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name MeFi comment numbering // @namespace http://www.metafilter.com/ // @description Numbers comments - handy in longboat threads. (cosmetic update from the original http://userscripts-mirror.org/scripts/review/24902) // @include http://*.metafilter.com/* // @include http://metafilter.com/* // A modified version of MatthewR's original http://userscripts-mirror.org/scripts/review/24902 // ==/UserScript== if (/.*metafilter\.com\/(\d{1,7}\/|mefi\/|comments\.mefi).*/.test(window.location)) { var elements = document.evaluate('//div/span[@class="smallcopy"]/parent::node()',document,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null); for (var i=1,element;(element = elements.snapshotItem(i));i++) { var count = document.createElement("span"); count.setAttribute("style","font-size:10px;position:absolute;left:-20px;top:5px;"); count.innerHTML = i; element.insertBefore(count,element.childNodes[0]); } }