From 54565f90b6e44e58505fc95156500d3bfb4e1ca7 Mon Sep 17 00:00:00 2001 From: Gregory Soutade Date: Sat, 18 Jun 2022 14:31:10 +0200 Subject: [PATCH] Remove alert() after password copy. Replace it by button name update (2 seconds) --- server/resources/gpass.js | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/server/resources/gpass.js b/server/resources/gpass.js index 6bab5e6..3b56e8a 100755 --- a/server/resources/gpass.js +++ b/server/resources/gpass.js @@ -548,6 +548,7 @@ async function change_master_key(warning_unciphered) clipboard_button = document.createElement("input"); clipboard_button.setAttribute("type", "button"); + clipboard_button.setAttribute("name", "copy_button"); clipboard_button.setAttribute("value", "Copy password"); clipboard_button.setAttribute("onclick", "copy_clipboard(\"unciph_entry_" + i + "\");"); div.appendChild(clipboard_button); @@ -1015,6 +1016,11 @@ async function update_masterkey() } } +function reset_copy_button_name(button) +{ + button.value = "Copy password"; +} + function copy_clipboard(entry_number) { var password = ""; @@ -1028,6 +1034,16 @@ function copy_clipboard(entry_number) inputs = entry.getElementsByTagName("input"); + var button = null; + for(i=0; i