Spaces:
Running
Running
Add 3 files
Browse files- README.md +6 -4
- index.html +654 -19
- prompts.txt +0 -0
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
colorFrom: red
|
| 5 |
-
colorTo:
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
---
|
| 2 |
+
title: password-generator
|
| 3 |
+
emoji: 🐳
|
| 4 |
colorFrom: red
|
| 5 |
+
colorTo: gray
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite
|
| 10 |
---
|
| 11 |
|
| 12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
|
@@ -1,19 +1,654 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>ARCADE PASSWORD GENERATOR</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap">
|
| 9 |
+
<script src="https://kit.fontawesome.com/a076d05399.js" crossorigin="anonymous"></script>
|
| 10 |
+
<style>
|
| 11 |
+
@keyframes blink {
|
| 12 |
+
0%, 100% { opacity: 1; }
|
| 13 |
+
50% { opacity: 0; }
|
| 14 |
+
}
|
| 15 |
+
@keyframes bounce {
|
| 16 |
+
0%, 100% { transform: translateY(0); }
|
| 17 |
+
50% { transform: translateY(-5px); }
|
| 18 |
+
}
|
| 19 |
+
@keyframes flash {
|
| 20 |
+
0% { opacity: 1; }
|
| 21 |
+
50% { opacity: 0.5; }
|
| 22 |
+
100% { opacity: 1; }
|
| 23 |
+
}
|
| 24 |
+
@keyframes glow {
|
| 25 |
+
0% { box-shadow: 0 0 5px #00ff00; }
|
| 26 |
+
50% { box-shadow: 0 0 20px #00ff00, 0 0 30px #00ff00; }
|
| 27 |
+
100% { box-shadow: 0 0 5px #00ff00; }
|
| 28 |
+
}
|
| 29 |
+
.blink {
|
| 30 |
+
animation: blink 1s step-end infinite;
|
| 31 |
+
}
|
| 32 |
+
.bounce:hover {
|
| 33 |
+
animation: bounce 0.5s ease;
|
| 34 |
+
}
|
| 35 |
+
.flash {
|
| 36 |
+
animation: flash 0.3s ease;
|
| 37 |
+
}
|
| 38 |
+
.glow {
|
| 39 |
+
animation: glow 2s infinite;
|
| 40 |
+
}
|
| 41 |
+
.pixel-font {
|
| 42 |
+
font-family: 'Press Start 2P', cursive;
|
| 43 |
+
}
|
| 44 |
+
.arcade-btn {
|
| 45 |
+
position: relative;
|
| 46 |
+
overflow: hidden;
|
| 47 |
+
}
|
| 48 |
+
.arcade-btn:before {
|
| 49 |
+
content: '';
|
| 50 |
+
position: absolute;
|
| 51 |
+
top: 0;
|
| 52 |
+
left: -100%;
|
| 53 |
+
width: 100%;
|
| 54 |
+
height: 100%;
|
| 55 |
+
background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
|
| 56 |
+
transition: 0.5s;
|
| 57 |
+
}
|
| 58 |
+
.arcade-btn:hover:before {
|
| 59 |
+
left: 100%;
|
| 60 |
+
}
|
| 61 |
+
.password-item {
|
| 62 |
+
transition: all 0.3s ease;
|
| 63 |
+
}
|
| 64 |
+
.password-item:hover {
|
| 65 |
+
transform: scale(1.02);
|
| 66 |
+
box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
|
| 67 |
+
}
|
| 68 |
+
.notification {
|
| 69 |
+
position: fixed;
|
| 70 |
+
top: 20px;
|
| 71 |
+
right: 20px;
|
| 72 |
+
opacity: 0;
|
| 73 |
+
transition: opacity 0.5s;
|
| 74 |
+
}
|
| 75 |
+
.notification.show {
|
| 76 |
+
opacity: 1;
|
| 77 |
+
}
|
| 78 |
+
</style>
|
| 79 |
+
</head>
|
| 80 |
+
<body class="bg-black text-white pixel-font min-h-screen flex flex-col items-center p-4">
|
| 81 |
+
<!-- Notification -->
|
| 82 |
+
<div id="notification" class="notification bg-purple-600 p-4 rounded-lg shadow-lg border-2 border-pink-500 hidden">
|
| 83 |
+
<span id="notification-text"></span>
|
| 84 |
+
</div>
|
| 85 |
+
|
| 86 |
+
<!-- Main Container -->
|
| 87 |
+
<div class="max-w-3xl w-full border-4 border-purple-600 rounded-lg p-6 bg-gray-900 bg-opacity-90 shadow-xl">
|
| 88 |
+
<!-- Header -->
|
| 89 |
+
<div class="text-center mb-8">
|
| 90 |
+
<h1 class="text-4xl md:text-5xl text-transparent bg-clip-text bg-gradient-to-r from-pink-500 via-blue-400 to-green-400 mb-2">
|
| 91 |
+
ARCADE PASSWORD GENERATOR
|
| 92 |
+
</h1>
|
| 93 |
+
<div class="flex justify-center items-center gap-4">
|
| 94 |
+
<div class="bg-blue-900 px-4 py-2 rounded-lg border-2 border-blue-400">
|
| 95 |
+
<span class="text-green-400">SAVED: </span>
|
| 96 |
+
<span id="saved-count" class="text-yellow-300">00</span>
|
| 97 |
+
</div>
|
| 98 |
+
<div class="bg-purple-900 px-4 py-2 rounded-lg border-2 border-purple-400">
|
| 99 |
+
<span class="text-pink-400">LEVEL: </span>
|
| 100 |
+
<span id="level-count" class="text-yellow-300">01</span>
|
| 101 |
+
</div>
|
| 102 |
+
</div>
|
| 103 |
+
</div>
|
| 104 |
+
|
| 105 |
+
<!-- Password Display -->
|
| 106 |
+
<div class="bg-black p-4 rounded-lg border-2 border-green-500 mb-6 relative">
|
| 107 |
+
<div class="flex justify-between items-center">
|
| 108 |
+
<span class="text-green-400">PASSWORD:</span>
|
| 109 |
+
<div class="flex gap-2">
|
| 110 |
+
<button id="copy-btn" class="arcade-btn bg-blue-600 hover:bg-blue-500 text-white px-3 py-1 rounded bounce">
|
| 111 |
+
COPY
|
| 112 |
+
</button>
|
| 113 |
+
<button id="save-btn" class="arcade-btn bg-pink-600 hover:bg-pink-500 text-white px-3 py-1 rounded bounce">
|
| 114 |
+
SAVE
|
| 115 |
+
</button>
|
| 116 |
+
</div>
|
| 117 |
+
</div>
|
| 118 |
+
<div id="password-display" class="text-2xl md:text-3xl text-center py-4 my-2 bg-gray-800 rounded border border-gray-700 relative">
|
| 119 |
+
<span id="password-text" class="text-yellow-300">PRESS GENERATE</span>
|
| 120 |
+
<span id="cursor" class="blink text-green-400">|</span>
|
| 121 |
+
</div>
|
| 122 |
+
</div>
|
| 123 |
+
|
| 124 |
+
<!-- Generator Controls -->
|
| 125 |
+
<div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-6">
|
| 126 |
+
<div class="bg-gray-800 p-4 rounded-lg border-2 border-blue-400">
|
| 127 |
+
<h3 class="text-blue-400 mb-2 text-center">MODE</h3>
|
| 128 |
+
<div class="flex flex-col gap-2">
|
| 129 |
+
<button id="friendly-btn" class="arcade-btn bg-green-700 hover:bg-green-600 text-white py-2 rounded bounce">
|
| 130 |
+
FRIENDLY
|
| 131 |
+
</button>
|
| 132 |
+
<button id="strong-btn" class="arcade-btn bg-yellow-600 hover:bg-yellow-500 text-white py-2 rounded bounce">
|
| 133 |
+
STRONG
|
| 134 |
+
</button>
|
| 135 |
+
<button id="custom-btn" class="arcade-btn bg-purple-700 hover:bg-purple-600 text-white py-2 rounded bounce">
|
| 136 |
+
CUSTOM
|
| 137 |
+
</button>
|
| 138 |
+
</div>
|
| 139 |
+
</div>
|
| 140 |
+
|
| 141 |
+
<div class="bg-gray-800 p-4 rounded-lg border-2 border-pink-400">
|
| 142 |
+
<h3 class="text-pink-400 mb-2 text-center">LENGTH</h3>
|
| 143 |
+
<div class="flex flex-col items-center">
|
| 144 |
+
<input id="length-slider" type="range" min="4" max="32" value="12" class="w-full mb-2">
|
| 145 |
+
<span id="length-value" class="text-yellow-300">12</span>
|
| 146 |
+
</div>
|
| 147 |
+
</div>
|
| 148 |
+
|
| 149 |
+
<div id="custom-options" class="bg-gray-800 p-4 rounded-lg border-2 border-green-400 hidden">
|
| 150 |
+
<h3 class="text-green-400 mb-2 text-center">CUSTOM OPTIONS</h3>
|
| 151 |
+
<div class="flex flex-col gap-2">
|
| 152 |
+
<label class="flex items-center">
|
| 153 |
+
<input type="checkbox" id="uppercase" checked class="mr-2">
|
| 154 |
+
<span>Uppercase (A-Z)</span>
|
| 155 |
+
</label>
|
| 156 |
+
<label class="flex items-center">
|
| 157 |
+
<input type="checkbox" id="lowercase" checked class="mr-2">
|
| 158 |
+
<span>Lowercase (a-z)</span>
|
| 159 |
+
</label>
|
| 160 |
+
<label class="flex items-center">
|
| 161 |
+
<input type="checkbox" id="numbers" checked class="mr-2">
|
| 162 |
+
<span>Numbers (0-9)</span>
|
| 163 |
+
</label>
|
| 164 |
+
<label class="flex items-center">
|
| 165 |
+
<input type="checkbox" id="symbols" checked class="mr-2">
|
| 166 |
+
<span>Symbols (!@#$)</span>
|
| 167 |
+
</label>
|
| 168 |
+
</div>
|
| 169 |
+
</div>
|
| 170 |
+
</div>
|
| 171 |
+
|
| 172 |
+
<!-- Seed Input -->
|
| 173 |
+
<div class="bg-gray-800 p-4 rounded-lg border-2 border-yellow-400 mb-6">
|
| 174 |
+
<h3 class="text-yellow-400 mb-2">SEED (OPTIONAL)</h3>
|
| 175 |
+
<div class="flex gap-2">
|
| 176 |
+
<input id="seed-input" type="text" placeholder="Enter seed for reproducibility" class="flex-1 bg-black text-white p-2 rounded border border-gray-700">
|
| 177 |
+
<button id="generate-btn" class="arcade-btn bg-red-600 hover:bg-red-500 text-white px-4 py-2 rounded-lg bounce flash">
|
| 178 |
+
GENERATE
|
| 179 |
+
</button>
|
| 180 |
+
</div>
|
| 181 |
+
</div>
|
| 182 |
+
|
| 183 |
+
<!-- Saved Passwords -->
|
| 184 |
+
<div class="bg-gray-800 p-4 rounded-lg border-2 border-purple-400">
|
| 185 |
+
<div class="flex justify-between items-center mb-4">
|
| 186 |
+
<h3 class="text-purple-400">SAVED PASSWORDS</h3>
|
| 187 |
+
<div class="flex gap-2">
|
| 188 |
+
<button id="download-btn" class="arcade-btn bg-blue-600 hover:bg-blue-500 text-white px-3 py-1 rounded bounce">
|
| 189 |
+
DOWNLOAD .TXT
|
| 190 |
+
</button>
|
| 191 |
+
<button id="clear-all-btn" class="arcade-btn bg-red-600 hover:bg-red-500 text-white px-3 py-1 rounded bounce">
|
| 192 |
+
CLEAR ALL
|
| 193 |
+
</button>
|
| 194 |
+
</div>
|
| 195 |
+
</div>
|
| 196 |
+
<div id="saved-passwords" class="space-y-2 max-h-64 overflow-y-auto">
|
| 197 |
+
<!-- Passwords will be added here -->
|
| 198 |
+
<div class="text-center text-gray-500 py-4">No passwords saved yet</div>
|
| 199 |
+
</div>
|
| 200 |
+
</div>
|
| 201 |
+
</div>
|
| 202 |
+
|
| 203 |
+
<!-- Sound toggle -->
|
| 204 |
+
<div class="fixed bottom-4 right-4">
|
| 205 |
+
<button id="sound-toggle" class="arcade-btn bg-gray-800 hover:bg-gray-700 text-white p-3 rounded-full bounce">
|
| 206 |
+
<i class="fas fa-volume-up"></i>
|
| 207 |
+
</button>
|
| 208 |
+
</div>
|
| 209 |
+
|
| 210 |
+
<script>
|
| 211 |
+
// DOM Elements
|
| 212 |
+
const passwordDisplay = document.getElementById('password-text');
|
| 213 |
+
const cursor = document.getElementById('cursor');
|
| 214 |
+
const lengthSlider = document.getElementById('length-slider');
|
| 215 |
+
const lengthValue = document.getElementById('length-value');
|
| 216 |
+
const generateBtn = document.getElementById('generate-btn');
|
| 217 |
+
const copyBtn = document.getElementById('copy-btn');
|
| 218 |
+
const saveBtn = document.getElementById('save-btn');
|
| 219 |
+
const friendlyBtn = document.getElementById('friendly-btn');
|
| 220 |
+
const strongBtn = document.getElementById('strong-btn');
|
| 221 |
+
const customBtn = document.getElementById('custom-btn');
|
| 222 |
+
const customOptions = document.getElementById('custom-options');
|
| 223 |
+
const uppercaseCheck = document.getElementById('uppercase');
|
| 224 |
+
const lowercaseCheck = document.getElementById('lowercase');
|
| 225 |
+
const numbersCheck = document.getElementById('numbers');
|
| 226 |
+
const symbolsCheck = document.getElementById('symbols');
|
| 227 |
+
const seedInput = document.getElementById('seed-input');
|
| 228 |
+
const savedPasswords = document.getElementById('saved-passwords');
|
| 229 |
+
const savedCount = document.getElementById('saved-count');
|
| 230 |
+
const levelCount = document.getElementById('level-count');
|
| 231 |
+
const downloadBtn = document.getElementById('download-btn');
|
| 232 |
+
const clearAllBtn = document.getElementById('clear-all-btn');
|
| 233 |
+
const soundToggle = document.getElementById('sound-toggle');
|
| 234 |
+
const notification = document.getElementById('notification');
|
| 235 |
+
const notificationText = document.getElementById('notification-text');
|
| 236 |
+
|
| 237 |
+
// State
|
| 238 |
+
let currentPassword = '';
|
| 239 |
+
let savedPasswordsList = JSON.parse(localStorage.getItem('savedPasswords')) || [];
|
| 240 |
+
let soundEnabled = true;
|
| 241 |
+
let level = 1;
|
| 242 |
+
|
| 243 |
+
// Initialize
|
| 244 |
+
updateSavedPasswordsDisplay();
|
| 245 |
+
updateLevel();
|
| 246 |
+
|
| 247 |
+
// Event Listeners
|
| 248 |
+
lengthSlider.addEventListener('input', () => {
|
| 249 |
+
lengthValue.textContent = lengthSlider.value;
|
| 250 |
+
});
|
| 251 |
+
|
| 252 |
+
generateBtn.addEventListener('click', generatePassword);
|
| 253 |
+
copyBtn.addEventListener('click', copyPassword);
|
| 254 |
+
saveBtn.addEventListener('click', savePassword);
|
| 255 |
+
friendlyBtn.addEventListener('click', () => setMode('friendly'));
|
| 256 |
+
strongBtn.addEventListener('click', () => setMode('strong'));
|
| 257 |
+
customBtn.addEventListener('click', () => setMode('custom'));
|
| 258 |
+
downloadBtn.addEventListener('click', downloadPasswords);
|
| 259 |
+
clearAllBtn.addEventListener('click', clearAllPasswords);
|
| 260 |
+
soundToggle.addEventListener('click', toggleSound);
|
| 261 |
+
|
| 262 |
+
// Set initial mode
|
| 263 |
+
setMode('friendly');
|
| 264 |
+
|
| 265 |
+
// Functions
|
| 266 |
+
function setMode(mode) {
|
| 267 |
+
// Reset all buttons
|
| 268 |
+
friendlyBtn.classList.remove('glow');
|
| 269 |
+
strongBtn.classList.remove('glow');
|
| 270 |
+
customBtn.classList.remove('glow');
|
| 271 |
+
|
| 272 |
+
// Hide custom options by default
|
| 273 |
+
customOptions.classList.add('hidden');
|
| 274 |
+
|
| 275 |
+
// Set the selected mode
|
| 276 |
+
switch(mode) {
|
| 277 |
+
case 'friendly':
|
| 278 |
+
friendlyBtn.classList.add('glow');
|
| 279 |
+
lengthSlider.value = 8;
|
| 280 |
+
lengthValue.textContent = '8';
|
| 281 |
+
break;
|
| 282 |
+
case 'strong':
|
| 283 |
+
strongBtn.classList.add('glow');
|
| 284 |
+
lengthSlider.value = 16;
|
| 285 |
+
lengthValue.textContent = '16';
|
| 286 |
+
break;
|
| 287 |
+
case 'custom':
|
| 288 |
+
customBtn.classList.add('glow');
|
| 289 |
+
customOptions.classList.remove('hidden');
|
| 290 |
+
break;
|
| 291 |
+
}
|
| 292 |
+
|
| 293 |
+
// Play sound if enabled
|
| 294 |
+
if (soundEnabled) {
|
| 295 |
+
playSound('click');
|
| 296 |
+
}
|
| 297 |
+
}
|
| 298 |
+
|
| 299 |
+
function generatePassword() {
|
| 300 |
+
const length = parseInt(lengthSlider.value);
|
| 301 |
+
const seed = seedInput.value;
|
| 302 |
+
|
| 303 |
+
let charset = '';
|
| 304 |
+
let password = '';
|
| 305 |
+
|
| 306 |
+
// Determine character set based on mode
|
| 307 |
+
if (friendlyBtn.classList.contains('glow')) {
|
| 308 |
+
// Friendly mode - easy to remember words
|
| 309 |
+
const words = ['apple', 'banana', 'cherry', 'dragon', 'elephant', 'flamingo', 'giraffe', 'honey', 'iguana', 'jelly', 'koala', 'lemon', 'mango', 'ninja', 'orange', 'panda', 'quokka', 'rainbow', 'sunshine', 'tiger', 'unicorn', 'volcano', 'watermelon', 'xylophone', 'yellow', 'zebra'];
|
| 310 |
+
const separators = ['-', '_', '.', '!', '@', '#', '$', '%', '&', '*'];
|
| 311 |
+
|
| 312 |
+
// Generate a pattern like word-separator-word-number
|
| 313 |
+
const word1 = words[Math.floor(Math.random() * words.length)];
|
| 314 |
+
const word2 = words[Math.floor(Math.random() * words.length)];
|
| 315 |
+
const separator = separators[Math.floor(Math.random() * separators.length)];
|
| 316 |
+
const num = Math.floor(Math.random() * 90) + 10; // 10-99
|
| 317 |
+
|
| 318 |
+
password = `${word1}${separator}${word2}${num}`;
|
| 319 |
+
|
| 320 |
+
// If seed is provided, use it to generate predictable results
|
| 321 |
+
if (seed) {
|
| 322 |
+
const seedNum = hashSeed(seed);
|
| 323 |
+
const w1 = words[seedNum % words.length];
|
| 324 |
+
const w2 = words[(seedNum + 1) % words.length];
|
| 325 |
+
const sep = separators[(seedNum + 2) % separators.length];
|
| 326 |
+
const n = (seedNum % 90) + 10;
|
| 327 |
+
password = `${w1}${sep}${w2}${n}`;
|
| 328 |
+
}
|
| 329 |
+
|
| 330 |
+
// Ensure the password isn't too long
|
| 331 |
+
if (password.length > length) {
|
| 332 |
+
password = password.substring(0, length);
|
| 333 |
+
}
|
| 334 |
+
}
|
| 335 |
+
else if (strongBtn.classList.contains('glow')) {
|
| 336 |
+
// Strong mode - completely random characters
|
| 337 |
+
charset = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()_+-=[]{}|;:,.<>?';
|
| 338 |
+
|
| 339 |
+
if (seed) {
|
| 340 |
+
// Use seed for reproducibility
|
| 341 |
+
const seedNum = hashSeed(seed);
|
| 342 |
+
for (let i = 0; i < length; i++) {
|
| 343 |
+
const index = (seedNum + i) % charset.length;
|
| 344 |
+
password += charset.charAt(index);
|
| 345 |
+
}
|
| 346 |
+
} else {
|
| 347 |
+
// Completely random
|
| 348 |
+
for (let i = 0; i < length; i++) {
|
| 349 |
+
const randomIndex = Math.floor(Math.random() * charset.length);
|
| 350 |
+
password += charset.charAt(randomIndex);
|
| 351 |
+
}
|
| 352 |
+
}
|
| 353 |
+
}
|
| 354 |
+
else {
|
| 355 |
+
// Custom mode - use selected character sets
|
| 356 |
+
if (uppercaseCheck.checked) charset += 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
| 357 |
+
if (lowercaseCheck.checked) charset += 'abcdefghijklmnopqrstuvwxyz';
|
| 358 |
+
if (numbersCheck.checked) charset += '0123456789';
|
| 359 |
+
if (symbolsCheck.checked) charset += '!@#$%^&*()_+-=[]{}|;:,.<>?';
|
| 360 |
+
|
| 361 |
+
if (charset.length === 0) {
|
| 362 |
+
showNotification('Please select at least one character set!', 'red');
|
| 363 |
+
return;
|
| 364 |
+
}
|
| 365 |
+
|
| 366 |
+
if (seed) {
|
| 367 |
+
// Use seed for reproducibility
|
| 368 |
+
const seedNum = hashSeed(seed);
|
| 369 |
+
for (let i = 0; i < length; i++) {
|
| 370 |
+
const index = (seedNum + i) % charset.length;
|
| 371 |
+
password += charset.charAt(index);
|
| 372 |
+
}
|
| 373 |
+
} else {
|
| 374 |
+
// Completely random
|
| 375 |
+
for (let i = 0; i < length; i++) {
|
| 376 |
+
const randomIndex = Math.floor(Math.random() * charset.length);
|
| 377 |
+
password += charset.charAt(randomIndex);
|
| 378 |
+
}
|
| 379 |
+
}
|
| 380 |
+
}
|
| 381 |
+
|
| 382 |
+
currentPassword = password;
|
| 383 |
+
|
| 384 |
+
// Animate the password display
|
| 385 |
+
passwordDisplay.textContent = '';
|
| 386 |
+
let i = 0;
|
| 387 |
+
const typingEffect = setInterval(() => {
|
| 388 |
+
if (i < password.length) {
|
| 389 |
+
passwordDisplay.textContent += password.charAt(i);
|
| 390 |
+
i++;
|
| 391 |
+
|
| 392 |
+
// Play typing sound if enabled
|
| 393 |
+
if (soundEnabled && i % 2 === 0) {
|
| 394 |
+
playSound('type');
|
| 395 |
+
}
|
| 396 |
+
} else {
|
| 397 |
+
clearInterval(typingEffect);
|
| 398 |
+
|
| 399 |
+
// Show success notification
|
| 400 |
+
showNotification('PASSWORD GENERATED!', 'green');
|
| 401 |
+
|
| 402 |
+
// Play success sound if enabled
|
| 403 |
+
if (soundEnabled) {
|
| 404 |
+
playSound('success');
|
| 405 |
+
}
|
| 406 |
+
}
|
| 407 |
+
}, 50);
|
| 408 |
+
|
| 409 |
+
// Animate the generate button
|
| 410 |
+
generateBtn.classList.add('flash');
|
| 411 |
+
setTimeout(() => {
|
| 412 |
+
generateBtn.classList.remove('flash');
|
| 413 |
+
}, 300);
|
| 414 |
+
}
|
| 415 |
+
|
| 416 |
+
function copyPassword() {
|
| 417 |
+
if (!currentPassword) {
|
| 418 |
+
showNotification('No password to copy!', 'red');
|
| 419 |
+
return;
|
| 420 |
+
}
|
| 421 |
+
|
| 422 |
+
navigator.clipboard.writeText(currentPassword)
|
| 423 |
+
.then(() => {
|
| 424 |
+
showNotification('COPIED TO CLIPBOARD!', 'blue');
|
| 425 |
+
|
| 426 |
+
// Animate the copy button
|
| 427 |
+
copyBtn.classList.add('flash');
|
| 428 |
+
setTimeout(() => {
|
| 429 |
+
copyBtn.classList.remove('flash');
|
| 430 |
+
}, 300);
|
| 431 |
+
|
| 432 |
+
// Play sound if enabled
|
| 433 |
+
if (soundEnabled) {
|
| 434 |
+
playSound('click');
|
| 435 |
+
}
|
| 436 |
+
})
|
| 437 |
+
.catch(err => {
|
| 438 |
+
console.error('Failed to copy: ', err);
|
| 439 |
+
showNotification('Failed to copy!', 'red');
|
| 440 |
+
});
|
| 441 |
+
}
|
| 442 |
+
|
| 443 |
+
function savePassword() {
|
| 444 |
+
if (!currentPassword) {
|
| 445 |
+
showNotification('No password to save!', 'red');
|
| 446 |
+
return;
|
| 447 |
+
}
|
| 448 |
+
|
| 449 |
+
// Check if password already exists
|
| 450 |
+
if (savedPasswordsList.includes(currentPassword)) {
|
| 451 |
+
showNotification('Password already saved!', 'yellow');
|
| 452 |
+
return;
|
| 453 |
+
}
|
| 454 |
+
|
| 455 |
+
// Add to saved passwords
|
| 456 |
+
savedPasswordsList.push(currentPassword);
|
| 457 |
+
localStorage.setItem('savedPasswords', JSON.stringify(savedPasswordsList));
|
| 458 |
+
|
| 459 |
+
// Update display
|
| 460 |
+
updateSavedPasswordsDisplay();
|
| 461 |
+
|
| 462 |
+
// Show success notification
|
| 463 |
+
showNotification('PASSWORD SAVED!', 'green');
|
| 464 |
+
|
| 465 |
+
// Animate the save button
|
| 466 |
+
saveBtn.classList.add('flash');
|
| 467 |
+
setTimeout(() => {
|
| 468 |
+
saveBtn.classList.remove('flash');
|
| 469 |
+
}, 300);
|
| 470 |
+
|
| 471 |
+
// Play sound if enabled
|
| 472 |
+
if (soundEnabled) {
|
| 473 |
+
playSound('coin');
|
| 474 |
+
}
|
| 475 |
+
|
| 476 |
+
// Check for level up
|
| 477 |
+
checkLevelUp();
|
| 478 |
+
}
|
| 479 |
+
|
| 480 |
+
function updateSavedPasswordsDisplay() {
|
| 481 |
+
savedPasswords.innerHTML = '';
|
| 482 |
+
|
| 483 |
+
if (savedPasswordsList.length === 0) {
|
| 484 |
+
savedPasswords.innerHTML = '<div class="text-center text-gray-500 py-4">No passwords saved yet</div>';
|
| 485 |
+
savedCount.textContent = '00';
|
| 486 |
+
return;
|
| 487 |
+
}
|
| 488 |
+
|
| 489 |
+
savedCount.textContent = savedPasswordsList.length.toString().padStart(2, '0');
|
| 490 |
+
|
| 491 |
+
savedPasswordsList.forEach((password, index) => {
|
| 492 |
+
const passwordItem = document.createElement('div');
|
| 493 |
+
passwordItem.className = 'password-item bg-gray-700 p-3 rounded-lg border border-gray-600 flex justify-between items-center';
|
| 494 |
+
|
| 495 |
+
passwordItem.innerHTML = `
|
| 496 |
+
<div class="flex items-center">
|
| 497 |
+
<span class="text-yellow-400 mr-2">${(index + 1).toString().padStart(2, '0')}</span>
|
| 498 |
+
<span class="text-green-300 font-mono">${password}</span>
|
| 499 |
+
</div>
|
| 500 |
+
<button class="delete-btn arcade-btn bg-red-600 hover:bg-red-500 text-white px-2 py-1 rounded bounce" data-index="${index}">
|
| 501 |
+
<i class="fas fa-trash"></i>
|
| 502 |
+
</button>
|
| 503 |
+
`;
|
| 504 |
+
|
| 505 |
+
savedPasswords.appendChild(passwordItem);
|
| 506 |
+
});
|
| 507 |
+
|
| 508 |
+
// Add event listeners to delete buttons
|
| 509 |
+
document.querySelectorAll('.delete-btn').forEach(btn => {
|
| 510 |
+
btn.addEventListener('click', function() {
|
| 511 |
+
const index = parseInt(this.getAttribute('data-index'));
|
| 512 |
+
deletePassword(index);
|
| 513 |
+
});
|
| 514 |
+
});
|
| 515 |
+
}
|
| 516 |
+
|
| 517 |
+
function deletePassword(index) {
|
| 518 |
+
savedPasswordsList.splice(index, 1);
|
| 519 |
+
localStorage.setItem('savedPasswords', JSON.stringify(savedPasswordsList));
|
| 520 |
+
updateSavedPasswordsDisplay();
|
| 521 |
+
|
| 522 |
+
// Show notification
|
| 523 |
+
showNotification('PASSWORD DELETED!', 'red');
|
| 524 |
+
|
| 525 |
+
// Play sound if enabled
|
| 526 |
+
if (soundEnabled) {
|
| 527 |
+
playSound('delete');
|
| 528 |
+
}
|
| 529 |
+
}
|
| 530 |
+
|
| 531 |
+
function clearAllPasswords() {
|
| 532 |
+
if (savedPasswordsList.length === 0) {
|
| 533 |
+
showNotification('No passwords to clear!', 'red');
|
| 534 |
+
return;
|
| 535 |
+
}
|
| 536 |
+
|
| 537 |
+
savedPasswordsList = [];
|
| 538 |
+
localStorage.setItem('savedPasswords', JSON.stringify(savedPasswordsList));
|
| 539 |
+
updateSavedPasswordsDisplay();
|
| 540 |
+
|
| 541 |
+
// Show notification
|
| 542 |
+
showNotification('ALL PASSWORDS CLEARED!', 'red');
|
| 543 |
+
|
| 544 |
+
// Animate the clear button
|
| 545 |
+
clearAllBtn.classList.add('flash');
|
| 546 |
+
setTimeout(() => {
|
| 547 |
+
clearAllBtn.classList.remove('flash');
|
| 548 |
+
}, 300);
|
| 549 |
+
|
| 550 |
+
// Play sound if enabled
|
| 551 |
+
if (soundEnabled) {
|
| 552 |
+
playSound('delete');
|
| 553 |
+
}
|
| 554 |
+
|
| 555 |
+
// Reset level
|
| 556 |
+
level = 1;
|
| 557 |
+
updateLevel();
|
| 558 |
+
}
|
| 559 |
+
|
| 560 |
+
function downloadPasswords() {
|
| 561 |
+
if (savedPasswordsList.length === 0) {
|
| 562 |
+
showNotification('No passwords to download!', 'red');
|
| 563 |
+
return;
|
| 564 |
+
}
|
| 565 |
+
|
| 566 |
+
const content = savedPasswordsList.join('\n\n');
|
| 567 |
+
const blob = new Blob([content], { type: 'text/plain' });
|
| 568 |
+
const url = URL.createObjectURL(blob);
|
| 569 |
+
const a = document.createElement('a');
|
| 570 |
+
a.href = url;
|
| 571 |
+
a.download = 'arcade-passwords.txt';
|
| 572 |
+
document.body.appendChild(a);
|
| 573 |
+
a.click();
|
| 574 |
+
document.body.removeChild(a);
|
| 575 |
+
URL.revokeObjectURL(url);
|
| 576 |
+
|
| 577 |
+
// Show notification
|
| 578 |
+
showNotification('DOWNLOAD STARTED!', 'blue');
|
| 579 |
+
|
| 580 |
+
// Animate the download button
|
| 581 |
+
downloadBtn.classList.add('flash');
|
| 582 |
+
setTimeout(() => {
|
| 583 |
+
downloadBtn.classList.remove('flash');
|
| 584 |
+
}, 300);
|
| 585 |
+
|
| 586 |
+
// Play sound if enabled
|
| 587 |
+
if (soundEnabled) {
|
| 588 |
+
playSound('click');
|
| 589 |
+
}
|
| 590 |
+
}
|
| 591 |
+
|
| 592 |
+
function toggleSound() {
|
| 593 |
+
soundEnabled = !soundEnabled;
|
| 594 |
+
soundToggle.innerHTML = soundEnabled ? '<i class="fas fa-volume-up"></i>' : '<i class="fas fa-volume-mute"></i>';
|
| 595 |
+
|
| 596 |
+
// Show notification
|
| 597 |
+
showNotification(soundEnabled ? 'SOUND ON!' : 'SOUND OFF!', soundEnabled ? 'green' : 'red');
|
| 598 |
+
|
| 599 |
+
// Play sound if enabling
|
| 600 |
+
if (soundEnabled) {
|
| 601 |
+
playSound('click');
|
| 602 |
+
}
|
| 603 |
+
}
|
| 604 |
+
|
| 605 |
+
function showNotification(message, color) {
|
| 606 |
+
notificationText.textContent = message;
|
| 607 |
+
notification.className = `notification bg-${color}-600 p-4 rounded-lg shadow-lg border-2 border-${color === 'yellow' ? 'yellow-400' : color === 'red' ? 'red-400' : color === 'blue' ? 'blue-400' : 'green-400'} show`;
|
| 608 |
+
|
| 609 |
+
setTimeout(() => {
|
| 610 |
+
notification.classList.remove('show');
|
| 611 |
+
}, 3000);
|
| 612 |
+
}
|
| 613 |
+
|
| 614 |
+
function playSound(type) {
|
| 615 |
+
if (!soundEnabled) return;
|
| 616 |
+
|
| 617 |
+
// In a real app, you would play actual sound files here
|
| 618 |
+
// For this demo, we'll just log the sound type
|
| 619 |
+
console.log(`Playing ${type} sound`);
|
| 620 |
+
}
|
| 621 |
+
|
| 622 |
+
function hashSeed(seed) {
|
| 623 |
+
// Simple hash function for seed reproducibility
|
| 624 |
+
let hash = 0;
|
| 625 |
+
for (let i = 0; i < seed.length; i++) {
|
| 626 |
+
const char = seed.charCodeAt(i);
|
| 627 |
+
hash = ((hash << 5) - hash) + char;
|
| 628 |
+
hash = hash & hash; // Convert to 32bit integer
|
| 629 |
+
}
|
| 630 |
+
return Math.abs(hash);
|
| 631 |
+
}
|
| 632 |
+
|
| 633 |
+
function checkLevelUp() {
|
| 634 |
+
const passwordsCount = savedPasswordsList.length;
|
| 635 |
+
const newLevel = Math.floor(passwordsCount / 5) + 1;
|
| 636 |
+
|
| 637 |
+
if (newLevel > level) {
|
| 638 |
+
level = newLevel;
|
| 639 |
+
updateLevel();
|
| 640 |
+
showNotification('LEVEL UP!', 'pink');
|
| 641 |
+
|
| 642 |
+
// Play level up sound if enabled
|
| 643 |
+
if (soundEnabled) {
|
| 644 |
+
playSound('levelup');
|
| 645 |
+
}
|
| 646 |
+
}
|
| 647 |
+
}
|
| 648 |
+
|
| 649 |
+
function updateLevel() {
|
| 650 |
+
levelCount.textContent = level.toString().padStart(2, '0');
|
| 651 |
+
}
|
| 652 |
+
</script>
|
| 653 |
+
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - <a href="https://enzostvs-deepsite.hf.space?remix=intipires/pwd-gen" style="color: #fff;text-decoration: underline;" target="_blank" >🧬 Remix</a></p><p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=NzService/password-generator" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 654 |
+
</html>
|
prompts.txt
ADDED
|
File without changes
|