-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathscripts.js
More file actions
177 lines (151 loc) 路 7.03 KB
/
Copy pathscripts.js
File metadata and controls
177 lines (151 loc) 路 7.03 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
document.addEventListener('DOMContentLoaded', (event) => {
document.getElementById('ok-button').addEventListener('click', handleOkButtonClick);
});
let progress = localStorage.getItem('progress') ? parseInt(localStorage.getItem('progress')) : 0;
document.getElementById('progress-bar-fill').style.width = progress + '%';
document.getElementById('progress-bar-fill').textContent = progress + '%';
function handleOkButtonClick() {
document.getElementById('initial-message').style.display = 'none';
document.getElementById('account-details').style.display = 'block';
}
function submitAccountDetails() {
const accountName = document.getElementById('account-name').value;
const accountNumber = document.getElementById('account-number').value;
const bankName = document.getElementById('bank-name').value;
// Validate that all fields are filled
if (accountName.trim() === '' || accountNumber.trim() === '' || bankName.trim() === '') {
alert('Please fill in all fields.');
return; // Stop execution if any field is empty
}
// Validate account number (must be exactly 10 digits)
if (accountNumber.length !== 10 || isNaN(accountNumber)) {
alert('Invalid Account number! Must be 10 digits.');
return; // Stop execution if the account number is invalid
}
// If all validations pass, proceed with submission
alert('Account details submitted!');
document.getElementById('account-details').style.display = 'none';
document.getElementById('main-content').style.display = 'block';
}
function resetLocalStorage() {
localStorage.clear();
document.getElementById('progress-bar-fill').style.width = '0%';
document.getElementById('progress-bar-fill').textContent = '0%';
}
function share() {
let progress = localStorage.getItem('progress') ? parseInt(localStorage.getItem('progress')) : 0;
if (progress < 100) {
progress += 10;
if (progress > 100) progress = 100;
document.getElementById('progress-bar-fill').style.width = progress + '%';
document.getElementById('progress-bar-fill').textContent = progress + '%';
localStorage.setItem('progress', progress);
}
window.open("https://api.whatsapp.com/send?text=Hello 馃憢 an online foreign company is doing a massive empowerment tournament and I just got nominated for the $200 giveaway and the online foreign job offer! Click this link to join us now!馃憞. https://giveaways-liart.vercel.app/", "_blank");
if (progress === 100) {
showFinalMessage();
}
}
function showFinalMessage() {
document.getElementById('main-content').style.display = 'none';
document.getElementById('final-message').style.display = 'block';
}
function completeRegistration() {
window.open("https://chat.whatsapp.com/B5tRmodg01594ztgWXUtoE", "_blank");
}
function addComment() {
var commentInput = document.getElementById('commentInput');
var commentText = commentInput.value;
var commentsContainer = document.getElementById('commentsContainer');
var nameText = "User"; // Replace this with the actual user name, if available.
if (commentText !== '') {
// Create a new comment element
const newComment = document.createElement('div');
newComment.className = 'comment';
newComment.innerHTML = `
<img src="img/dudee.jpg" alt="User Image" width="50" height="50">
<p><strong>${nameText}:</strong> ${commentText}</p>
<div class="comment-info">
<span class="comment-time">Just now</span>
<span>路</span>
<span>Like</span>
<span>路</span>
<span>Reply</span>
</div>
`;
// Append the new comment to the comments container
commentsContainer.appendChild(newComment);
// Clear the input and replace with "Comment Added!"
commentInput.value = 'Comment Added!';
// Optionally, you can disable the textarea temporarily if needed
commentInput.disabled = true;
// Re-enable and clear the textarea after a brief period (optional)
setTimeout(function() {
commentInput.value = '';
commentInput.disabled = false;
}, 2000); // Change 2000 to the desired delay (in milliseconds)
} else {
alert('Please enter a comment.');
}
}
// Simulate adding random comments
function addRandomComment() {
const commentsArray = [
{
profilePic: 'img/emptygir.jpg',
comment: 'I love your updates please bring more!!'
},
{
profilePic: 'img/emptyman.png',
comment: 'I have received my $200 thank you so much I appreciate it!'
},
{
profilePic: 'img/emptyman.png',
comment: 'Just received my $200 payout from this platform! It鈥檚 legit guys, don鈥檛 miss out. #happydance'
},
{
profilePic: 'img/emptyman.png',
comment: 'Can confirm, got my $200 in my account! Join now and start earning too.'
},
{
profilePic: 'img/emptygir.jpg',
comment: 'Another awesome withdrawal received thank you!'
},
{
profilePic: 'img/emptygir.jpg',
comment: 'This is a paying platform!'
},
{
profilePic: 'img/emptygir.jpg',
comment: 'Can鈥檛 believe it was this easy! Just got my $200 payment. Join now and start earning.'
}
];
const randomIndex = Math.floor(Math.random() * commentsArray.length);
const randomComment = commentsArray[randomIndex];
const commentElement = document.createElement('div');
commentElement.className = 'comment';
commentElement.innerHTML = `
<img src="${randomComment.profilePic}" alt="Profile Pic" class="comment-img">
<p>${randomComment.comment}</p>
<div class="comment-info">
<span class="comment-time">2m</span>
<span>路</span>
<span>Like</span>
<span>路</span>
<span>Reply</span>
</div>
`;
document.querySelector('.comments').appendChild(commentElement);
}
setInterval(addRandomComment, 12000); // Add a random comment every 12 seconds
const commentsCountElement = document.getElementById('commentsCount');
const sharesCountElement = document.getElementById('sharesCount');
let commentsCount = 32000;
let sharesCount = 20000;
function updateCommentShareCount() {
commentsCount += Math.floor(Math.random() * 5) + 1;
sharesCount += Math.floor(Math.random() * 5) + 1;
commentsCountElement.textContent = commentsCount.toLocaleString();
sharesCountElement.textContent = sharesCount.toLocaleString();
}
setInterval(updateCommentShareCount, 5000); // Update comment and share counts every 12 seconds