インスタンス情報ページとMisskey情報ページを分離するなど
This commit is contained in:
parent
f0d187f71e
commit
2479f75d8a
9 changed files with 103 additions and 70 deletions
|
@ -3,7 +3,7 @@ declare const _VERSION_: string;
|
|||
declare const _ENV_: string;
|
||||
|
||||
const address = new URL(location.href);
|
||||
const siteName = document.querySelector('meta[property="og:site_name"]') as HTMLMetaElement;
|
||||
const siteName = (document.querySelector('meta[property="og:site_name"]') as HTMLMetaElement)?.content;
|
||||
|
||||
export const host = address.host;
|
||||
export const hostname = address.hostname;
|
||||
|
@ -15,4 +15,4 @@ export const langs = _LANGS_;
|
|||
export const locale = JSON.parse(localStorage.getItem('locale'));
|
||||
export const version = _VERSION_;
|
||||
export const env = _ENV_;
|
||||
export const instanceName = siteName && siteName.content ? siteName.content : 'Misskey';
|
||||
export const instanceName = siteName === 'Misskey' ? null : siteName;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue