From be786cb77b30cf5d3dac4d54ce755eb411aa1889 Mon Sep 17 00:00:00 2001
From: Eason010212 <1371033826@qq.com>
Date: Tue, 27 Aug 2024 22:51:08 +0800
Subject: [PATCH] add-copy-button
---
ejs/projects.ejs | 1 +
js/projects.js | 14 +++++++++++++-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/ejs/projects.ejs b/ejs/projects.ejs
index aaf9b4d..6eabd52 100644
--- a/ejs/projects.ejs
+++ b/ejs/projects.ejs
@@ -113,6 +113,7 @@
<%=projectPass%>
********
+
diff --git a/js/projects.js b/js/projects.js
index d0dd661..0ed851e3a 100644
--- a/js/projects.js
+++ b/js/projects.js
@@ -10,6 +10,18 @@ $(function() {
scriptcordova.src = "https://injection/www/cordova.js";
document.head.appendChild(scriptcordova);
}
+ $("#copypass").click(function(){
+ projectPass = $("#prjpass").text()
+ var input = document.createElement('input');
+ document.body.appendChild(input);
+ input.setAttribute('value', projectPass);
+ input.select();
+ if (document.execCommand('copy')) {
+ document.execCommand('copy');
+ }
+ document.body.removeChild(input);
+ showtext("密钥信息已复制到剪贴板")
+ })
})
$(function() {
get_width();
@@ -3862,4 +3874,4 @@ var exportProjects = function() {
} else
showtext("Unknown Error")
})
-}
\ No newline at end of file
+}