diff --git a/panel/panel.js b/panel/panel.js index b4e438b..cba26ab 100644 --- a/panel/panel.js +++ b/panel/panel.js @@ -104,24 +104,34 @@ function appendLog(result) { const date = new Date(result.timestamp * 1000); const date_string = date.toLocaleString(); - key_container.innerHTML += ` -
- - -
` + // Create a container for the log entry + const logContainer = document.createElement('div'); + logContainer.classList.add('log-container'); + logContainer.innerHTML = ` + + `; + + // Append the log container to the key container + key_container.appendChild(logContainer); + + // Add event listener to the newly added "Keys" input + const keysInput = logContainer.querySelector('.keys-field'); + keysInput.addEventListener('click', () => { + navigator.clipboard.writeText(key_string) + }); } function applyListeners() {