From 751c4da849f608ba3c3d1f85971ba7364d515b9d Mon Sep 17 00:00:00 2001 From: Immortal Date: Tue, 16 Apr 2024 10:01:44 +0330 Subject: [PATCH] =?UTF-8?q?=D8=A8=D9=87=D8=A8=D9=88=D8=AF=20=D9=81=D8=B1?= =?UTF-8?q?=D8=A7=DB=8C=D9=86=D8=AF=20=DA=A9=D9=BE=DB=8C=20=DA=A9=D9=84?= =?UTF-8?q?=DB=8C=D8=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/js/script.js | 19 +++++++++++++------ index.html | 2 +- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/assets/js/script.js b/assets/js/script.js index 1118cd5..ab1d20a 100644 --- a/assets/js/script.js +++ b/assets/js/script.js @@ -1,6 +1,9 @@ -function copyToClipboard(text) { +function copyToClipboard(text, key) { navigator.clipboard.writeText(text).then(() => { - alert("کلید کپی شد!"); + $('button[data-key="'+key+'"]').html('✔️'); + setTimeout(function() { + $('button[data-key="'+key+'"]').html('📋'); + }, 2500) }).catch(() => { // }); @@ -11,21 +14,25 @@ function renderData(dataArray) { if (typeof dataArray === "undefined" || dataArray.length < 1) { return false; } + let x = 1; dataArray.forEach(function(element) { if ( element !== "" ) { html += '
'; html += ''; html += '
'; - html += ''; html += '
'; html += '
'; + x++; } }); - html += '
'; - html += 'کلیدهای بیشتر ...'; - $('#setContent').html(html); + let loadMore = '
'; + loadMore += ''; + loadMore += 'کلیدهای بیشتر ...'; + loadMore += ''; + $('#setContent').html(html+loadMore); } window.addEventListener('load', function() { diff --git a/index.html b/index.html index 3bd7a71..e260224 100644 --- a/index.html +++ b/index.html @@ -112,7 +112,7 @@ - +