19 lines
786 B
JavaScript
Executable File
19 lines
786 B
JavaScript
Executable File
document.addEventListener("DOMContentLoaded", () => {
|
|
const motdMessage = window.motds[window.motdIndex];
|
|
const targetMessage = "Linux c'est mieux que tout, si quelqu'un pointe les problèmes de compatibilité, c'est la faute des devs des logiciels.";
|
|
|
|
if (motdMessage === targetMessage) {
|
|
// Create a div with an ID
|
|
const linkTarget = document.createElement("div");
|
|
linkTarget.id = "linux-motd";
|
|
linkTarget.textContent = "Special MOTD section!";
|
|
document.getElementById("links-container").appendChild(linkTarget);
|
|
|
|
// Create an anchor linking to it
|
|
const anchor = document.createElement("a");
|
|
anchor.href = "#linux-motd";
|
|
anchor.textContent = "Go to special MOTD";
|
|
document.getElementById("links-container").appendChild(anchor);
|
|
}
|
|
});
|