File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html >
3+ < head >
4+ < meta charset ="utf-8 ">
5+ < title > Redirecting...</ title >
6+ < script type ="text/javascript ">
7+ // Single Page Apps for GitHub Pages
8+ // MIT License
9+ // https://github.com/rafgraph/spa-github-pages
10+ // This script takes the current URL and converts the path and query
11+ // string into just a query string, and then redirects the browser
12+ // to the new URL with only a query string and hash fragment.
13+ var pathSegmentsToKeep = 1 ;
14+
15+ var l = window . location ;
16+ l . replace (
17+ l . protocol + '//' + l . hostname + ( l . port ? ':' + l . port : '' ) +
18+ l . pathname . split ( '/' ) . slice ( 0 , 1 + pathSegmentsToKeep ) . join ( '/' ) + '/?/' +
19+ l . pathname . slice ( 1 ) . split ( '/' ) . slice ( pathSegmentsToKeep ) . join ( '/' ) . replace ( / & / g, '~and~' ) +
20+ ( l . search ? '&' + l . search . slice ( 1 ) . replace ( / & / g, '~and~' ) : '' ) +
21+ l . hash
22+ ) ;
23+ </ script >
24+ </ head >
25+ < body >
26+ Redirecting...
27+ </ body >
28+ </ html >
Original file line number Diff line number Diff line change 2525 Learn how to configure a non-root public URL by running `npm run build`.
2626 -->
2727 < title > Flow UI Toolkit</ title >
28+
29+ <!-- Start Single Page Apps for GitHub Pages -->
30+ < script type ="text/javascript ">
31+ // Single Page Apps for GitHub Pages
32+ // MIT License
33+ // https://github.com/rafgraph/spa-github-pages
34+ // This script checks to see if a redirect is present in the query string,
35+ // converts it back into the correct url and adds it to the
36+ // browser's history using window.history.replaceState(...),
37+ // which won't cause the browser to attempt to load the new url.
38+ // When the single page app is loaded further down in this file,
39+ // the correct url will be waiting in the browser's history for
40+ // the single page app to route accordingly.
41+ ( function ( l ) {
42+ if ( l . search [ 1 ] === '/' ) {
43+ var decoded = l . search . slice ( 1 ) . split ( '&' ) . map ( function ( s ) {
44+ return s . replace ( / ~ a n d ~ / g, '&' )
45+ } ) . join ( '?' ) ;
46+ window . history . replaceState ( null , null ,
47+ l . pathname . slice ( 0 , - 1 ) + decoded + l . hash
48+ ) ;
49+ }
50+ } ( window . location ) )
51+ </ script >
52+ <!-- End Single Page Apps for GitHub Pages -->
2853 </ head >
2954 < body >
3055 < noscript > You need to enable JavaScript to run this app.</ noscript >
You can’t perform that action at this time.
0 commit comments