-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
93 lines (80 loc) · 2.74 KB
/
index.html
File metadata and controls
93 lines (80 loc) · 2.74 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Emoji Copy Example</title>
<style>
/* Global black and white theme */
body {
margin: 0;
font-family: Arial, sans-serif;
background-color: #000;
color: #fff;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
text-align: center;
}
.content {
max-width: 600px;
padding: 20px;
}
h1 {
font-size: 6rem;
margin-bottom: 10px;
}
p {
font-size: .9rem;
/* margin-bottom: px; */
}
@media (max-width: 768px) {
h1 {
font-size: 4rem;
}
p {
font-size: .5rem;
}
}
</style>
</head>
<body>
<div class="content">
<h1>Don't Copy </h1>
<p>This is fun Project to present for Aware people don't copy any text from anywhere </p>
<p class="highlight">Select and copy this text to reveal the fun part. 🎉</p>
</div>
<script>
document.addEventListener("copy", (event) => {
// Prevent default copy behavior
event.preventDefault();
// Get the current date and time
const now = new Date();
const day = now.getDate();
const month = now.getMonth() + 1; // Months are 0-indexed
const year = now.getFullYear();
const hours = now.getHours();
const minutes = now.getMinutes().toString().padStart(2, "0");
// Construct an emoji message
const happyEmoji = "😄";
const middleFingerEmoji = "🖕";
const dateEmoji = "📅";
const timeEmoji = "⏰";
const emojiMessage = `
${happyEmoji} You've been tricked! ${middleFingerEmoji}
${dateEmoji} ${day}/${month}/${year}
${timeEmoji} ${hours}:${minutes}
`;
// Set the clipboard data to the emoji message
event.clipboardData.setData("text/plain", emojiMessage.trim());
});
</script>
<footer
style="position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); padding: 8px 16px; font-family: Arial, sans-serif; font-size: 14px; z-index: 1000;">
Created by <a href="http://www.sinzn.fun/" style="text-decoration: none; color: #0366d6;"> Shivam Singh </a> |
Source available on
<a href="https://github.com/sinzn" target="_blank" style="text-decoration: none; color: #0366d6;">GitHub</a>.
</footer>
</body>
</html>