diff --git a/src/static/index.ejs b/src/static/index.ejs
index 68ddf1e..f0e25d7 100644
--- a/src/static/index.ejs
+++ b/src/static/index.ejs
@@ -15,6 +15,7 @@
<% }); %>
+
diff --git a/src/static/index.js b/src/static/index.js
index e127803..8c11e17 100644
--- a/src/static/index.js
+++ b/src/static/index.js
@@ -1,8 +1,23 @@
const exportTextarea = document.getElementById('export-textarea');
const weekList = document.getElementById('week-list');
const exportButton = document.getElementById('export-button');
+const copyButton = document.getElementById('copy-button');
let loadingInterval;
+function copyToClipboard() {
+ navigator.clipboard.writeText(exportTextarea.value).then(() => {
+ copyButton.innerText = 'Copied!';
+ setTimeout(() => {
+ copyButton.innerText = 'Copy';
+ }, 2000);
+ }).catch(() => {
+ copyButton.innerText = 'Error!';
+ setTimeout(() => {
+ copyButton.innerText = 'Copy';
+ }, 2000);
+ });
+}
+
function loading() {
exportButton.disabled = true;
exportTextarea.value = 'Loading';
diff --git a/src/static/style.css b/src/static/style.css
index a1339b0..6e09a4f 100644
--- a/src/static/style.css
+++ b/src/static/style.css
@@ -30,7 +30,7 @@ select::-webkit-scrollbar {
overflow-y: scroll;
}
-.selector button {
+button {
font-size: 16px;
height: 30px;
margin-left: 10px;
@@ -39,7 +39,7 @@ select::-webkit-scrollbar {
color: #fff;
border: none;
}
-.selector button:hover {
+button:hover {
scale: 1.1;
cursor: pointer;
}