File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -53,9 +53,12 @@ export const App = () => {
5353 new URLSearchParams ( window . location . search ) . get ( 'hidePastSessions' ) !== null
5454
5555 if ( hash ) {
56+ const payload = decodeURIComponent ( hash )
5657 cfg = {
5758 ...cfg ,
58- ...JSON . parse ( atob ( decodeURIComponent ( hash ) ) ) ,
59+ ...JSON . parse (
60+ payload . substr ( 0 , 3 ) === 'v2:' ? payload . substr ( 3 ) : atob ( payload ) ,
61+ ) ,
5962 }
6063 console . log ( cfg )
6164 }
@@ -89,7 +92,7 @@ export const App = () => {
8992 window . location . assign (
9093 `${
9194 new URL ( document . location . href ) . origin
92- } #${ encodeURIComponent ( btoa ( JSON . stringify ( cfg ) ) ) } `,
95+ } #${ encodeURIComponent ( `v2: ${ JSON . stringify ( cfg ) } ` ) } `,
9396 )
9497 setEditing ( false )
9598 } }
@@ -181,7 +184,7 @@ export const App = () => {
181184 < a
182185 href = { `${
183186 new URL ( document . location . href ) . origin
184- } ?schedule=${ encodeURIComponent ( btoa ( JSON . stringify ( cfg ) ) ) } `}
187+ } ?schedule=${ encodeURIComponent ( `v2: ${ JSON . stringify ( cfg ) } ` ) } `}
185188 >
186189 this URL
187190 </ a > { ' ' }
You can’t perform that action at this time.
0 commit comments