log locations
This commit is contained in:
parent
bb6af73dcc
commit
7df0ec5469
1
404.html
1
404.html
|
|
@ -25,6 +25,7 @@
|
|||
var pathSegmentsToKeep = 1;
|
||||
|
||||
var l = window.location;
|
||||
console.log('location:', l);
|
||||
l.replace(
|
||||
l.protocol + '//' + l.hostname + (l.port ? ':' + l.port : '') +
|
||||
l.pathname.split('/').slice(0, 1 + pathSegmentsToKeep).join('/') + '/?/' +
|
||||
|
|
|
|||
|
|
@ -26,8 +26,9 @@
|
|||
(function(l) {
|
||||
if (l.search[1] === '/' ) {
|
||||
var decoded = l.search.slice(1).split('&').map(function(s) {
|
||||
return s.replace(/~and~/g, '&')
|
||||
return s.replace(/~and~/g, '&')
|
||||
}).join('?');
|
||||
console.log('decoded', decoded);
|
||||
window.history.replaceState(null, null,
|
||||
l.pathname.slice(0, -1) + decoded + l.hash
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in New Issue