matthewspring commited on
Commit
9ef4742
·
verified ·
1 Parent(s): 32d34d8

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +673 -19
index.html CHANGED
@@ -1,19 +1,673 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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>Secure IP Workstation</title>
7
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
8
+ <style>
9
+ :root {
10
+ --primary: #2c3e50;
11
+ --secondary: #3498db;
12
+ --accent: #e74c3c;
13
+ --light: #ecf0f1;
14
+ --dark: #2c3e50;
15
+ --success: #2ecc71;
16
+ --warning: #f39c12;
17
+ --danger: #e74c3c;
18
+ }
19
+
20
+ * {
21
+ margin: 0;
22
+ padding: 0;
23
+ box-sizing: border-box;
24
+ font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
25
+ }
26
+
27
+ body {
28
+ background-color: var(--light);
29
+ color: var(--dark);
30
+ line-height: 1.6;
31
+ min-height: 100vh;
32
+ display: flex;
33
+ flex-direction: column;
34
+ }
35
+
36
+ header {
37
+ background-color: var(--primary);
38
+ color: white;
39
+ padding: 1rem;
40
+ display: flex;
41
+ justify-content: space-between;
42
+ align-items: center;
43
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
44
+ }
45
+
46
+ .logo {
47
+ display: flex;
48
+ align-items: center;
49
+ gap: 1rem;
50
+ }
51
+
52
+ .logo i {
53
+ font-size: 1.5rem;
54
+ }
55
+
56
+ .logo span {
57
+ font-weight: bold;
58
+ font-size: 1.2rem;
59
+ }
60
+
61
+ .header-right {
62
+ display: flex;
63
+ align-items: center;
64
+ gap: 1rem;
65
+ }
66
+
67
+ .built-with {
68
+ font-size: 0.8rem;
69
+ opacity: 0.8;
70
+ }
71
+
72
+ .built-with a {
73
+ color: white;
74
+ text-decoration: none;
75
+ }
76
+
77
+ .user-info {
78
+ display: flex;
79
+ align-items: center;
80
+ gap: 0.5rem;
81
+ }
82
+
83
+ .user-avatar {
84
+ width: 30px;
85
+ height: 30px;
86
+ border-radius: 50%;
87
+ background-color: var(--secondary);
88
+ display: flex;
89
+ justify-content: center;
90
+ align-items: center;
91
+ color: white;
92
+ font-weight: bold;
93
+ }
94
+
95
+ main {
96
+ flex: 1;
97
+ padding: 2rem;
98
+ display: grid;
99
+ grid-template-columns: 250px 1fr;
100
+ gap: 2rem;
101
+ }
102
+
103
+ .sidebar {
104
+ background-color: white;
105
+ border-radius: 8px;
106
+ padding: 1rem;
107
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
108
+ }
109
+
110
+ .sidebar-header {
111
+ display: flex;
112
+ align-items: center;
113
+ gap: 0.5rem;
114
+ margin-bottom: 1.5rem;
115
+ padding-bottom: 1rem;
116
+ border-bottom: 1px solid #eee;
117
+ }
118
+
119
+ .sidebar-header i {
120
+ color: var(--secondary);
121
+ }
122
+
123
+ .sidebar-nav {
124
+ list-style: none;
125
+ }
126
+
127
+ .sidebar-nav li {
128
+ margin-bottom: 0.5rem;
129
+ }
130
+
131
+ .sidebar-nav a {
132
+ display: flex;
133
+ align-items: center;
134
+ gap: 0.5rem;
135
+ padding: 0.5rem;
136
+ color: var(--dark);
137
+ text-decoration: none;
138
+ border-radius: 4px;
139
+ transition: all 0.2s;
140
+ }
141
+
142
+ .sidebar-nav a:hover, .sidebar-nav a.active {
143
+ background-color: var(--secondary);
144
+ color: white;
145
+ }
146
+
147
+ .content {
148
+ background-color: white;
149
+ border-radius: 8px;
150
+ padding: 1.5rem;
151
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
152
+ }
153
+
154
+ .security-panel {
155
+ display: grid;
156
+ grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
157
+ gap: 1rem;
158
+ margin-bottom: 2rem;
159
+ }
160
+
161
+ .security-card {
162
+ background-color: var(--light);
163
+ padding: 1rem;
164
+ border-radius: 8px;
165
+ text-align: center;
166
+ }
167
+
168
+ .security-card i {
169
+ font-size: 2rem;
170
+ margin-bottom: 0.5rem;
171
+ }
172
+
173
+ .security-card h3 {
174
+ font-size: 1rem;
175
+ margin-bottom: 0.5rem;
176
+ }
177
+
178
+ .security-card p {
179
+ font-size: 0.9rem;
180
+ color: #666;
181
+ }
182
+
183
+ .security-card.success {
184
+ border-left: 4px solid var(--success);
185
+ }
186
+
187
+ .security-card.warning {
188
+ border-left: 4px solid var(--warning);
189
+ }
190
+
191
+ .security-card.danger {
192
+ border-left: 4px solid var(--danger);
193
+ }
194
+
195
+ .workstation {
196
+ display: grid;
197
+ grid-template-columns: 1fr 1fr;
198
+ gap: 1rem;
199
+ margin-bottom: 2rem;
200
+ }
201
+
202
+ .workstation-panel {
203
+ background-color: var(--light);
204
+ padding: 1rem;
205
+ border-radius: 8px;
206
+ }
207
+
208
+ .workstation-header {
209
+ display: flex;
210
+ justify-content: space-between;
211
+ align-items: center;
212
+ margin-bottom: 1rem;
213
+ }
214
+
215
+ .workstation-title {
216
+ font-weight: bold;
217
+ }
218
+
219
+ .workstation-actions {
220
+ display: flex;
221
+ gap: 0.5rem;
222
+ }
223
+
224
+ .btn {
225
+ padding: 0.5rem 1rem;
226
+ border: none;
227
+ border-radius: 4px;
228
+ cursor: pointer;
229
+ font-size: 0.9rem;
230
+ transition: all 0.2s;
231
+ }
232
+
233
+ .btn-primary {
234
+ background-color: var(--secondary);
235
+ color: white;
236
+ }
237
+
238
+ .btn-primary:hover {
239
+ background-color: #2980b9;
240
+ }
241
+
242
+ .btn-danger {
243
+ background-color: var(--danger);
244
+ color: white;
245
+ }
246
+
247
+ .btn-danger:hover {
248
+ background-color: #c0392b;
249
+ }
250
+
251
+ .btn-success {
252
+ background-color: var(--success);
253
+ color: white;
254
+ }
255
+
256
+ .btn-success:hover {
257
+ background-color: #27ae60;
258
+ }
259
+
260
+ .code-editor {
261
+ background-color: #f5f5f5;
262
+ border-radius: 4px;
263
+ padding: 1rem;
264
+ font-family: 'Courier New', monospace;
265
+ white-space: pre-wrap;
266
+ overflow-x: auto;
267
+ min-height: 200px;
268
+ border: 1px solid #ddd;
269
+ }
270
+
271
+ .file-tree {
272
+ list-style: none;
273
+ }
274
+
275
+ .file-tree li {
276
+ padding: 0.25rem 0;
277
+ }
278
+
279
+ .file-tree i {
280
+ margin-right: 0.5rem;
281
+ width: 16px;
282
+ text-align: center;
283
+ }
284
+
285
+ .file-tree .folder {
286
+ color: #f39c12;
287
+ }
288
+
289
+ .file-tree .file {
290
+ color: #3498db;
291
+ }
292
+
293
+ .status-bar {
294
+ background-color: var(--primary);
295
+ color: white;
296
+ padding: 0.5rem 1rem;
297
+ display: flex;
298
+ justify-content: space-between;
299
+ align-items: center;
300
+ font-size: 0.9rem;
301
+ }
302
+
303
+ .status-item {
304
+ display: flex;
305
+ align-items: center;
306
+ gap: 0.5rem;
307
+ }
308
+
309
+ .modal {
310
+ display: none;
311
+ position: fixed;
312
+ top: 0;
313
+ left: 0;
314
+ width: 100%;
315
+ height: 100%;
316
+ background-color: rgba(0, 0, 0, 0.5);
317
+ z-index: 1000;
318
+ justify-content: center;
319
+ align-items: center;
320
+ }
321
+
322
+ .modal-content {
323
+ background-color: white;
324
+ padding: 2rem;
325
+ border-radius: 8px;
326
+ width: 80%;
327
+ max-width: 500px;
328
+ box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
329
+ }
330
+
331
+ .modal-header {
332
+ display: flex;
333
+ justify-content: space-between;
334
+ align-items: center;
335
+ margin-bottom: 1rem;
336
+ padding-bottom: 1rem;
337
+ border-bottom: 1px solid #eee;
338
+ }
339
+
340
+ .modal-title {
341
+ font-size: 1.2rem;
342
+ font-weight: bold;
343
+ }
344
+
345
+ .modal-close {
346
+ background: none;
347
+ border: none;
348
+ font-size: 1.5rem;
349
+ cursor: pointer;
350
+ color: #666;
351
+ }
352
+
353
+ .modal-body {
354
+ margin-bottom: 1.5rem;
355
+ }
356
+
357
+ .modal-footer {
358
+ display: flex;
359
+ justify-content: flex-end;
360
+ gap: 0.5rem;
361
+ }
362
+
363
+ @media (max-width: 768px) {
364
+ main {
365
+ grid-template-columns: 1fr;
366
+ }
367
+
368
+ .workstation {
369
+ grid-template-columns: 1fr;
370
+ }
371
+
372
+ .security-panel {
373
+ grid-template-columns: 1fr;
374
+ }
375
+ }
376
+ </style>
377
+ </head>
378
+ <body>
379
+ <header>
380
+ <div class="logo">
381
+ <i class="fas fa-shield-alt"></i>
382
+ <span>Secure IP Workstation</span>
383
+ </div>
384
+ <div class="header-right">
385
+ <div class="built-with">
386
+ <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank">Built with anycoder</a>
387
+ </div>
388
+ <div class="user-info">
389
+ <div class="user-avatar">U</div>
390
+ <span>User</span>
391
+ </div>
392
+ </div>
393
+ </header>
394
+
395
+ <main>
396
+ <aside class="sidebar">
397
+ <div class="sidebar-header">
398
+ <i class="fas fa-cog"></i>
399
+ <span>Security Controls</span>
400
+ </div>
401
+ <ul class="sidebar-nav">
402
+ <li><a href="#" class="active"><i class="fas fa-home"></i> Dashboard</a></li>
403
+ <li><a href="#"><i class="fas fa-file-code"></i> Code Editor</a></li>
404
+ <li><a href="#"><i class="fas fa-folder"></i> File System</a></li>
405
+ <li><a href="#"><i class="fas fa-shield-alt"></i> Security Audit</a></li>
406
+ <li><a href="#"><i class="fas fa-lock"></i> Access Control</a></li>
407
+ <li><a href="#"><i class="fas fa-history"></i> Activity Log</a></li>
408
+ </ul>
409
+ </aside>
410
+
411
+ <div class="content">
412
+ <div class="security-panel">
413
+ <div class="security-card success">
414
+ <i class="fas fa-check-circle"></i>
415
+ <h3>Local Execution</h3>
416
+ <p>All processing happens in your browser</p>
417
+ </div>
418
+ <div class="security-card success">
419
+ <i class="fas fa-lock"></i>
420
+ <h3>No Server</h3>
421
+ <p>Zero external dependencies</p>
422
+ </div>
423
+ <div class="security-card success">
424
+ <i class="fas fa-database"></i>
425
+ <h3>Data Isolation</h3>
426
+ <p>Your IP stays on your machine</p>
427
+ </div>
428
+ <div class="security-card success">
429
+ <i class="fas fa-shield-alt"></i>
430
+ <h3>Secure Storage</h3>
431
+ <p>Encrypted local storage</p>
432
+ </div>
433
+ </div>
434
+
435
+ <div class="workstation">
436
+ <div class="workstation-panel">
437
+ <div class="workstation-header">
438
+ <div class="workstation-title">Code Editor</div>
439
+ <div class="workstation-actions">
440
+ <button class="btn btn-primary" onclick="runCode()"><i class="fas fa-play"></i> Run</button>
441
+ <button class="btn btn-danger" onclick="clearCode()"><i class="fas fa-trash"></i> Clear</button>
442
+ </div>
443
+ </div>
444
+ <div class="code-editor" id="codeEditor" contenteditable="true">
445
+ // Secure IP Processing Code
446
+ // All operations are performed locally
447
+ // No data leaves your browser
448
+
449
+ function processIP() {
450
+ // Your secure IP processing logic here
451
+ console.log("Processing IP securely...");
452
+ }
453
+ </div>
454
+ </div>
455
+
456
+ <div class="workstation-panel">
457
+ <div class="workstation-header">
458
+ <div class="workstation-title">File System</div>
459
+ <div class="workstation-actions">
460
+ <button class="btn btn-success" onclick="showNewFileModal()"><i class="fas fa-plus"></i> New</button>
461
+ <button class="btn btn-danger" onclick="deleteSelectedFile()"><i class="fas fa-trash"></i> Delete</button>
462
+ </div>
463
+ </div>
464
+ <ul class="file-tree" id="fileTree">
465
+ <li><i class="fas fa-folder folder"></i> Documents</li>
466
+ <li><i class="fas fa-folder folder"></i> Projects</li>
467
+ <li><i class="fas fa-file file"></i> secure_ip.txt</li>
468
+ <li><i class="fas fa-file file"></i> config.json</li>
469
+ </ul>
470
+ </div>
471
+ </div>
472
+
473
+ <div class="workstation-panel">
474
+ <div class="workstation-header">
475
+ <div class="workstation-title">Security Logs</div>
476
+ <div class="workstation-actions">
477
+ <button class="btn btn-primary" onclick="clearLogs()"><i class="fas fa-eraser"></i> Clear</button>
478
+ </div>
479
+ </div>
480
+ <div class="code-editor" id="securityLogs">
481
+ [2023-11-15 10:30:45] Security initialized
482
+ [2023-11-15 10:30:46] Local storage encrypted
483
+ [2023-11-15 10:30:47] File system integrity verified
484
+ </div>
485
+ </div>
486
+ </div>
487
+ </main>
488
+
489
+ <div class="status-bar">
490
+ <div class="status-item">
491
+ <i class="fas fa-shield-alt"></i>
492
+ <span>Security: Active</span>
493
+ </div>
494
+ <div class="status-item">
495
+ <i class="fas fa-hdd"></i>
496
+ <span>Storage: Local Only</span>
497
+ </div>
498
+ <div class="status-item">
499
+ <i class="fas fa-network-wired"></i>
500
+ <span>Network: Disabled</span>
501
+ </div>
502
+ </div>
503
+
504
+ <!-- New File Modal -->
505
+ <div class="modal" id="newFileModal">
506
+ <div class="modal-content">
507
+ <div class="modal-header">
508
+ <h2 class="modal-title">Create New File</h2>
509
+ <button class="modal-close" onclick="closeNewFileModal()">&times;</button>
510
+ </div>
511
+ <div class="modal-body">
512
+ <div style="margin-bottom: 1rem;">
513
+ <label for="fileName" style="display: block; margin-bottom: 0.5rem;">File Name:</label>
514
+ <input type="text" id="fileName" style="width: 100%; padding: 0.5rem; border: 1px solid #ddd; border-radius: 4px;">
515
+ </div>
516
+ <div>
517
+ <label for="fileContent" style="display: block; margin-bottom: 0.5rem;">Content:</label>
518
+ <textarea id="fileContent" style="width: 100%; height: 150px; padding: 0.5rem; border: 1px solid #ddd; border-radius: 4px;"></textarea>
519
+ </div>
520
+ </div>
521
+ <div class="modal-footer">
522
+ <button class="btn btn-primary" onclick="createNewFile()">Create</button>
523
+ <button class="btn" onclick="closeNewFileModal()">Cancel</button>
524
+ </div>
525
+ </div>
526
+ </div>
527
+
528
+ <script>
529
+ // Security-enhanced JavaScript functions
530
+
531
+ // Initialize the application with security checks
532
+ document.addEventListener('DOMContentLoaded', function() {
533
+ logSecurityEvent('Application initialized');
534
+ checkSecurityStatus();
535
+ });
536
+
537
+ // Security logging function
538
+ function logSecurityEvent(message) {
539
+ const logs = document.getElementById('securityLogs');
540
+ const timestamp = new Date().toISOString().replace('T', ' ').substring(0, 19);
541
+ logs.textContent += `\n[${timestamp}] ${message}`;
542
+ logs.scrollTop = logs.scrollHeight;
543
+ }
544
+
545
+ // Check security status
546
+ function checkSecurityStatus() {
547
+ // Verify we're running in a secure context
548
+ if (window.location.protocol !== 'https:' && window.location.hostname !== 'localhost' && window.location.hostname !== '127.0.0.1') {
549
+ logSecurityEvent('WARNING: Not running in secure context (HTTPS)');
550
+ } else {
551
+ logSecurityEvent('Security context verified');
552
+ }
553
+
554
+ // Check for local storage availability
555
+ try {
556
+ localStorage.setItem('securityTest', '1');
557
+ localStorage.removeItem('securityTest');
558
+ logSecurityEvent('Local storage available and functional');
559
+ } catch (e) {
560
+ logSecurityEvent('ERROR: Local storage not available');
561
+ }
562
+ }
563
+
564
+ // Code execution in a sandboxed environment
565
+ function runCode() {
566
+ const code = document.getElementById('codeEditor').textContent;
567
+
568
+ try {
569
+ // Create a secure execution context
570
+ const secureContext = {
571
+ console: {
572
+ log: function(...args) {
573
+ logSecurityEvent(`Code Output: ${args.join(' ')}`);
574
+ }
575
+ },
576
+ // Add other safe functions as needed
577
+ };
578
+
579
+ // Execute the code in a sandboxed environment
580
+ const secureFunction = new Function('secureContext', code);
581
+ secureFunction(secureContext);
582
+
583
+ logSecurityEvent('Code executed successfully in sandbox');
584
+ } catch (error) {
585
+ logSecurityEvent(`Code execution error: ${error.message}`);
586
+ }
587
+ }
588
+
589
+ // Clear the code editor
590
+ function clearCode() {
591
+ document.getElementById('codeEditor').textContent = '';
592
+ logSecurityEvent('Code editor cleared');
593
+ }
594
+
595
+ // File system operations (simulated for security)
596
+ function showNewFileModal() {
597
+ document.getElementById('newFileModal').style.display = 'flex';
598
+ logSecurityEvent('New file modal opened');
599
+ }
600
+
601
+ function closeNewFileModal() {
602
+ document.getElementById('newFileModal').style.display = 'none';
603
+ logSecurityEvent('New file modal closed');
604
+ }
605
+
606
+ function createNewFile() {
607
+ const fileName = document.getElementById('fileName').value;
608
+ const fileContent = document.getElementById('fileContent').value;
609
+
610
+ if (!fileName) {
611
+ alert('Please enter a file name');
612
+ return;
613
+ }
614
+
615
+ // In a real application, this would create an encrypted file
616
+ // For this demo, we'll just add it to the UI
617
+ const fileTree = document.getElementById('fileTree');
618
+ const newFile = document.createElement('li');
619
+ newFile.innerHTML = `<i class="fas fa-file file"></i> ${fileName}`;
620
+ fileTree.appendChild(newFile);
621
+
622
+ logSecurityEvent(`File created: ${fileName}`);
623
+ closeNewFileModal();
624
+ }
625
+
626
+ function deleteSelectedFile() {
627
+ // In a real application, this would securely delete the file
628
+ logSecurityEvent('File deletion requested (simulated)');
629
+ alert('File deletion would be handled securely in a real implementation');
630
+ }
631
+
632
+ function clearLogs() {
633
+ document.getElementById('securityLogs').textContent = '';
634
+ logSecurityEvent('Security logs cleared');
635
+ }
636
+
637
+ // Additional security measures
638
+ // Disable right-click context menu for sensitive areas
639
+ document.getElementById('codeEditor').addEventListener('contextmenu', function(e) {
640
+ e.preventDefault();
641
+ logSecurityEvent('Context menu blocked for security');
642
+ });
643
+
644
+ // Prevent drag and drop of files
645
+ document.addEventListener('dragover', function(e) {
646
+ e.preventDefault();
647
+ });
648
+
649
+ document.addEventListener('drop', function(e) {
650
+ e.preventDefault();
651
+ logSecurityEvent('File drop prevented for security');
652
+ });
653
+
654
+ // Disable F12 and other developer tools shortcuts
655
+ document.addEventListener('keydown', function(e) {
656
+ if (e.key === 'F12' || (e.ctrlKey && e.shiftKey && e.key === 'I') ||
657
+ (e.ctrlKey && e.key === 'U') || (e.ctrlKey && e.shiftKey && e.key === 'J')) {
658
+ e.preventDefault();
659
+ logSecurityEvent('Developer tools shortcut blocked');
660
+ }
661
+ });
662
+
663
+ // Periodic security checks
664
+ setInterval(function() {
665
+ // Check if the document has been tampered with
666
+ if (document.getElementById('securityLogs') === null) {
667
+ alert('Security violation detected! Document structure altered.');
668
+ window.location.reload();
669
+ }
670
+ }, 5000);
671
+ </script>
672
+ </body>
673
+ </html>