ユーザTLの余白をクリックして上部に戻れるように
This commit is contained in:
12
packages/frontend/src/scripts/is-link.ts
Normal file
12
packages/frontend/src/scripts/is-link.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
export function isLink(el: HTMLElement) {
|
||||
if (el.tagName === 'A') return true;
|
||||
if (el.parentElement) {
|
||||
return isLink(el.parentElement);
|
||||
}
|
||||
return false;
|
||||
};
|
Reference in New Issue
Block a user