[feat] realm url sharing

This commit is contained in:
kwaroran
2023-07-16 22:31:18 +09:00
parent d919121870
commit bc57c232cd
3 changed files with 17 additions and 4 deletions

View File

@@ -125,7 +125,19 @@ async function importCharacterProcess(f:{
}
}
export async function characterHubImport() {
export async function characterURLImport() {
const realmPath = (new URLSearchParams(location.search)).get('realm')
try {
if(realmPath){
const url = new URL(location.href);
url.searchParams.delete('realm');
window.history.pushState(null, '', url.toString());
downloadRisuHub(realmPath)
}
} catch (error) {
}
const charPath = (new URLSearchParams(location.search)).get('charahub')
try {
if(charPath){