-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
911 lines (789 loc) · 24.9 KB
/
index.html
File metadata and controls
911 lines (789 loc) · 24.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>TalkRush - Talk to Strangers No Login</title>
<meta name="description" content="Talk to Strangers and make new friends in free random chat rooms. Enjoy anonymous text & video chat, group chat rooms. Safe Omegle & OmeTV alternative.">
<link rel="icon" type="image/png" href="https://shkumaraman.github.io/assets/chat.png">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@latest/css/all.min.css">
<style>
:root {
--dark-header-bg: #181818;
--dark-header-border: #2a2a2a;
--dark-bg: #121212;
--light-bg: #f5f5f5;
--light-header-border: #e0e0e0;
--dark-text: #fff;
--dark-icon-color: #ccc;
--light-text: #333;
}
* {
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', sans-serif;
background: var(--light-bg);
color: var(--light-text);
margin: 0;
padding: 0;
}
.app-header {
position: fixed !important;
top: 0;
left: 0;
width: 100%;
height: 50px;
background: var(--dark-header-bg);
padding: 8px 15px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 15px;
box-shadow: 0 2px 4px rgba(0,0,0,0.4);
border-bottom: 1px solid var(--dark-header-border);
z-index: 10000;
}
.header-left {
display: flex;
align-items: center;
gap: 10px;
}
.logo {
height: 40px;
width: 40px;
border-radius: 10px;
}
.app-title {
font-size: 1em;
color: var(--dark-text);
margin: 0;
}
.menu-btn {
background: none;
border: none;
color: var(--dark-text);
font-size: 24px;
cursor: pointer;
padding: 5px;
display: flex;
align-items: center;
justify-content: center;
}
.profile-container {
width: 100%;
text-align: center;
display: flex;
flex-direction: column;
position: relative;
padding: 60px 10px 0 10px;
overflow: hidden;
}
h2 {
margin-top: 0;
font-size: 1.6rem;
}
h3 {
margin-top: 0;
}
p {
margin: 10px 0;
}
#menu {
width: 300px;
height: 100%;
background: var(--dark-header-bg);
position: fixed;
top: 0;
left: -300px;
transition: left 0.3s ease-in-out;
overflow: hidden;
padding: 60px 0 20px 0;
z-index: 1000;
display: flex;
flex-direction: column;
border-right: 1px solid var(--dark-header-border);
}
.menu-items {
flex: 1;
overflow-y: auto;
padding: 0 20px;
margin-bottom: 20px;
}
.menu-items a {
text-decoration: none;
color: var(--dark-text);
font-size: 16px;
margin: 2px 0;
padding: 12px 15px;
transition: background-color 0.3s;
border-radius: 5px;
display: block;
}
.menu-items a:hover {
background-color: #333;
}
#shareButton {
width: 95%;
background-color: var(--dark-text);
color: var(--light-text);
border: none;
padding: 15px 25px;
margin: 10px auto 5px auto;
border-radius: 10px;
font-size: 16px;
font-weight: bold;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
gap: 10px;
transition: background-color 0.3s;
flex-shrink: 0;
}
.menu-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
z-index: 998;
display: none;
}
.app-card {
padding: 10px;
margin: 10px 0;
width: 100%;
border: 2px solid var(--dark-text);
border-radius: 10px;
background-color: #1e1e1e;
}
.app-card h3 {
color: var(--dark-text);
}
.app-card p {
color: var(--dark-text);
}
.app-button {
display: block;
background-color: var(--dark-text);
color: var(--light-text);
text-align: center;
padding: 10px;
margin: 10px 0;
border-radius: 5px;
text-decoration: none;
font-weight: bold;
}
.connection-options {
display: flex;
flex-direction: column;
gap: 10px;
margin: 15px 0;
}
.connection-option {
background-color: #2a2a2a;
padding: 10px;
border-radius: 8px;
}
.connection-option h4 {
color: var(--dark-text);
margin: 0 0 8px 0;
}
.connection-option p {
color: var(--dark-text);
margin: 0;
font-size: 14px;
}
.features-slider-container {
position: relative;
width: 100%;
margin: 20px 0;
overflow: hidden;
}
.features-slider {
display: flex;
transition: transform 0.5s ease;
width: 100%;
}
.feature-item {
flex: 0 0 92%;
margin: 0 4%;
background-color: #2a2a2a;
padding: 25px 20px;
border-radius: 15px;
box-sizing: border-box;
min-height: 220px;
display: flex;
flex-direction: column;
justify-content: center;
}
.feature-item h4 {
color: var(--dark-text);
margin: 0 0 15px 0;
font-size: 1.3rem;
}
.feature-item p {
color: var(--dark-text);
margin: 0;
font-size: 15px;
line-height: 1.5;
}
.slider-dots {
display: flex;
justify-content: center;
gap: 12px;
margin: 20px 0 10px;
padding: 10px 0;
}
.dot {
width: 12px;
height: 12px;
border-radius: 50%;
background-color: #ccc;
cursor: pointer;
transition: all 0.3s;
border: none;
padding: 0;
}
.dot.active {
background-color: #4CAF50;
transform: scale(1.3);
width: 14px;
height: 14px;
}
.features-slider-container:hover .features-slider {
animation-play-state: paused;
}
.chat-options {
display: flex;
flex-direction: column;
gap: 10px;
margin: 20px 0;
}
.chat-button {
display: block;
background-color: var(--dark-text);
color: var(--light-text);
text-align: center;
padding: 12px;
border-radius: 5px;
text-decoration: none;
font-weight: bold;
}
.chat-type-grid {
display: grid;
grid-template-columns: 1fr;
gap: 15px;
margin: 20px 0;
}
.chat-type-box {
background-color: #1f7a3a;
border: none;
border-radius: 20px;
padding: 15px;
text-align: center;
height: 100px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
color: #fff;
transition: transform 0.2s ease, background-color 0.2s ease;
}
.chat-type-box:hover {
transform: translateY(-3px);
background-color: #2e9b55;
}
.chat-type-box .chat-type-link {
color: #ffffff;
}
.chat-type-box .chat-icon {
color: #ffffff;
}
.chat-type-box2 {
background-color: var(--dark-text);
border: 1px solid #ccc;
border-radius: 20px;
padding: 15px;
text-align: center;
height: 100px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
transition: transform 0.2s, background-color 0.2s;
}
.chat-type-box2:hover {
transform: translateY(-3px);
background-color: #f0f0f0;
}
.chat-type-link {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
color: var(--light-text);
text-decoration: none;
font-weight: bold;
width: 100%;
height: 100%;
}
.chat-icon {
width: 32px;
height: 32px;
margin-bottom: 8px;
color: #4CAF50;
}
.chat-rooms-section {
background: #1e1e1e;
padding: 20px;
margin: 20px 0;
border-radius: 10px;
}
.chat-rooms-section h2 {
color: var(--dark-text);
text-align: center;
}
.chat-rooms-section p {
color: var(--dark-text);
}
.chat-rooms-section h3 {
color: var(--dark-text);
}
.chat-rooms-features {
display: grid;
grid-template-columns: 1fr;
gap: 15px;
margin: 20px 0;
}
.chat-rooms-feature {
background-color: #2a2a2a;
padding: 15px;
border-radius: 8px;
box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.chat-rooms-feature h3 {
color: var(--dark-text);
}
.chat-rooms-feature p {
color: var(--dark-text);
}
.chat-rooms-button {
display: block;
background-color: var(--dark-text);
color: var(--light-text);
text-align: center;
padding: 12px;
border-radius: 5px;
text-decoration: none;
font-weight: bold;
margin: 15px auto;
max-width: 250px;
transition: background 0.2s;
}
.chat-rooms-button:hover {
background: #ddd;
}
.slider {
display: flex;
gap: 20px;
animation: slide 12s linear infinite;
}
.card {
flex: 0 0 200px;
height: 300px;
border-radius: 12px;
transform: rotate(-5deg);
overflow: hidden;
}
.card img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
@keyframes slide {
0% {
transform: translateX(0);
}
100% {
transform: translateX(calc(-220px * 5));
}
}
@media (min-width: 600px) {
.connection-options {
flex-direction: row;
flex-wrap: wrap;
}
.connection-option {
flex: 1 1 calc(50% - 10px);
}
.chat-options {
flex-direction: row;
justify-content: center;
}
.chat-button {
width: 30%;
}
.chat-rooms-features {
grid-template-columns: 1fr 1fr;
}
h2 {
font-size: 1.8rem;
}
.chat-type-grid {
grid-template-columns: 1fr 1fr;
max-width: 500px;
margin: 20px auto;
}
.feature-item {
flex: 0 0 46%;
margin: 0 2%;
padding: 30px 25px;
min-height: 250px;
}
}
</style>
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "WebApplication",
"name": "TalkRush",
"url": "https://talkrush.github.io",
"description": "Meet new people instantly on ConnectChat. Join group discussions, have private conversations, or start live video calls — all without signup.",
"applicationCategory": "CommunicationApplication",
"operatingSystem": "Web Browser",
"creator": {
"@type": "Person",
"name": "TalkRush Team"
},
"screenshot": "https://shkumaraman.github.io/assets/chat.png"
}
</script>
</head>
<body>
<header class="app-header">
<div class="header-left">
<button class="menu-btn" onclick="toggleMenu()">☰</button>
<img src="https://shkumaraman.github.io/chat/logo.png" alt="TalkRush Logo" class="logo">
<h1 class="app-title">TalkRush</h1>
</div>
</header>
<div id="menu">
<div class="menu-items">
<a href="https://shkumaraman.github.io/" onclick="toggleMenu()">Home</a>
<a href="https://shkumaraman.github.io/chat/rooms.html" onclick="toggleMenu()">Chat Rooms</a>
<a href="https://shkumaraman.github.io/chat/inbox.html" onclick="toggleMenu()">Inbox</a>
<a href="https://shkumaraman.github.io/chat/" onclick="toggleMenu()">Strangers Chat</a>
<a href="https://shkumaraman.github.io/chat/video.html" onclick="toggleMenu()">Webcam Roulette</a>
<a href="https://shkumaraman.github.io/chat/private-room.html" onclick="toggleMenu()">Private Room (Invite)</a>
<a href="https://shkumaraman.github.io/post.html" onclick="toggleMenu()">Anonymous Posts</a>
<a href="https://shkumaraman.github.io/photoshare.html" onclick="toggleMenu()">PhotoShare</a>
</div>
<!-- Share Button -->
<button id="shareButton" class="share-btn">
<i class="fa-solid fa-arrow-up-from-bracket"></i>
<span>Share</span>
</button>
</div>
<div class="profile-container">
<h2>TalkRush - Chat with Strangers</h2>
<p>Meet new people, make friends, and start exciting conversations with strangers worldwide. No registration required - start chatting instantly!</p>
<!-- Chat Options -->
<div class="preferences-container">
<h3>Choose Your Chat Type</h3>
<div class="chat-type-grid">
<div class="chat-type-box">
<a href="https://shkumaraman.github.io/chat/" class="chat-type-link">
<svg class="chat-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
<path d="M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2 14H6l-2 2V4h16v12z"/>
<path d="M7 9h10v2H7zm0 4h7v2H7z"/>
</svg>
Strangers Chat
</a>
</div>
<div class="chat-type-box2">
<a href="https://shkumaraman.github.io/chat/video.html" class="chat-type-link">
<svg class="chat-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
<path d="M17 10.5V7c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h12c.55 0 1-.45 1-1v-3.5l4 4v-11l-4 4z"/>
</svg>
Webcam Roulette
</a>
</div>
</div>
</div>
<div class="slider">
<div class="card">
<img src="https://shkumaraman.github.io/assets/girl1.jpeg" alt="girl-dp">
</div>
<div class="card">
<img src="https://shkumaraman.github.io/assets/girl2.jpeg" alt="girl-dp">
</div>
<div class="card">
<img src="https://shkumaraman.github.io/assets/girl3.jpeg" alt="girl-dp">
</div>
<div class="card">
<img src="https://shkumaraman.github.io/assets/girl4.jpeg" alt="girl-dp">
</div>
<div class="card">
<img src="https://shkumaraman.github.io/assets/girl5.jpeg" alt="girl-dp">
</div>
<div class="card">
<img src="https://shkumaraman.github.io/assets/girl1.jpeg" alt="girl-dp">
</div>
<div class="card">
<img src="https://shkumaraman.github.io/assets/girl2.jpeg" alt="girl-dp">
</div>
<div class="card">
<img src="https://shkumaraman.github.io/assets/girl3.jpeg" alt="girl-dp">
</div>
<div class="card">
<img src="https://shkumaraman.github.io/assets/girl4.jpeg" alt="girl-dp">
</div>
<div class="card">
<img src="https://shkumaraman.github.io/assets/girl5.jpeg" alt="girl-dp">
</div>
</div>
<div class="feature-details">
<h2>The Best Site to Chat with Male and Female Strangers</h2>
<p>Join Our Growing Community</p>
<p>People from around the world are connecting every day</p>
</div>
<!-- Chat Rooms Section -->
<div class="chat-rooms-section">
<h2>Chat Rooms</h2>
<p>Join interest-based chat rooms where anyone can participate. Connect with people who share your hobbies, topics, or interests in lively group conversations.</p>
<div class="chat-rooms-features">
<div class="chat-rooms-feature">
<h3>Interest-Based Rooms</h3>
<p>Join rooms based on your interests - gaming, music, movies, sports, and more.</p>
</div>
<div class="chat-rooms-feature">
<h3>Create Your Own Room</h3>
<p>Start a private or public chat room. You can set a password for privacy and control who joins. Invite friends or let strangers join safely.</p>
</div>
</div>
<a href="https://shkumaraman.github.io/chat/rooms.html" class="chat-rooms-button">Join Chat Rooms</a>
</div>
<!-- ConnectChat Section -->
<div class="talkrush-section">
<div style="text-align: center; margin-bottom: 15px;">
<h2>Connect With New People Instantly</h2>
<p>No login required • 100% free • Meet interesting individuals worldwide</p>
</div>
<h3>How would you like to connect?</h3>
<p>Choose your preferred way to meet people from around the world</p>
<div class="connection-options">
<div class="connection-option">
<h4>Chat Rooms</h4>
<p>Join or Create public conversation rooms and interact with multiple people</p>
</div>
<div class="connection-option">
<h4>Text Conversations</h4>
<p>Private 1-on-1 anonymous messaging with new people</p>
</div>
<div class="connection-option">
<h4>Video Calls</h4>
<p>Face-to-face random video conversations with people worldwide</p>
</div>
<div class="connection-option">
<h4>Anonymous Posts</h4>
<p>Share your thoughts or experiences anonymously with the community — no identity, no pressure.</p>
</div>
</div>
<h3>Why Choose Our Platform?</h3>
<div class="features-slider-container">
<div class="features-slider" id="featuresSlider">
<div class="feature-item">
<h4>100% Anonymous & Free</h4>
<p>No registration needed. Instantly connect without revealing your identity. Completely free random chat experience.</p>
</div>
<div class="feature-item">
<h4>Global Community</h4>
<p>Meet people from all around the world - perfect Omegle and OmeTV alternative for global connections.</p>
</div>
<div class="feature-item">
<h4>Share Media & GIFs</h4>
<p>Send images and GIFs in both group and private conversations for more engaging interactions.</p>
</div>
<div class="feature-item">
<h4>Mobile Friendly</h4>
<p>Works perfectly on all devices - phones, tablets and computers with responsive design.</p>
</div>
<div class="feature-item">
<h4>Quick Skip Feature</h4>
<p>Press Esc to instantly skip and meet someone new — no clicks needed for fast connections.</p>
</div>
<div class="feature-item">
<h4>Interest-Based Matching</h4>
<p>Talk to strangers who match your interests, gender preference, or chosen tags for more relevant conversations.</p>
</div>
<div class="feature-item">
<h4>Quality Video Calling</h4>
<p>Good quality video with minimal lag and quick connections for seamless video chat experience.</p>
</div>
<div class="feature-item">
<h4>Advanced Safety Features</h4>
<p>Content moderation, spam protection, and privacy controls for secure chatting environment.</p>
</div>
</div>
<div class="slider-dots" id="sliderDots"></div>
</div>
<div style="max-width:600px; width:100%; margin:auto;">
<img src="https://shkumaraman.github.io/assets/girls_chat_online.png" alt="girls chatrooms" style="width:100%; height:auto;">
</div>
<h3>Getting Started is Easy</h3>
<p>Join our vibrant community in seconds:</p>
<p>Whether you're looking for casual talk, cultural exchange, or meaningful conversations, we provide the perfect environment with many daily active users ready to connect.</p>
</div>
<!-- PhotoShare Card with Border -->
<div class="app-card">
<h3>PhotoShare</h3>
<p>Secure photo sharing tool where uploaded images are automatically deleted after 24 hours. Share photos with a unique 5-digit code.</p>
<a href="https://shkumaraman.github.io/photoshare.html" class="app-button">Use PhotoShare</a>
</div>
</div>
<script>
// Menu toggle functionality
function toggleMenu() {
const menu = document.getElementById("menu");
const overlay = document.querySelector('.menu-overlay');
const menuBtns = document.querySelectorAll('.menu-btn');
if (menu.style.left === "0px") {
menu.style.left = "-300px";
if (overlay) overlay.style.display = "none";
menuBtns.forEach(btn => btn.innerHTML = "☰");
} else {
menu.style.left = "0px";
if (overlay) overlay.style.display = "block";
menuBtns.forEach(btn => btn.innerHTML = "✖");
}
}
// Features slider functionality
(function() {
const slider = document.getElementById('featuresSlider');
if (!slider) return;
const dotsContainer = document.getElementById('sliderDots');
const items = document.querySelectorAll('.feature-item');
const itemCount = items.length;
function getItemsPerView() {
return window.innerWidth >= 600 ? 2 : 1;
}
let itemsPerView = getItemsPerView();
let currentIndex = 0;
let maxIndex = Math.max(0, Math.ceil(itemCount / itemsPerView) - 1);
let autoSlideInterval;
function createDots() {
dotsContainer.innerHTML = '';
for (let i = 0; i <= maxIndex; i++) {
const dot = document.createElement('button');
dot.classList.add('dot');
if (i === 0) dot.classList.add('active');
dot.setAttribute('data-index', i);
dot.addEventListener('click', function() {
const index = parseInt(this.getAttribute('data-index'));
goToSlide(index);
resetAutoSlide();
});
dotsContainer.appendChild(dot);
}
}
function updateDots() {
const dots = document.querySelectorAll('.dot');
dots.forEach((dot, i) => {
if (i === currentIndex) {
dot.classList.add('active');
} else {
dot.classList.remove('active');
}
});
}
function goToSlide(index) {
if (index < 0) index = 0;
if (index > maxIndex) index = maxIndex;
currentIndex = index;
const translateX = -currentIndex * 100;
slider.style.transform = `translateX(${translateX}%)`;
updateDots();
}
function nextSlide() {
if (currentIndex < maxIndex) {
goToSlide(currentIndex + 1);
} else {
goToSlide(0);
}
}
function resetAutoSlide() {
if (autoSlideInterval) {
clearInterval(autoSlideInterval);
}
autoSlideInterval = setInterval(nextSlide, 5000);
}
function handleResize() {
const newItemsPerView = getItemsPerView();
if (newItemsPerView !== itemsPerView) {
itemsPerView = newItemsPerView;
maxIndex = Math.max(0, Math.ceil(itemCount / itemsPerView) - 1);
if (currentIndex > maxIndex) {
currentIndex = maxIndex;
}
createDots();
goToSlide(currentIndex);
}
}
maxIndex = Math.max(0, Math.ceil(itemCount / itemsPerView) - 1);
createDots();
window.addEventListener('resize', function() {
handleResize();
resetAutoSlide();
});
resetAutoSlide();
slider.addEventListener('mouseenter', function() {
if (autoSlideInterval) {
clearInterval(autoSlideInterval);
}
});
slider.addEventListener('mouseleave', function() {
resetAutoSlide();
});
})();
// DOM Content Loaded
document.addEventListener('DOMContentLoaded', function() {
if (!document.querySelector('.menu-overlay')) {
const overlay = document.createElement('div');
overlay.className = 'menu-overlay';
overlay.onclick = toggleMenu;
document.body.appendChild(overlay);
}
const shareButton = document.getElementById("shareButton");
if (!shareButton) return;
shareButton.addEventListener("click", async () => {
const shareData = {
title: "TalkRush - Chat With Strangers!",
text: "Connect with strangers, chat and Talk freely, and explore fun conversations. Try TalkRush now:",
url: "https://shkumaraman.github.io"
};
if (navigator.share) {
try {
await navigator.share(shareData);
} catch (err) {}
} else {
const fullText = shareData.text + " " + shareData.url;
if (navigator.clipboard) {
navigator.clipboard.writeText(fullText);
} else {
const tempInput = document.createElement("input");
tempInput.value = fullText;
document.body.appendChild(tempInput);
tempInput.select();
document.execCommand("copy");
document.body.removeChild(tempInput);
}
}
});
});
</script>
</body>
</html>