We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8890bda commit a4a3928Copy full SHA for a4a3928
1 file changed
public/index.html
@@ -27,13 +27,16 @@
27
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-197700032-1"></script>
28
<script>
29
// GitHub Pages での SPA アドレス解決用
30
- (function(){
31
- const query = window.location.search;
32
- if (query.startsWith('?p=')) {
33
- const route = decodeURIComponent(query.substr(3));
34
- window.history.replaceState(null, null, route);
+ (function(l) {
+ if (l.search[1] === '/' ) {
+ var decoded = l.search.slice(1).split('&').map(function(s) {
+ return s.replace(/~and~/g, '&')
+ }).join('?');
35
+ window.history.replaceState(null, null,
36
+ l.pathname.slice(0, -1) + decoded + l.hash
37
+ );
38
}
- })();
39
+ }(window.location))
40
41
</script>
42
0 commit comments