summaryrefslogtreecommitdiff
path: root/packages/frontend/src/scripts/collapsed.ts
diff options
context:
space:
mode:
authorかっこかり <67428053+kakkokari-gtyih@users.noreply.github.com>2024-09-10 18:39:53 +0900
committerGitHub <noreply@github.com>2024-09-10 18:39:53 +0900
commit837a8e15d893a670ab2ce51b3ec87e6b62a51da7 (patch)
tree0b651782db2bf440f1c789606d6367226f2e2253 /packages/frontend/src/scripts/collapsed.ts
parentDev: cypressをdev containerで実行可に(e2e-dev-container) (#14526) (diff)
downloadsharkey-837a8e15d893a670ab2ce51b3ec87e6b62a51da7.tar.gz
sharkey-837a8e15d893a670ab2ce51b3ec87e6b62a51da7.tar.bz2
sharkey-837a8e15d893a670ab2ce51b3ec87e6b62a51da7.zip
refactor(frontend): frontend-embed/src/to-be-sharedを共通化 (#14536)
* refactor(frontend): shouldCollapsedを共通化 * refactor(frontend): config.js, worker-multi-dispatch.js, intl-const.jsを共通化 * fix(frontend-shared): fix type error * refactor(frontend): is-link.jsと、同一の振る舞いをする記述を共通化 * fix * fix lint * lint fixes
Diffstat (limited to 'packages/frontend/src/scripts/collapsed.ts')
-rw-r--r--packages/frontend/src/scripts/collapsed.ts22
1 files changed, 0 insertions, 22 deletions
diff --git a/packages/frontend/src/scripts/collapsed.ts b/packages/frontend/src/scripts/collapsed.ts
deleted file mode 100644
index 4ec88a3c65..0000000000
--- a/packages/frontend/src/scripts/collapsed.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-/*
- * SPDX-FileCopyrightText: syuilo and misskey-project
- * SPDX-License-Identifier: AGPL-3.0-only
- */
-
-import * as Misskey from 'misskey-js';
-
-export function shouldCollapsed(note: Misskey.entities.Note, urls: string[]): boolean {
- const collapsed = note.cw == null && (
- note.text != null && (
- (note.text.includes('$[x2')) ||
- (note.text.includes('$[x3')) ||
- (note.text.includes('$[x4')) ||
- (note.text.includes('$[scale')) ||
- (note.text.split('\n').length > 9) ||
- (note.text.length > 500) ||
- (urls.length >= 4)
- ) || note.files.length >= 5
- );
-
- return collapsed;
-}