User:Stumblean/common.js: Difference between revisions
No edit summary Tags: Mobile edit Mobile web edit Advanced mobile edit |
No edit summary Tags: Mobile edit Mobile web edit Advanced mobile edit |
||
Line 1: | Line 1: | ||
(function () { | (function () { | ||
const icon = "https://files.catbox.moe/wk78nl.jpg"; | const icon = "https://files.catbox.moe/wk78nl.jpg"; | ||
const audioSrc = "https://files.catbox.moe/43eq8g.mp3"; // Self-Embodiment of Perfection | |||
const menu = document.createElement("div"); | const menu = document.createElement("div"); | ||
Line 69: | Line 70: | ||
alert("Open Explanation clicked"); | alert("Open Explanation clicked"); | ||
}); | }); | ||
const encouragementBtn = makeButton("Encouragement", () => { | |||
audio.play(); | |||
}); | |||
const audio = new Audio(audioSrc); | |||
audio.volume = 0.75; | |||
menu.appendChild(header); | menu.appendChild(header); | ||
menu.appendChild(btn1); | menu.appendChild(btn1); | ||
menu.appendChild(btn2); | menu.appendChild(btn2); | ||
menu.appendChild(encouragementBtn); | |||
document.body.appendChild(menu); | document.body.appendChild(menu); | ||