Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ <h2 id="generatedKeysTitle" class="hidden">Generated Keys</h2>
<button id="copyAllBtn" class="hidden">Copy All Keys</button>
</div>

<p id="keyCountLabel">Number of keys:</p>
<p id="keyCountLabel" class="hidden">Number of key(s):</p>

<button id="generateMoreBtn" class="hidden">Generate More Keys</button>
<p id="copyStatus" class="hidden">Keys copied to clipboard!</p>

<div class="footer">
<p>Disclaimer: This tool is for educational purposes only. Use responsibly.</p>
<p><b>Disclaimer:</b> This tool is intended for educational purposes only. Please use it responsibly.</p>
<button id="sourceCode">Source code</button>
<button id="themeToggleBtn" onclick="toggleTheme()"><i id="themeIcon" class="fas fa-sun"></i></button>
</div>
Expand Down
13 changes: 7 additions & 6 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ document.addEventListener('DOMContentLoaded', () => {

keyCountGroup.classList.remove('hidden');
startBtn.classList.remove('hidden');
keyCountLabel.classList.add('hidden');

// Smooth scroll to the key count group
keyCountGroup.scrollIntoView({ behavior: 'smooth', block: 'center' });
Expand All @@ -190,9 +191,10 @@ document.addEventListener('DOMContentLoaded', () => {

// Hide the form sections
document.querySelector('.grid-container').style.display = 'none';
keyCountGroup.style.display = 'none';
keyCountGroup.classList.add('hidden');

keyCountLabel.innerText = `Number of keys: ${keyCount}`;
keyCountLabel.classList.remove('hidden');
keyCountLabel.innerText = `Number of key(s): ${keyCount}`;

progressBar.style.width = '0%';
progressText.innerText = '0%';
Expand All @@ -207,11 +209,10 @@ document.addEventListener('DOMContentLoaded', () => {

let progress = 0;
const updateProgress = (increment, message) => {
progress += increment;
progressBar.style.width = `${progress}%`;
progressText.innerText = `${progress}%`;
progress = Math.min(100, Math.round(progress + increment));
progressBar.style.width = progressText.innerText = `${progress}%`;
progressLog.innerText = message;
};
};

const generateKeyProcess = async () => {
const clientId = generateClientId();
Expand Down