File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed
Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html lang ="zh-CN ">
3+ < head >
4+ < meta charset ="UTF-8 " />
5+ < meta http-equiv ="X-UA-Compatible " content ="IE=edge " />
6+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 " />
7+ < title > Redirecting...</ title >
8+ < script type ="text/javascript ">
9+ // Redirect all GitHub Pages 404 requests back to the SPA entry point.
10+ // Based on https://github.com/rafgraph/spa-github-pages
11+ ( ( ) => {
12+ var redirect = sessionStorage . getItem ( "spa-redirect" ) ;
13+ if ( redirect ) {
14+ sessionStorage . removeItem ( "spa-redirect" ) ;
15+ window . location . replace ( redirect ) ;
16+ return ;
17+ }
18+
19+ var l = window . location ;
20+ var pathname = l . pathname ;
21+ var search = l . search ;
22+ var hash = l . hash ;
23+
24+ sessionStorage . setItem (
25+ "spa-redirect" ,
26+ pathname . replace ( / ^ ( \/ ) / , "" ) + search + hash
27+ ) ;
28+
29+ window . location . replace ( l . origin + "/?redirect=true" ) ;
30+ } ) ( ) ;
31+ </ script >
32+ </ head >
33+ < body >
34+ < p > Redirecting...</ p >
35+ </ body >
36+ </ html >
You can’t perform that action at this time.
0 commit comments