mirror of
https://github.com/Snigdha-OS/Snigdha-OS.github.io.git
synced 2025-09-07 21:25:17 +02:00
Updates
This commit is contained in:
16
index.html
16
index.html
@@ -54,21 +54,25 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
(function(l) {
|
(function(l) {
|
||||||
if (l.search && l.search.startsWith('/')) {
|
if (l.search && l.search.startsWith('/')) {
|
||||||
|
// Extract and clean up the query string
|
||||||
const decoded = l.search
|
const decoded = l.search
|
||||||
.slice(1) // Remove the leading "/"
|
.slice(1) // Remove the leading "/"
|
||||||
.split('&') // Split the query string
|
.split('&') // Split the query string by "&"
|
||||||
|
.filter(Boolean) // Remove empty strings caused by consecutive "&"
|
||||||
.map(s => s.replace(/~and~/g, '&')) // Replace "~and~" with "&"
|
.map(s => s.replace(/~and~/g, '&')) // Replace "~and~" with "&"
|
||||||
.join('?'); // Join the components with "?"
|
.join('&'); // Join back with "&"
|
||||||
|
|
||||||
|
// Reconstruct the URL and replace the history entry
|
||||||
window.history.replaceState(
|
window.history.replaceState(
|
||||||
null,
|
null,
|
||||||
'', // The second argument is the title; an empty string keeps it unchanged
|
'', // Keep the title unchanged
|
||||||
l.pathname.slice(0, -1) + decoded + l.hash // Build the new URL
|
`${l.pathname.slice(0, -1)}${decoded ? `?${decoded}` : ''}${l.hash}` // Build the new URL
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
})(window.location);
|
})(window.location);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
<script type="module" crossorigin src="/assets/index-BvOIUj_o.js"></script>
|
<script type="module" crossorigin src="/assets/index-BvOIUj_o.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/assets/index-InsxKvgR.css">
|
<link rel="stylesheet" crossorigin href="/assets/index-InsxKvgR.css">
|
||||||
</head>
|
</head>
|
||||||
|
Reference in New Issue
Block a user