@@ -79,16 +79,16 @@ window.document.addEventListener("DOMContentLoaded", function (_event) {
7979 atob ( categoryEl . getAttribute ( "data-category" ) )
8080 ) ;
8181 categoryEl . onclick = ( e ) => {
82- // Allow holding Ctrl/ Cmd key for multiple selection
83- // Clear other selections if not using Ctrl/Cmd
82+ // Allow holding Ctrl (Windows/Linux) or Cmd (macOS) for multiple selection
83+ // Clear other selections if not using modifier key
8484 if ( ! e . ctrlKey && ! e . metaKey ) {
8585 selectedCategories . clear ( ) ;
8686 }
8787
8888 // If this would deselect the last category, ensure default category remains selected
8989 if ( selectedCategories . has ( category ) ) {
9090 selectedCategories . delete ( category ) ;
91- if ( selectedCategories . size === 1 ) {
91+ if ( selectedCategories . size === 0 ) {
9292 selectedCategories . add ( kDefaultCategory ) ;
9393 }
9494 } else {
@@ -112,20 +112,6 @@ window.document.addEventListener("DOMContentLoaded", function (_event) {
112112 setCategoryHash ( ) ;
113113 } ;
114114 }
115-
116- // Process any existing hash for multiple categories
117- const hash = getHash ( ) ;
118- if ( hash && hash . category ) {
119- const cats = hash . category . split ( "," ) ;
120- for ( const cat of cats ) {
121- if ( cat ) selectedCategories . add ( decodeURIComponent ( cat ) ) ;
122- }
123- updateCategory ( ) ;
124- } else {
125- // No hash at all, use default category
126- selectedCategories . add ( kDefaultCategory ) ;
127- updateCategory ( ) ;
128- }
129115} ) ;
130116
131117function toggleNoMatchingMessage ( list ) {
0 commit comments