Build 94
Preserve the path name for mirror links
This commit is contained in:
parent
f41aec59bb
commit
47ebc55f80
4 changed files with 5 additions and 4 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "keanuapp-weblite",
|
||||
"version": "0.1.93",
|
||||
"version": "0.1.94",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "keanuapp-weblite",
|
||||
"version": "0.1.92",
|
||||
"version": "0.1.93",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
function go() {
|
||||
if (navigator.onLine) {
|
||||
let url = "<!--MIRROR_URL-->/#/?migrate=1";
|
||||
let url = "<!--MIRROR_URL-->" + window.location.pathname + "#/?migrate=1";
|
||||
if (!url.includes("://")) {
|
||||
url = window.location.protocol + "//" + url;
|
||||
}
|
||||
|
|
@ -72,7 +72,7 @@
|
|||
} else if (data !== null && data.cmd == "migrationDone") {
|
||||
if (windowProxy) {
|
||||
windowProxy.close();
|
||||
let url = "<!--MIRROR_URL-->/#/";
|
||||
let url = "<!--MIRROR_URL-->" + window.location.pathname + "#/";
|
||||
if (!url.includes("://")) {
|
||||
url = window.location.protocol + "//" + url;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -126,6 +126,7 @@ async function serveOfflinePage() {
|
|||
};
|
||||
}
|
||||
});
|
||||
|
||||
if (title) {
|
||||
text = text.replaceAll(/<!--OFFLINE_TITLE_START-->(.*?)<!--OFFLINE_TITLE_END-->/g, title);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue