merge: 10.6 updates

This commit is contained in:
jj
2025-01-21 13:34:19 +00:00
25 changed files with 466 additions and 79 deletions

17
web/src/lib/clipboard.ts Normal file
View File

@@ -0,0 +1,17 @@
const allowedLinkTypes = new Set(["text/plain", "text/uri-list"]);
export const pasteLinkFromClipboard = async () => {
const clipboard = await navigator.clipboard.read();
if (clipboard?.length) {
const clipboardItem = clipboard[0];
for (const type of clipboardItem.types) {
if (allowedLinkTypes.has(type)) {
const blob = await clipboardItem.getType(type);
const blobText = await blob.text();
return blobText;
}
}
}
}