Repository navigation
Expand file tree
/
Copy pathapp.js
More file actions
55 lines (44 loc) · 1.66 KB
/
Copy pathapp.js
File metadata and controls
55 lines (44 loc) · 1.66 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
function showPopup() {
document.getElementById("popup").style.display = "flex";
}
function closePopup() {
document.getElementById("popup").style.display = "none";
}
function copyPost() {
const text = `🚀 I just made my FIRST Open Source Contribution!
From understanding GitHub to creating my first Pull Request — this feels unreal 🤯
✅ My name is now LIVE on a real website
✅ My GitHub graph just turned GREEN
✅ And this is just the beginning!
Huge thanks to @Parul Prashar for making this beginner-friendly 🚀
If you're starting out, THIS is your sign to begin.
🔗 Check it out: https://parulprashar.github.io/Hall-of-PRs/
🎥 Tutorial I followed: https://www.youtube.com/watch?v=DPShl8GWqS8
#FirstPR #OpenSource #GitHub #LearningInPublic`;
navigator.clipboard.writeText(text);
alert("Copied! Now paste it on LinkedIn 🚀");
}
function updateCounter() {
const cards = document.querySelectorAll(".card");
const count = cards.length;
const counterElement = document.getElementById("counter-number");
counterElement.textContent = count;
}
window.addEventListener("load", updateCounter);
function animateCounter(finalCount) {
let current = 0;
const counterElement = document.getElementById("counter-number");
const interval = setInterval(() => {
current += Math.ceil(finalCount / 30);
if (current >= finalCount) {
current = finalCount;
clearInterval(interval);
}
counterElement.textContent = current;
}, 30);
}
window.addEventListener("load", () => {
const cards = document.querySelectorAll(".card");
const count = cards.length;
animateCounter(count);
});