Talk:Gaia/Meeting Notes
From MozillaWiki
Meeting Notes Reverse Order Suggestion and Scrachpad
Just in case the team members would also find most-recently-first meeting lists more accessible, here is a scratchpad script which makes it easy to replace a textarea selection with a reverse-ordered list via scratchpad.
// markdown-sort-iso-date-list-items-reverse.js // by Maybe // Sort meeting notes unordered list items in wiki textarea selection in reverse order. // Select unordered list item lines in a wiki textarea. // Use Execute->Display (Ctrl+L) in Scratchpad containing this code snippet. // Copy/paste back over wiki textarea selection. if (document.activeElement) { if (document.activeElement.selectionStart != document.activeElement.selectionEnd) { var txt = document.activeElement.value.substring(document.activeElement.selectionStart, document.activeElement.selectionEnd); txt.match(/[-\*]\s+.+\b(\d{4}-\d\d-\d\d)\].+\s/g).sort(function (a, b) { return b.localeCompare(a); }).join(''); } else { window.alert('Please select unordered list item lines first...'); } }