mirror of
https://github.com/waku-org/waku-lab.git
synced 2025-02-03 11:33:53 +00:00
chore: remove base path
This commit is contained in:
parent
86f538e93e
commit
b5f4b16b58
@ -2,11 +2,10 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/buddybook/favicon.svg" />
|
||||
<link rel="icon" type="image/png" href="/buddybook/favicon.png" />
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||
<link rel="icon" type="image/png" href="/favicon.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>BuddyBook Dogfood</title>
|
||||
<base href="/buddybook/" />
|
||||
<script>
|
||||
window.global = window;
|
||||
window.process = {
|
||||
@ -20,23 +19,11 @@
|
||||
browser: true
|
||||
};
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
(function(l) {
|
||||
if (l.search[1] === '/' ) {
|
||||
var decoded = l.search.slice(1).split('&').map(function(s) {
|
||||
return s.replace(/~and~/g, '&')
|
||||
}).join('?');
|
||||
window.history.replaceState(null, null,
|
||||
l.pathname.slice(0, -1) + decoded + l.hash
|
||||
);
|
||||
}
|
||||
}(window.location))
|
||||
</script>
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
const path = window.location.pathname.substring('/buddybook/'.length);
|
||||
const path = window.location.pathname;
|
||||
if (path && !window.location.search.includes('?/')) {
|
||||
window.location.replace('/buddybook/?/' + path + window.location.search + window.location.hash);
|
||||
window.location.replace('/?/' + path + window.location.search + window.location.hash);
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
|
@ -4,12 +4,12 @@
|
||||
<meta charset="utf-8">
|
||||
<title>BuddyBook</title>
|
||||
<script type="text/javascript">
|
||||
var pathSegmentsToKeep = 1;
|
||||
var pathSegmentsToKeep = 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
|
||||
|
@ -6,7 +6,7 @@ export default defineConfig(({ mode }) => {
|
||||
const env = loadEnv(mode, process.cwd(), '')
|
||||
|
||||
return {
|
||||
base: '/buddybook/',
|
||||
base: '/',
|
||||
plugins: [
|
||||
react(),
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user