mirror of
https://github.com/wahyd4/links.git
synced 2026-08-09 05:06:16 +10:00
Fix shareable link!
This commit is contained in:
@@ -601,7 +601,7 @@ function fileRow(pk, isPublic, expiresAt, publicUrl) {
|
||||
},
|
||||
formatExpiry(dt) { return dt ? new Date(dt).toLocaleDateString() : ''; },
|
||||
copyPublicUrl() {
|
||||
const url = location.origin + this.publicUrl;
|
||||
const url = this.publicUrl.startsWith('http') ? this.publicUrl : location.origin + this.publicUrl;
|
||||
const el = document.createElement('textarea');
|
||||
el.value = url; el.style.cssText = 'position:fixed;opacity:0';
|
||||
document.body.appendChild(el); el.select(); document.execCommand('copy'); document.body.removeChild(el);
|
||||
|
||||
Reference in New Issue
Block a user