1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-05 06:35:57 +02:00
This commit is contained in:
syuilo
2025-08-26 17:31:36 +09:00
parent 203296b9cb
commit 69bbac013a
13 changed files with 67 additions and 39 deletions

View File

@@ -233,7 +233,7 @@ function select(anchorElement: HTMLElement | EventTarget | null, label: string |
os.popupMenu([label ? {
text: label,
type: 'label',
} : undefined, {
} : null, {
text: i18n.ts.upload,
icon: 'ti ti-upload',
action: () => chooseFileFromPcAndUpload({ multiple, features }).then(files => res(files)),

View File

@@ -13,7 +13,7 @@ const removeHash = (x: string) => x.replace(/#[^#]*$/, '');
export function extractUrlFromMfm(nodes: mfm.MfmNode[], respectSilentFlag = true): string[] {
const urlNodes = mfm.extract(nodes, (node) => {
return (node.type === 'url') || (node.type === 'link' && (!respectSilentFlag || !node.props.silent));
});
}) as mfm.MfmUrl[];
const urls: string[] = unique(urlNodes.map(x => x.props.url));
return urls.reduce((array, url) => {