embedページの判定をconfig.tsに移行

This commit is contained in:
kakkokari-gtyih
2024-06-29 17:18:32 +09:00
parent 1926fa304b
commit 237605d6b8
9 changed files with 24 additions and 26 deletions

View File

@@ -4,17 +4,14 @@
*/
import { miLocalStorage } from "@/local-storage.js";
import type { Keys } from "@/local-storage.js";
export function isEmbedPage() {
return location.pathname.startsWith('/embed');
}
import { embedPage } from "@/config.js";
/**
* EmbedページではlocalStorageを使用できないようにしているが、
* 動作に必要な値はsafeSessionStoragemiLocalStorage内のやつに移動する
*/
export function initEmbedPageLocalStorage() {
if (!isEmbedPage()) {
if (!embedPage) {
return;
}