File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ import Hyperbeam from "@hyperbeam/web"
18
18
}
19
19
const body = await req . json ( )
20
20
if ( body . room !== room ) {
21
- history . replaceState ( null , null , "/" + body . room )
21
+ history . replaceState ( null , null , "/" + body . room + location . search )
22
22
}
23
23
embedURL = body . url
24
24
}
@@ -139,6 +139,7 @@ async function main(embedURL) {
139
139
window . addEventListener ( "pointerdown" , onPointerDown )
140
140
window . addEventListener ( "pointerup" , onPointerUp )
141
141
142
+ setStartURL ( )
142
143
onWindowResized ( )
143
144
animate ( )
144
145
@@ -223,6 +224,14 @@ async function main(embedURL) {
223
224
controls . update ( )
224
225
renderer . render ( scene , camera )
225
226
}
227
+
228
+ function setStartURL ( ) {
229
+ const params = new URLSearchParams ( location . search )
230
+ const startURL = params . get ( 'url' )
231
+ if ( startURL ) {
232
+ hb . tabs . update ( { url : startURL } )
233
+ }
234
+ }
226
235
}
227
236
228
237
function checkerboardMesh ( width , segments ) {
You can’t perform that action at this time.
0 commit comments