diff options
| author | Freya Murphy <freya@freyacat.org> | 2026-03-02 16:05:12 -0500 |
|---|---|---|
| committer | Freya Murphy <freya@freyacat.org> | 2026-03-02 18:39:22 -0500 |
| commit | 24734d408700a72d45c3ff4a679606cab3ec544f (patch) | |
| tree | d0fee0bcf508f3c631f7c26724bb5cd94dfc88a0 /packages/frontend/src/components/MkPostForm.vue | |
| parent | merge: Release/2025.4.5 (!1258) (diff) | |
| download | sharkey-24734d408700a72d45c3ff4a679606cab3ec544f.tar.gz sharkey-24734d408700a72d45c3ff4a679606cab3ec544f.tar.bz2 sharkey-24734d408700a72d45c3ff4a679606cab3ec544f.zip | |
split url into webUrl and localUrl (like mastodon)stable
Diffstat (limited to 'packages/frontend/src/components/MkPostForm.vue')
| -rw-r--r-- | packages/frontend/src/components/MkPostForm.vue | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/frontend/src/components/MkPostForm.vue b/packages/frontend/src/components/MkPostForm.vue index a650365a28..ca4855a084 100644 --- a/packages/frontend/src/components/MkPostForm.vue +++ b/packages/frontend/src/components/MkPostForm.vue @@ -111,7 +111,7 @@ import * as mfm from 'mfm-js'; import * as Misskey from 'misskey-js'; import insertTextAtCursor from 'insert-text-at-cursor'; import { toASCII } from 'punycode.js'; -import { host, url } from '@@/js/config.js'; +import { webUrl } from '@@/js/config.js'; import { appendContentWarning } from '@@/js/append-content-warning.js'; import type { ShallowRef } from 'vue'; import type { MenuItem } from '@/types/menu.js'; @@ -715,7 +715,7 @@ async function onPaste(ev: ClipboardEvent) { const paste = ev.clipboardData.getData('text'); - if (!renoteTargetNote.value && !quoteId.value && paste.startsWith(url + '/notes/') && !$i.rejectQuotes) { + if (!renoteTargetNote.value && !quoteId.value && paste.startsWith(webUrl + '/notes/') && !$i.rejectQuotes) { ev.preventDefault(); os.confirm({ @@ -727,7 +727,7 @@ async function onPaste(ev: ClipboardEvent) { return; } - quoteId.value = paste.substring(url.length).match(/^\/notes\/(.+?)\/?$/)?.[1] ?? null; + quoteId.value = paste.substring(webUrl.length).match(/^\/notes\/(.+?)\/?$/)?.[1] ?? null; }); } @@ -1023,7 +1023,7 @@ async function post(ev?: MouseEvent) { 'https://open.spotify.com/track/7anfcaNPQWlWCwyCHmZqNy', 'https://open.spotify.com/track/5Odr16TvEN4my22K9nbH7l', 'https://open.spotify.com/album/5bOlxyl4igOrp2DwVQxBco', - ].some(url => text.includes(url))) { + ].some(webUrl => text.includes(webUrl))) { claimAchievement('brainDiver'); } |