Jump to content

User:Stumblean/common.js: Difference between revisions

From Domination Earth
Stumblean (talk | contribs)
No edit summary
Tags: Mobile edit Mobile web edit Advanced mobile edit
Stumblean (talk | contribs)
No edit summary
Tags: Mobile edit Mobile web edit Advanced mobile edit
Line 1: Line 1:
(function() {
(function() {
     // Create a container
     // Create the menu container
     const menu = document.createElement("div");
     const menu = document.createElement("div");
     menu.id = "mahitoMenu";
     menu.id = "mahitoMenu";
Line 22: Line 22:
     menu.appendChild(title);
     menu.appendChild(title);


     // Add a button (example)
     // "Open Explanation" button (placeholder)
     const btn = document.createElement("button");
     const openBtn = document.createElement("button");
     btn.textContent = "Transfigure Stuff";
     openBtn.textContent = "Open Explanation";
     btn.style.background = "#444";
     openBtn.style.background = "#444";
     btn.style.color = "#fff";
     openBtn.style.color = "#fff";
     btn.style.border = "none";
     openBtn.style.border = "none";
     btn.style.padding = "5px 10px";
     openBtn.style.padding = "5px 10px";
     btn.style.cursor = "pointer";
     openBtn.style.cursor = "pointer";
     btn.onclick = function() {
     openBtn.onclick = function() {
         alert("You have been transfigured 💀");
         // do something later
        console.log("Open Explanation clicked");
     };
     };
     menu.appendChild(btn);
     menu.appendChild(openBtn);


     // Add the menu to the page
     // Add the menu to the page
     document.body.appendChild(menu);
     document.body.appendChild(menu);
})();
})();

Revision as of 00:42, 27 June 2025

(function() {
    // Create the menu container
    const menu = document.createElement("div");
    menu.id = "mahitoMenu";
    menu.style.position = "fixed";
    menu.style.top = "20px";
    menu.style.right = "20px";
    menu.style.padding = "10px";
    menu.style.backgroundColor = "#111";
    menu.style.color = "#fff";
    menu.style.border = "2px solid #666";
    menu.style.zIndex = "9999";
    menu.style.fontFamily = "monospace";
    menu.style.borderRadius = "10px";
    menu.style.boxShadow = "0 0 10px rgba(0,0,0,0.5)";

    // Title
    const title = document.createElement("div");
    title.textContent = "💀 Mahito Menu 💀";
    title.style.fontWeight = "bold";
    title.style.marginBottom = "8px";
    menu.appendChild(title);

    // "Open Explanation" button (placeholder)
    const openBtn = document.createElement("button");
    openBtn.textContent = "Open Explanation";
    openBtn.style.background = "#444";
    openBtn.style.color = "#fff";
    openBtn.style.border = "none";
    openBtn.style.padding = "5px 10px";
    openBtn.style.cursor = "pointer";
    openBtn.onclick = function() {
        // do something later
        console.log("Open Explanation clicked");
    };
    menu.appendChild(openBtn);

    // Add the menu to the page
    document.body.appendChild(menu);
})();
Cookies help us deliver our services. By using our services, you agree to our use of cookies.