mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-19 15:04:19 +01:00
@@ -153,6 +153,9 @@
|
|||||||
<div class="col-lg-5">
|
<div class="col-lg-5">
|
||||||
<h4>Preview</h4>
|
<h4>Preview</h4>
|
||||||
<div id="preview"></div>
|
<div id="preview"></div>
|
||||||
|
<h4 class="mt-2">Link</h4>
|
||||||
|
<span>Alternatively, you can share this link or encode it in a QR code</span>
|
||||||
|
<div id="preview-link"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<hr />
|
<hr />
|
||||||
|
|||||||
@@ -188,6 +188,16 @@ function inputChanges(event, buttonSize) {
|
|||||||
|
|
||||||
$("#mainCode").text(html).html();
|
$("#mainCode").text(html).html();
|
||||||
$("#preview").html(html);
|
$("#preview").html(html);
|
||||||
|
var form = document.querySelector("#preview form");
|
||||||
|
var url = new URL(form.getAttribute("action"));
|
||||||
|
var formData = new FormData(form);
|
||||||
|
formData.forEach((value, key) => {
|
||||||
|
if(key !== "jsonResponse"){
|
||||||
|
url.searchParams.append(key, value);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
url = url.href;
|
||||||
|
$("#preview-link").append(`<a href="${url}">${url}</a>`)
|
||||||
|
|
||||||
$('pre code').each(function (i, block) {
|
$('pre code').each(function (i, block) {
|
||||||
hljs.highlightBlock(block);
|
hljs.highlightBlock(block);
|
||||||
|
|||||||
Reference in New Issue
Block a user