This commit is contained in:
parent
cda62654a0
commit
1abbc86cc7
1 changed files with 18 additions and 9 deletions
|
@ -1,14 +1,23 @@
|
||||||
|
class Tag {
|
||||||
|
constructor(variant, style = "") {
|
||||||
|
this.variant = variant;
|
||||||
|
this.style = style;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
window.addEventListener("load", () => {
|
window.addEventListener("load", () => {
|
||||||
const tags = [
|
const tags = [
|
||||||
"Comment ça marche un PC 😵💫",
|
new Tag("Comment ça marche un PC 😵💫"),
|
||||||
"Idiot certifié",
|
new Tag("Idiot certifié"),
|
||||||
"undefined",
|
new Tag("undefined"),
|
||||||
"/api/v1/love",
|
new Tag("/api/v1/love", "font-family: monospace"),
|
||||||
"Étudiant qui va rater son master",
|
new Tag("Étudiant qui va rater son master"),
|
||||||
"Peak D2 sur Valo 🤡",
|
new Tag("Peak D2 sur Valo 🤡"),
|
||||||
"1312",
|
new Tag("1312"),
|
||||||
];
|
];
|
||||||
|
|
||||||
document.getElementById("subname").textContent =
|
const random = Math.round(Math.random() * (tags.length - 1));
|
||||||
tags[Math.round(Math.random() * (tags.length - 1))];
|
const element = document.getElementById("subname");
|
||||||
|
element.textContent = tags[random].variant;
|
||||||
|
element.style = tags[random].style;
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue