fix
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
*/
|
||||
|
||||
import { miLocalStorage } from '@/local-storage.js';
|
||||
import { isEmbedPage } from '@/scripts/embed-page.js';
|
||||
|
||||
const address = new URL(document.querySelector<HTMLMetaElement>('meta[property="instance_url"]')?.content || location.href);
|
||||
const siteName = document.querySelector<HTMLMetaElement>('meta[property="og:site_name"]')?.content;
|
||||
@@ -21,7 +22,9 @@ export const version = _VERSION_;
|
||||
export const instanceName = siteName === 'Misskey' || siteName == null ? host : siteName;
|
||||
export const ui = miLocalStorage.getItem('ui');
|
||||
export const debug = miLocalStorage.getItem('debug') === 'true';
|
||||
export const embedPage = location.pathname.startsWith('/embed');
|
||||
// config.tsでインポートしているファイルと、その内部で使用される関数では使用できない。
|
||||
// それらでembedPageの判定をしたい場合は関数を直接呼び出すこと
|
||||
export const embedPage = isEmbedPage();
|
||||
|
||||
export function updateLocale(newLocale): void {
|
||||
locale = newLocale;
|
||||
|
Reference in New Issue
Block a user