@@ -161,11 +161,13 @@ document.addEventListener('DOMContentLoaded', () => {
161161 } ) ;
162162
163163 function handleHashChange ( ) {
164- const path = window . location . hash . substring ( 1 ) ;
164+ const hash = window . location . hash . substring ( 1 ) ;
165+ // Split hash into path and query string
166+ const [ path , queryString ] = hash . split ( '?' ) ;
165167 const toolLink = sidebarLinks . find ( link => link . dataset . path === path ) ;
166168
167169 if ( toolLink ) {
168- loadTool ( toolLink . dataset . filePath , toolLink ) ;
170+ loadTool ( toolLink . dataset . filePath , toolLink , queryString ) ;
169171 toolCards . style . display = 'none' ;
170172 toolFrame . style . display = 'block' ;
171173 } else {
@@ -176,9 +178,11 @@ document.addEventListener('DOMContentLoaded', () => {
176178 }
177179 }
178180
179- function loadTool ( filePath , clickedLink ) {
181+ function loadTool ( filePath , clickedLink , queryString ) {
180182 if ( filePath && typeof filePath === 'string' && filePath . trim ( ) !== '' ) {
181- toolFrame . src = filePath ;
183+ // Append query string if present
184+ const fullPath = queryString ? `${ filePath } ?${ queryString } ` : filePath ;
185+ toolFrame . src = fullPath ;
182186 sidebarLinks . forEach ( link => link . classList . remove ( 'active' ) ) ;
183187 if ( clickedLink ) {
184188 clickedLink . classList . add ( 'active' ) ;
0 commit comments