diff options
| author | Freya Murphy <freya@freyacat.org> | 2026-03-02 16:05:12 -0500 |
|---|---|---|
| committer | Freya Murphy <freya@freyacat.org> | 2026-03-02 17:39:38 -0500 |
| commit | 284b87dae85a356dd543a03f81d12031b11f7554 (patch) | |
| tree | 5df602a3d98fbf9a8f457fab3d749707bfd89cde /packages/frontend/src/components/MkPostForm.vue | |
| parent | merge: Release/2025.4.5 (!1258) (diff) | |
| download | sharkey-284b87dae85a356dd543a03f81d12031b11f7554.tar.gz sharkey-284b87dae85a356dd543a03f81d12031b11f7554.tar.bz2 sharkey-284b87dae85a356dd543a03f81d12031b11f7554.zip | |
split url into webUrl and localUrl (like mastodon)
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'); } |