mirror of
https://github.com/whoswhip/Sharpbin.git
synced 2026-12-06 02:48:43 +00:00
fix: include '.' before extension on paste download
This commit is contained in:
@@ -787,8 +787,8 @@
|
|||||||
const a = document.createElement('a');
|
const a = document.createElement('a');
|
||||||
a.href = url;
|
a.href = url;
|
||||||
a.download = data.paste?.title
|
a.download = data.paste?.title
|
||||||
? data.paste.title.slice(0, 100) + extension
|
? `${data.paste.title.slice(0, 100)}.${extension}`
|
||||||
: `paste_${data.paste?.id}${extension}`;
|
: `paste_${data.paste?.id}.${extension}`;
|
||||||
document.body.appendChild(a);
|
document.body.appendChild(a);
|
||||||
a.click();
|
a.click();
|
||||||
document.body.removeChild(a);
|
document.body.removeChild(a);
|
||||||
|
|||||||
Reference in New Issue
Block a user