Skip to content

Commit

Permalink
Update 404.html
Browse files Browse the repository at this point in the history
  • Loading branch information
corlard3y authored Oct 10, 2024
1 parent 574f9f6 commit c186308
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions 404.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,20 @@
var isPrPreview = window.location.pathname.includes('/pr-preview/');
var pathSegmentsToKeep = isPrPreview ? 3 : 0;

var l = window.location;
l.replace(
l.protocol +
'//' +
l.hostname +
(l.port ? ':' + l.port : '') +
l.pathname
.split('/')
.slice(0, 1 + pathSegmentsToKeep)
.join('/') +
'/?/' +
l.pathname.slice(1).split('/').slice(pathSegmentsToKeep).join('/').replace(/&/g, '~and~') +
(l.search ? '&' + l.search.slice(1).replace(/&/g, '~and~') : '') +
l.hash
// var l = window.location;
// l.replace(
// l.protocol +
// '//' +
// l.hostname +
// (l.port ? ':' + l.port : '') +
// l.pathname
// .split('/')
// .slice(0, 1 + pathSegmentsToKeep)
// .join('/') +
// '/?/' +
// l.pathname.slice(1).split('/').slice(pathSegmentsToKeep).join('/').replace(/&/g, '~and~') +
// (l.search ? '&' + l.search.slice(1).replace(/&/g, '~and~') : '') +
// l.hash
);
</script>
</head>
Expand Down

0 comments on commit c186308

Please sign in to comment.