File tree Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+ <!DOCTYPE html>
2+ < html >
3+ < head >
4+ < meta charset ="utf-8 ">
5+ < title > GitHub Pages Issue</ title >
6+
7+ <!--
8+ Refresh fix for Single Page Applications (SPAs)
9+ Source: https://github.com/orgs/community/discussions/50269
10+ -->
11+ < script type ="text/javascript ">
12+
13+
14+ var pathSegmentsToKeep = 0 ;
15+
16+ var l = window . location ;
17+ l . replace (
18+ l . protocol + '//' + l . hostname + ( l . port ? ':' + l . port : '' ) +
19+ l . pathname . split ( '/' ) . slice ( 0 , 1 + pathSegmentsToKeep ) . join ( '/' ) + '/?/' +
20+ l . pathname . slice ( 1 ) . split ( '/' ) . slice ( pathSegmentsToKeep ) . join ( '/' ) . replace ( / & / g, '~and~' ) +
21+ ( l . search ? '&' + l . search . slice ( 1 ) . replace ( / & / g, '~and~' ) : '' ) +
22+ l . hash
23+ ) ;
24+ </ script >
25+ </ head >
26+ < body >
27+ </ body >
28+ </ html >
Original file line number Diff line number Diff line change 3131 </ div >
3232 < script src ="_framework/blazor.webassembly.js "> </ script >
3333 < script > navigator . serviceWorker . register ( 'service-worker.js' ) ; </ script >
34+
35+ <!--
36+ Refresh fix for Single Page Applications (SPAs)
37+ Source: https://github.com/orgs/community/discussions/50269
38+ -->
39+ < script type ="text/javascript ">
40+ ( function ( l ) {
41+ if ( l . search [ 1 ] === '/' ) {
42+ var decoded = l . search . slice ( 1 ) . split ( '&' ) . map ( function ( s ) {
43+ return s . replace ( / ~ a n d ~ / g, '&' )
44+ } ) . join ( '?' ) ;
45+ window . history . replaceState ( null , null ,
46+ l . pathname . slice ( 0 , - 1 ) + decoded + l . hash
47+ ) ;
48+ }
49+ } ( window . location ) )
50+ </ script >
3451</ body >
3552
3653</ html >
You can’t perform that action at this time.
0 commit comments