mirror of
https://github.com/misskey-dev/misskey.git
synced 2025-03-24 13:19:26 +01:00
埋め込みページかどうかの判定は最初の一回だけに
This commit is contained in:
parent
849973ece6
commit
e9ef8fc75a
1 changed files with 6 additions and 1 deletions
|
@ -5,9 +5,14 @@
|
||||||
|
|
||||||
//#region Embed関連の定義
|
//#region Embed関連の定義
|
||||||
|
|
||||||
|
let _isEmbedPage: boolean | null = null;
|
||||||
|
|
||||||
/** 埋め込みページかどうか */
|
/** 埋め込みページかどうか */
|
||||||
export function isEmbedPage() {
|
export function isEmbedPage() {
|
||||||
return location.pathname.startsWith('/embed');
|
if (_isEmbedPage === null) {
|
||||||
|
_isEmbedPage = location.pathname.startsWith('/embed/');
|
||||||
|
}
|
||||||
|
return _isEmbedPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 埋め込みの対象となるエンティティ(/embed/xxx の xxx の部分と対応させる) */
|
/** 埋め込みの対象となるエンティティ(/embed/xxx の xxx の部分と対応させる) */
|
||||||
|
|
Loading…
Add table
Reference in a new issue