2023-10-14 17:07:14 +02:00
|
|
|
class Tag {
|
|
|
|
constructor(variant, style = "") {
|
|
|
|
this.variant = variant;
|
|
|
|
this.style = style;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-10-13 19:12:21 +02:00
|
|
|
window.addEventListener("load", () => {
|
|
|
|
const tags = [
|
2023-10-14 17:07:14 +02:00
|
|
|
new Tag("Comment ça marche un PC 😵💫"),
|
|
|
|
new Tag("Idiot certifié"),
|
|
|
|
new Tag("undefined"),
|
|
|
|
new Tag("/api/v1/love", "font-family: monospace"),
|
|
|
|
new Tag("Étudiant qui va rater son master"),
|
|
|
|
new Tag("Peak D2 sur Valo 🤡"),
|
|
|
|
new Tag("1312"),
|
2023-10-13 19:12:21 +02:00
|
|
|
];
|
|
|
|
|
2023-10-14 17:07:14 +02:00
|
|
|
const random = Math.round(Math.random() * (tags.length - 1));
|
|
|
|
const element = document.getElementById("subname");
|
|
|
|
element.textContent = tags[random].variant;
|
|
|
|
element.style = tags[random].style;
|
2023-10-13 19:12:21 +02:00
|
|
|
});
|