File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -644,6 +644,7 @@ def escape_html(text):
644644 });
645645
646646 function sortRecent() {
647+ window.localStorage.setItem('index-sort', 'recent');
647648 specList.querySelectorAll('.group-header').forEach(function(h) { h.remove(); });
648649 specs.sort(function(a, b) {
649650 return parseInt(b.dataset.ts) - parseInt(a.dataset.ts);
@@ -657,6 +658,7 @@ def escape_html(text):
657658 }
658659
659660 function sortGrouped() {
661+ window.localStorage.setItem('index-sort', 'grouped');
660662 specList.querySelectorAll('.group-header').forEach(function(h) { h.remove(); });
661663 specs.sort(function(a, b) {
662664 var c = a.dataset.shortname.localeCompare(b.dataset.shortname);
@@ -685,6 +687,9 @@ def escape_html(text):
685687
686688 btnRecent.addEventListener('click', sortRecent);
687689 btnGrouped.addEventListener('click', sortGrouped);
690+ if (window.localStorage.getItem('index-sort') === 'grouped') {
691+ sortGrouped();
692+ }
688693
689694 // Mobile: tap spec header to expand/collapse (accordion)
690695 specs.forEach(function(el) {
You can’t perform that action at this time.
0 commit comments