Keep short URL in share field when loaded via short link
This commit is contained in:
6
app.js
6
app.js
@@ -320,12 +320,16 @@
|
|||||||
buildSummary(xmrAmount, desc, timer);
|
buildSummary(xmrAmount, desc, timer);
|
||||||
updatePageTitle(xmrAmount, desc);
|
updatePageTitle(xmrAmount, desc);
|
||||||
|
|
||||||
// Share link — show long URL immediately, then replace with short
|
// Share link — keep existing short URL if present; otherwise shorten new hash
|
||||||
const hash = buildHash(addr, xmrAmount, desc, timer);
|
const hash = buildHash(addr, xmrAmount, desc, timer);
|
||||||
|
if (invoiceCode) {
|
||||||
|
shareLinkInput.value = location.origin + '/s/' + invoiceCode;
|
||||||
|
} else {
|
||||||
shareLinkInput.value = location.origin + '/#' + hash;
|
shareLinkInput.value = location.origin + '/#' + hash;
|
||||||
shortenUrl(hash).then(function (shortUrl) {
|
shortenUrl(hash).then(function (shortUrl) {
|
||||||
if (shortUrl) shareLinkInput.value = shortUrl;
|
if (shortUrl) shareLinkInput.value = shortUrl;
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// QR
|
// QR
|
||||||
qrContainer.innerHTML = '';
|
qrContainer.innerHTML = '';
|
||||||
|
|||||||
2
app.min.js
vendored
2
app.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user