Skip to content

Commit a9d06df

Browse files
author
Shivam Singh
authored
Update index.html
1 parent 19fdf3d commit a9d06df

1 file changed

Lines changed: 86 additions & 0 deletions

File tree

index.html

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,87 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
13

4+
<head>
5+
<meta charset="UTF-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
<title>Emoji Copy Example</title>
8+
<style>
9+
/* Global black and white theme */
10+
body {
11+
margin: 0;
12+
font-family: Arial, sans-serif;
13+
background-color: #000;
14+
color: #fff;
15+
display: flex;
16+
justify-content: center;
17+
align-items: center;
18+
height: 100vh;
19+
text-align: center;
20+
}
21+
22+
.content {
23+
max-width: 600px;
24+
padding: 20px;
25+
}
26+
27+
h1 {
28+
font-size: 6rem;
29+
margin-bottom: 10px;
30+
}
31+
32+
p {
33+
font-size: .9rem;
34+
/* margin-bottom: px; */
35+
}
36+
37+
@media (max-width: 768px) {
38+
h1 {
39+
font-size: 4rem;
40+
}
41+
42+
p {
43+
font-size: .5rem;
44+
}
45+
}
46+
</style>
47+
</head>
48+
49+
<body>
50+
<div class="content">
51+
<h1>Don't Copy </h1>
52+
<p>This is fun Project to present for Aware people don't copy any text from anywhere </p>
53+
<p class="highlight">Select and copy this text to reveal the fun part. 🎉</p>
54+
</div>
55+
56+
<script>
57+
document.addEventListener("copy", (event) => {
58+
// Prevent default copy behavior
59+
event.preventDefault();
60+
61+
// Get the current date and time
62+
const now = new Date();
63+
const day = now.getDate();
64+
const month = now.getMonth() + 1; // Months are 0-indexed
65+
const year = now.getFullYear();
66+
const hours = now.getHours();
67+
const minutes = now.getMinutes().toString().padStart(2, "0");
68+
69+
// Construct an emoji message
70+
const happyEmoji = "😄";
71+
const middleFingerEmoji = "🖕";
72+
const dateEmoji = "📅";
73+
const timeEmoji = "⏰";
74+
75+
const emojiMessage = `
76+
${happyEmoji} You've been tricked! ${middleFingerEmoji}
77+
${dateEmoji} ${day}/${month}/${year}
78+
${timeEmoji} ${hours}:${minutes}
79+
`;
80+
81+
// Set the clipboard data to the emoji message
82+
event.clipboardData.setData("text/plain", emojiMessage.trim());
83+
});
84+
</script>
85+
</body>
86+
87+
</html>

0 commit comments

Comments
 (0)