better embeds

This commit is contained in:
biglyderv 2025-03-02 15:28:47 -05:00
parent 729a7b8c56
commit 6ef218055e
Signed by: biglyderv
GPG key ID: 0E2EB0B4CD7397B5
3 changed files with 28 additions and 5 deletions

2
lib.js
View file

@ -15,7 +15,7 @@ function splitUp(content) {
for (let i in out) {
let res = out[i];
if (res.startsWith('file::')) {
out[i] = ['file', res.slice('file::'.length)];
out[i] = ['file', new URL(res.slice('file::'.length), 'https://tbg.dervland.net/').pathname , res.split('.').pop()];
continue;
}
if (res.startsWith('https://')) {