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
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
<!DOCTYPE html>
<html lang="es">
<head>
  <meta charset="UTF-8">
  <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
  <style>
    :root {
      --bg: #09090b;
      --surface: #18181b;
      --border: #27272a;
      --text: #f4f4f5;
      --text-muted: #a1a1aa;
      --accent: #8b5cf6;
      --accent-hover: #7c3aed;
      --success: #10b981;
    }

    * { box-sizing: border-box; }
    
    @keyframes spin { 100% { transform: rotate(360deg); } }
    
    body { 
      width: 500px; 
      font-family: 'Inter', sans-serif; 
      padding: 20px; 
      margin: 0; 
      background-color: var(--bg); 
      color: var(--text);
    }
    
    .header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 20px;
      padding-bottom: 15px;
      border-bottom: 1px solid var(--border);
    }

    h3 { 
      margin: 0; 
      font-size: 18px;
      font-weight: 700;
      background: linear-gradient(135deg, #a78bfa 0%, #ec4899 100%);
      -webkit-background-clip: text;
      background-clip: text;
      -webkit-text-fill-color: transparent;
      display: flex;
      align-items: center;
      gap: 8px;
    }
    
    .badge {
      background: rgba(139, 92, 246, 0.15);
      color: #c4b5fd;
      padding: 4px 10px;
      border-radius: 12px;
      font-size: 11px;
      font-weight: 600;
      letter-spacing: 0.5px;
    }

    ul { 
      list-style-type: none; 
      padding: 0; 
      margin: 0; 
      display: flex;
      flex-direction: column;
      gap: 12px;
    }
    
    li { 
      background: var(--surface); 
      padding: 12px; 
      border-radius: 10px; 
      border: 1px solid var(--border);
      display: flex; 
      flex-direction: column; 
      gap: 10px;
      transition: transform 0.2s, border-color 0.2s;
    }
    
    li:hover {
      border-color: #3f3f46;
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    }

    .url-container {
      background: #000;
      padding: 10px;
      border-radius: 6px;
      border: 1px solid #27272a;
    }
    
    .url { 
      font-size: 11px; 
      word-break: break-all; 
      color: var(--text-muted);
      font-family: 'Consolas', monospace;
      line-height: 1.4;
    }
    
    button { 
      background: var(--surface); 
      color: var(--text); 
      border: 1px solid var(--border); 
      padding: 8px 12px; 
      border-radius: 6px; 
      cursor: pointer; 
      font-size: 13px;
      font-weight: 600; 
      transition: all 0.2s ease;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      width: 100%;
    }
    
    button:hover:not(:disabled) { 
      background: #27272a; 
      border-color: #52525b;
    }

    button:disabled {
      opacity: 0.6;
      cursor: not-allowed;
    }
    
    button.primary {
      background: linear-gradient(135deg, var(--accent) 0%, #6d28d9 100%);
      color: white;
      border: none;
      margin-bottom: 20px;
      padding: 12px;
      font-size: 14px;
      box-shadow: 0 4px 12px rgba(109, 40, 217, 0.3);
    }
    
    button.primary:hover:not(:disabled) {
      background: linear-gradient(135deg, var(--accent-hover) 0%, #5b21b6 100%);
      transform: translateY(-1px);
      box-shadow: 0 6px 16px rgba(109, 40, 217, 0.4);
    }

    button.secondary {
      background: #27272a;
      color: white;
      border: 1px solid #3f3f46;
      margin-bottom: 20px;
      padding: 12px;
      font-size: 14px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    }
    button.secondary:hover:not(:disabled) {
      background: #3f3f46;
    }

    button.success {
      background: var(--success) !important;
      color: white !important;
      border-color: var(--success) !important;
      box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
    }

    .status { 
      text-align: center; 
      font-size: 13px; 
      color: var(--text-muted); 
      padding: 30px 20px;
      background: var(--surface);
      border-radius: 8px;
      border: 1px dashed #3f3f46;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 10px;
    }

    .tool-list {
      display: flex;
      flex-direction: column;
      gap: 15px;
    }
    .tool-card {
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 12px;
      overflow: hidden;
      transition: all 0.2s ease;
    }
    .tool-card:hover { border-color: #3f3f46; }
    
    .tool-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 16px;
      background: rgba(255,255,255,0.02);
    }
    
    .tool-info {
        display: flex;
        align-items: center;
        gap: 14px;
    }
    
    .tool-icon {
        width: 38px;
        height: 38px;
        background: rgba(255,255,255,0.05);
        border: 1px solid var(--border);
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .tool-title { font-size: 14px; font-weight: 600; color: #fff; margin-bottom: 2px; }
    .tool-desc { font-size: 11px; color: var(--text-muted); }
    
    .tool-body {
        padding: 16px;
        border-top: 1px solid var(--border);
        background: rgba(0,0,0,0.2);
    }
    
    /* Toggle Switch */
    .switch {
      position: relative;
      display: inline-block;
      width: 44px;
      height: 24px;
    }
    .switch input { opacity: 0; width: 0; height: 0; }
    .slider {
      position: absolute;
      cursor: pointer;
      top: 0; left: 0; right: 0; bottom: 0;
      background-color: #3f3f46;
      transition: .3s;
    }
    .slider:before {
      position: absolute;
      content: "";
      height: 18px; width: 18px;
      left: 3px; bottom: 3px;
      background-color: white;
      transition: .3s;
    }
    input:checked + .slider { background-color: var(--success); }
    input:checked + .slider:before { transform: translateX(20px); }
    .slider.round { border-radius: 24px; }
    .slider.round:before { border-radius: 50%; }
    .icon-btn {
      background: transparent;
      border: none;
      color: var(--text-muted);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 4px;
      border-radius: 4px;
      transition: all 0.2s;
    }
    .icon-btn:hover {
      color: var(--text);
      background: rgba(255,255,255,0.1);
    }
  </style>
</head>
<body>
  <div class="header">
    <div style="display:flex; align-items:center; gap:8px;">
      <h3>
        <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="url(#grad)" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
          <defs>
            <linearGradient id="grad" x1="0%" y1="0%" x2="100%" y2="100%">
              <stop offset="0%" style="stop-color:#a78bfa" />
              <stop offset="100%" style="stop-color:#ec4899" />
            </linearGradient>
          </defs>
          <path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path>
          <polyline points="7 10 12 15 17 10"></polyline>
          <line x1="12" y1="15" x2="12" y2="3"></line>
        </svg>
        LinkDetector
      </h3>
      <button id="info-btn" class="icon-btn" title="Información de Herramientas">
        <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><line x1="12" y1="8" x2="12.01" y2="8"></line></svg>
      </button>
    </div>
    <span id="count-badge" class="badge" style="display:none;">0 videos</span>
  </div>

  <div id="info-panel" style="display: none; background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 10px; padding: 15px; margin-bottom: 15px; font-size: 13px; color: var(--text-muted); line-height: 1.5;">
    <strong style="color: #fff; display:block; margin-bottom: 10px; font-size: 14px;">Guía de Herramientas</strong>
    
    <div style="margin-bottom: 10px;">
      <b style="color: #ec4899; display:flex; align-items:center; gap:5px;">
        <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="23 7 16 12 23 17 23 7"></polygon><rect x="1" y="5" width="15" height="14" rx="2" ry="2"></rect></svg>
        Modo Extractor Erome
      </b>
      Escanea álbumes y extrae los enlaces de todos los videos. Exclusivo para Erome.
    </div>
    
    <div>
      <b style="color: #a78bfa; display:flex; align-items:center; gap:5px;">
        <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M12 20h9"></path><path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"></path></svg>
        Modo Selector Kemono
      </b>
      Inyecta un menú en la página para dar clic en las portadas de Kemono y copiar la url de varias publicaciones a la vez. Solo aparece en Kemono.
    </div>

    <div style="margin-top: 10px;">
      <b style="color: #fbbf24; display:flex; align-items:center; gap:5px;">
        <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg>
        Extraer Descargas Kemono
      </b>
      Selecciona portadas en Kemono: pero en lugar de copiar el enlace del post, entra a cada post por ti y extrae los enlaces directos de descarga (ZIPs, Mega, Drive).
    </div>

    <div style="margin-top: 10px;">
      <b style="color: #14b8a6; display:flex; align-items:center; gap:5px;">
        <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><circle cx="8.5" cy="8.5" r="1.5"></circle><polyline points="21 15 16 10 5 21"></polyline></svg>
        Extraer Imágenes Kemono
      </b>
      Selecciona posts en Kemono para procesarlos en segundo plano, extraer todas sus imágenes y descargarlas organizadas en carpetas con Python.
    </div>
    
    <div style="margin-top: 10px;">
      <b style="color: #60a5fa; display:flex; align-items:center; gap:5px;">
        <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"></path></svg>
        Modo Selector Facebook
      </b>
      Selecciona reels interactivamente como en Kemono, o presiona "Buscar enlaces" para recolectar todos los videos que has visto al bajar página. Solo para Facebook.
    </div>
  </div>

  <div class="tool-list">
    
    <div id="no-tools-msg" class="status" style="display:none; margin-bottom: 0;">
      <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="color:#ef4444; margin-bottom: 8px;"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg>
      <span>Esta extensión está diseñada principalmente para <b>Kemono</b> y <b>Erome</b>. Navega a una de esas páginas para usar las herramientas.</span>
    </div>

    <!-- Módulo Erome -->
    <div class="tool-card" id="card-video">
      <div class="tool-header">
        <div class="tool-info">
          <div class="tool-icon">
             <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="color: #ec4899;"><polygon points="23 7 16 12 23 17 23 7"></polygon><rect x="1" y="5" width="15" height="14" rx="2" ry="2"></rect></svg>
          </div>
          <div class="tool-text">
            <div class="tool-title">Modo Extractor Erome</div>
            <div class="tool-desc">Extrae todos los videos de álbumes en Erome.</div>
          </div>
        </div>
        <label class="switch">
          <input type="checkbox" id="toggle-video">
          <span class="slider round"></span>
        </label>
      </div>
      <div id="container-video" class="tool-body" style="display: none;">
        <div id="status" class="status" style="display:none;">
          <svg class="spinner" width="24" height="24" viewBox="0 0 50 50" style="animation:spin 1s linear infinite;"><circle cx="25" cy="25" r="20" fill="none" stroke="currentColor" stroke-width="5" stroke-dasharray="31.4 31.4" stroke-linecap="round" style="opacity:0.5;"></circle></svg>
          <span>Escaneando página...</span>
        </div>
        <button id="deep-scan" class="secondary" style="display:none;">
          🔍 Escanear álbumes a fondo
        </button>
        <button id="copy-all" class="primary" style="display:none;">
          <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg>
          Copiar Todos
        </button>
        <ul id="video-list"></ul>
      </div>
    </div>

    <!-- Módulo Kemono -->
    <div class="tool-card" id="card-kemono">
      <div class="tool-header">
        <div class="tool-info">
          <div class="tool-icon">
            <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="color: #a78bfa;"><path d="M12 20h9"></path><path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"></path></svg>
          </div>
          <div class="tool-text">
            <div class="tool-title">Modo Selector Kemono</div>
            <div class="tool-desc">Elige portadas interactivamente para copiar.</div>
          </div>
        </div>
        <label class="switch">
          <input type="checkbox" id="toggle-kemono">
          <span class="slider round"></span>
        </label>
      </div>
    </div>

    <!-- Módulo Kemono Descargas -->
    <div class="tool-card" id="card-kemono-downloads">
      <div class="tool-header">
        <div class="tool-info">
          <div class="tool-icon">
            <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="color: #fbbf24;"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="7 10 12 15 17 10"></polyline><line x1="12" y1="15" x2="12" y2="3"></line></svg>
          </div>
          <div class="tool-text">
            <div class="tool-title">Extraer Descargas Kemono</div>
            <div class="tool-desc">Selecciona posts para extraer sus archivos (Zips, Mega, Drive).</div>
          </div>
        </div>
        <label class="switch">
          <input type="checkbox" id="toggle-kemono-downloads">
          <span class="slider round"></span>
        </label>
      </div>
    </div>

    <!-- Módulo Kemono Imagenes -->
    <div class="tool-card" id="card-kemono-images">
      <div class="tool-header">
        <div class="tool-info">
          <div class="tool-icon">
            <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="color: #14b8a6;"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect><circle cx="8.5" cy="8.5" r="1.5"></circle><polyline points="21 15 16 10 5 21"></polyline></svg>
          </div>
          <div class="tool-text">
            <div class="tool-title">Extraer Imágenes Kemono</div>
            <div class="tool-desc">Extrae y descarga las imágenes en carpetas automáticamente.</div>
          </div>
        </div>
        <label class="switch">
          <input type="checkbox" id="toggle-kemono-images">
          <span class="slider round"></span>
        </label>
      </div>
    </div>


    <!-- Módulo Facebook -->
    <div class="tool-card" id="card-facebook">
      <div class="tool-header">
        <div class="tool-info">
          <div class="tool-icon">
            <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="color: #60a5fa;"><path d="M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"></path></svg>
          </div>
          <div class="tool-text">
            <div class="tool-title">Modo Selector Facebook</div>
            <div class="tool-desc">Selecciona o extrae reels y videos en lote.</div>
          </div>
        </div>
        <label class="switch">
          <input type="checkbox" id="toggle-facebook">
          <span class="slider round"></span>
        </label>
      </div>
    </div>

    <!-- Módulo TikTok -->
    <div class="tool-card" id="card-tiktok">
      <div class="tool-header">
        <div class="tool-info">
          <div class="tool-icon">
            <svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="color: #ff0050;"><path d="M9 12a4 4 0 1 0 4 4V4a5 5 0 0 0 5 5"></path></svg>
          </div>
          <div class="tool-text">
            <div class="tool-title">Modo Selector TikTok</div>
            <div class="tool-desc">Selecciona videos interactivamente o escanea perfiles.</div>
          </div>
        </div>
        <label class="switch">
          <input type="checkbox" id="toggle-tiktok">
          <span class="slider round"></span>
        </label>
      </div>
    </div>

  </div>

  <script src="popup.js"></script>
</body>
</html>