@@ -9,11 +9,11 @@ class TableLinked {
99 this . submetric = '' ; // TODO: Fetch the default one from somewhere
1010 this . data = data ;
1111 this . dataArray = [ ] ;
12- this . selectedTechs = this . getTechsFromURL ( ) ?. split ( ',' ) || [ ] ;
12+ this . selectedTechs = DataUtils . getTechsFromURL ( ) ?. split ( ',' ) || [ ] ;
1313 this . rows = filters . rows || 10 ;
1414
1515 this . updateContent ( ) ;
16- this . updateSelectionText ( this . getTechsFromURL ( ) ) ;
16+ this . updateSelectionText ( DataUtils . getTechsFromURL ( ) ) ;
1717
1818 const rowCount = document . getElementById ( 'rowsPerPage' ) ;
1919 rowCount ?. addEventListener ( 'change' , ( e ) => this . updateRowsPerPage ( e ) ) ;
@@ -35,8 +35,6 @@ class TableLinked {
3535
3636 this . dataArray = this . dataArray . filter ( row => row . length > 0 ) ;
3737
38- console . log ( 'set content' , content , this . dataArray ) ;
39-
4038 const isContent = content ?. length > 0 || this . dataArray ?. length > 0 ;
4139
4240 if ( tbody && isContent ) {
@@ -159,11 +157,6 @@ class TableLinked {
159157 }
160158 }
161159
162- getTechsFromURL ( ) {
163- const url = new URL ( window . location ) ;
164- return url . searchParams . get ( 'selected' ) || null ;
165- }
166-
167160 addColumnCheckbox ( app ) {
168161 const cell = document . createElement ( 'td' ) ;
169162 const formattedApp = DataUtils . formatAppName ( app ) ;
@@ -192,7 +185,7 @@ class TableLinked {
192185
193186 // Set selected content
194187 isTechSelected ( app ) {
195- const urlSelected = this . getTechsFromURL ( ) ;
188+ const urlSelected = DataUtils . getTechsFromURL ( ) ;
196189 return urlSelected ?. includes ( app ) || false ;
197190 }
198191
@@ -243,7 +236,8 @@ class TableLinked {
243236 updateURL ( param , value ) {
244237 const url = new URL ( window . location ) ;
245238 url . searchParams . set ( param , value ) ;
246- window . history . replaceState ( null , null , url ) ;
239+ const styledUrl = url . href . replaceAll ( '%2C' , ',' ) ;
240+ window . history . replaceState ( null , null , styledUrl ) ;
247241 }
248242
249243 updateSelectionText ( allSelectedApps ) {
0 commit comments