-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
22 lines (21 loc) · 856 Bytes
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { ble } from "./data/ble.js";
import { ive } from "./data/ive.js";
const iveble = () => {
const self = "https://iveble.art";
const randomive = ive[Math.floor(Math.random() * ive.length)];
const randomable = ble[Math.floor(Math.random() * ble.length)];
const output = `${randomive}<br/>and<br/>${randomable}`;
const tweetText = `i'm ${randomive} and ${randomable} 🥺`;
document.querySelector("#content").innerHTML = output;
document.querySelector(".twitter-btn").addEventListener("click", (event) => {
event.preventDefault();
window.open(`https://twitter.com/intent/tweet?text=${tweetText}&url=${self}`, "_blank");
});
};
document.addEventListener("DOMContentLoaded", (event) => {
iveble();
document.querySelector("#newplsuwu").addEventListener("click", (event) => {
event.preventDefault();
iveble();
});
});