-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
33 lines (28 loc) · 1.03 KB
/
index.js
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
// Get all the icon elements
const icons = document.querySelectorAll('.shake');
// Add event listeners to each icon
icons.forEach(icon => {
// Add the shake class when the mouse enters
icon.addEventListener('mouseenter', () => {
icon.classList.add('shake-icon');
});
// Remove the shake class when the mouse leaves
icon.addEventListener('mouseleave', () => {
icon.classList.remove('shake-icon');
});
});
function copyToEmail() {
// Get the message and subject entered by the user
var message = document.getElementById("message").value;
var subject = document.getElementById("project").value;
// Open Gmail and populate the email text area with the message and subject
var emailBody = encodeURIComponent(message);
var mailtoLink = "mailto:[email protected]?body=" + emailBody;
// Include the subject if it is provided
if (subject) {
var encodedSubject = encodeURIComponent(subject);
mailtoLink += "&subject=" + encodedSubject;
}
// Open the email client
window.location.href = mailtoLink;
}