summaryrefslogtreecommitdiff
path: root/packages/frontend/src/utility
diff options
context:
space:
mode:
authorかっこかり <67428053+kakkokari-gtyih@users.noreply.github.com>2025-05-20 13:42:30 +0900
committerGitHub <noreply@github.com>2025-05-20 13:42:30 +0900
commitf74c38f3135a5a84bd18fb8abca8639fa2107154 (patch)
treeddfc03a58a96c894e687793daa940e067dba8a3a /packages/frontend/src/utility
parentfix(frontend): ユーザー概要ページのファイルの項目のデザ... (diff)
downloadmisskey-f74c38f3135a5a84bd18fb8abca8639fa2107154.tar.gz
misskey-f74c38f3135a5a84bd18fb8abca8639fa2107154.tar.bz2
misskey-f74c38f3135a5a84bd18fb8abca8639fa2107154.zip
enhance(frontend): URLプレビューをユーザーサイドで無効化できるように (#16064)
* enhance(frontend): URLプレビューをユーザーサイドで無効化できるように * fix lint * Update Changelog * fix: 設定項目をデータセーバーに移動
Diffstat (limited to 'packages/frontend/src/utility')
-rw-r--r--packages/frontend/src/utility/url-preview.ts (renamed from packages/frontend/src/utility/player-url-transform.ts)5
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/frontend/src/utility/player-url-transform.ts b/packages/frontend/src/utility/url-preview.ts
index 39c6df6500..e7379f4202 100644
--- a/packages/frontend/src/utility/player-url-transform.ts
+++ b/packages/frontend/src/utility/url-preview.ts
@@ -2,7 +2,12 @@
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
+import { computed } from 'vue';
import { hostname } from '@@/js/config.js';
+import { instance } from '@/instance.js';
+import { prefer } from '@/preferences.js';
+
+export const isEnabledUrlPreview = computed(() => (instance.enableUrlPreview && !prefer.r.dataSaver.value.disableUrlPreview));
export function transformPlayerUrl(url: string): string {
const urlObj = new URL(url);