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",
|
"name": "keanuapp-weblite",
|
||||||
"version": "0.1.93",
|
"version": "0.1.94",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "keanuapp-weblite",
|
"name": "keanuapp-weblite",
|
||||||
"version": "0.1.92",
|
"version": "0.1.93",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@
|
||||||
|
|
||||||
function go() {
|
function go() {
|
||||||
if (navigator.onLine) {
|
if (navigator.onLine) {
|
||||||
let url = "<!--MIRROR_URL-->/#/?migrate=1";
|
let url = "<!--MIRROR_URL-->" + window.location.pathname + "#/?migrate=1";
|
||||||
if (!url.includes("://")) {
|
if (!url.includes("://")) {
|
||||||
url = window.location.protocol + "//" + url;
|
url = window.location.protocol + "//" + url;
|
||||||
}
|
}
|
||||||
|
|
@ -72,7 +72,7 @@
|
||||||
} else if (data !== null && data.cmd == "migrationDone") {
|
} else if (data !== null && data.cmd == "migrationDone") {
|
||||||
if (windowProxy) {
|
if (windowProxy) {
|
||||||
windowProxy.close();
|
windowProxy.close();
|
||||||
let url = "<!--MIRROR_URL-->/#/";
|
let url = "<!--MIRROR_URL-->" + window.location.pathname + "#/";
|
||||||
if (!url.includes("://")) {
|
if (!url.includes("://")) {
|
||||||
url = window.location.protocol + "//" + url;
|
url = window.location.protocol + "//" + url;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -126,6 +126,7 @@ async function serveOfflinePage() {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (title) {
|
if (title) {
|
||||||
text = text.replaceAll(/<!--OFFLINE_TITLE_START-->(.*?)<!--OFFLINE_TITLE_END-->/g, title);
|
text = text.replaceAll(/<!--OFFLINE_TITLE_START-->(.*?)<!--OFFLINE_TITLE_END-->/g, title);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue