mirror of
https://github.com/janoside/btc-rpc-explorer.git
synced 2026-08-13 12:33:13 +02:00
parent
8eef8cbb0a
commit
29fca9988a
3 changed files with 26 additions and 5 deletions
|
|
@ -10,7 +10,7 @@ module.exports =
|
|||
"jquery.min.js": "sha384-vtXRMe3mGCbOeY7l30aIg8H9p3GdeSe4IFlP6G8JMa7o7lXvnz3GFKzPxzJdPfGK",
|
||||
"moment.min.js": "sha384-CJyhAlbbRZX14Q8KxKBt0na1ad4KBs9PklAiNk2Efxs9sgimbIZm9kYLJQeNMUfM",
|
||||
"sentry.min.js": "sha384-da/Bo2Ah6Uw3mlhl6VINMblg2SyGbSnULKrukse3P5D9PTJi4np9HoKvR19D7zOL",
|
||||
"site.js": "sha384-+oXWKXwPD9Fyf6EYrFPvPAPGVsB7INqoVZhse4PVoWQYgCsJ5M9bI0YWIsgYT0NR",
|
||||
"site.js": "sha384-G8o2io5zIdQiiVN+4CAGGXPO4UvV8jGkSMlfddSPbqIUd3x5Rv01pNH6ec8QOATu",
|
||||
"bootstrap-icons.css": "sha384-rJFhkIguED0Z4GX6r6ReHpTCkwWtiPHZnQtWVP0DQWcKHzeJAlYb1m/xdYkeEk+f",
|
||||
"dark-v1.min.css": "sha384-7nc/D1JfDkQU5dNF5LLXrlAmfZQr9A0PgyeEBKNVtVnyww7HO1WJtyDIOO/voke9",
|
||||
"dark.min.css": "sha384-K1njself27eyYQZECXmxrP5uhM6YJtHrbxRi0s5FTvP3y5t3nvjL6lfaLNuHiAxt",
|
||||
|
|
|
|||
|
|
@ -37,4 +37,4 @@ let fileContent = "module.exports =\n" + JSON.stringify(hashesByFilename, null,
|
|||
|
||||
fs.writeFileSync(path.join(process.cwd(), "app/resourceIntegrityHashes.js"), fileContent);
|
||||
|
||||
console.log("\npublic/txt/resource-integrity.json written.\n");
|
||||
console.log("\napp/resourceIntegrityHashes.js written.\n");
|
||||
|
|
@ -34,9 +34,30 @@ function showAllTxOutputs(link, txid) {
|
|||
}
|
||||
|
||||
function copyTextToClipboard(text) {
|
||||
navigator.clipboard.writeText(text).then(() => {}, (err) => {
|
||||
console.error('Error copying text: ', err);
|
||||
});
|
||||
// navigator.clipboard won't exist if it's not secure (i.e. http on non-localhost)
|
||||
// so there's a backup method
|
||||
if (navigator.clipboard) {
|
||||
navigator.clipboard.writeText(text).then(() => {}, (err) => {
|
||||
console.error('Error copying text: ', err);
|
||||
});
|
||||
} else {
|
||||
var inputId = "copy-text-hidden-input";
|
||||
|
||||
var input = document.createElement('input');
|
||||
input.setAttribute("id", inputId);
|
||||
input.setAttribute("class", "hidden");
|
||||
input.setAttribute("value", text);
|
||||
|
||||
document.body.appendChild(input);
|
||||
|
||||
// copy address
|
||||
document.getElementById(inputId).select();
|
||||
document.execCommand('copy');
|
||||
|
||||
// remove element
|
||||
input.remove();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function enableTooltipsAndPopovers() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue