File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
src/Elastic.Documentation.Site/Assets Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -94,21 +94,24 @@ document.body.addEventListener('htmx:responseError', function (event) {
9494
9595// We add a query string to the get request to make sure the requested page is up to date
9696const docsBuilderVersion = $ ( 'body' ) . dataset . docsBuilderVersion
97- document . body . addEventListener ( 'htmx:configRequest' , function ( event ) {
97+ document . body . addEventListener ( 'htmx:configRequest' , function ( event ) {
9898 if ( event . detail . verb === 'get' ) {
99- event . detail . parameters [ 'v' ] = docsBuilderVersion ;
99+ event . detail . parameters [ 'v' ] = docsBuilderVersion
100100 }
101- } ) ;
101+ } )
102102
103103// Here we need to strip the v parameter from the URL so
104104// that the browser doesn't show the v parameter in the address bar
105105document . body . addEventListener ( 'htmx:beforeHistoryUpdate' , function ( event ) {
106- const params = new URLSearchParams ( event . detail . history . path . split ( '?' ) [ 1 ] ?? '' )
106+ const params = new URLSearchParams (
107+ event . detail . history . path . split ( '?' ) [ 1 ] ?? ''
108+ )
107109 params . delete ( 'v' )
108110 const pathWithoutQueryString = event . detail . history . path . split ( '?' ) [ 0 ]
109111 if ( params . size === 0 ) {
110112 event . detail . history . path = pathWithoutQueryString
111113 } else {
112- event . detail . history . path = pathWithoutQueryString + '?' + params . toString ( )
114+ event . detail . history . path =
115+ pathWithoutQueryString + '?' + params . toString ( )
113116 }
114- } ) ;
117+ } )
You can’t perform that action at this time.
0 commit comments