From ce146e5ba345eeb2aa8f2c01babef9da76d97c48 Mon Sep 17 00:00:00 2001 From: "Paul H. Liu" Date: Fri, 18 Jun 2021 17:11:19 -0700 Subject: [PATCH] Click to select result --- src/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/index.js b/src/index.js index 5f731a8..bdea4e5 100644 --- a/src/index.js +++ b/src/index.js @@ -193,6 +193,10 @@ function do_send(message) { pre.innerText = text; }; pre.id = "status"; + pre.onclick = () => { + pre.select(); + document.execCommand("copy"); + }; result.appendChild(pre); await send_message(message, update_status, sleep); };