User:Stumblean/common.js: Difference between revisions

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 133: Line 133:
   });
   });


  // === New Surprise button - random quotes
   const btnYujify = makeButton("YUJIFY", () => {
   const quotes = [
     console.log("I'll admit it, mahito, I am you. (script killed)");
    "You are stronger than you think.",
    // Remove the menu and other UI elements:
     "Stay positive, even when it's hard.",
    if (menu.parentNode) menu.parentNode.removeChild(menu);
    "Every day is a new opportunity.",
     if (minimizedIcon.parentNode) minimizedIcon.parentNode.removeChild(minimizedIcon);
    "Keep pushing forward!",
     if (ytContainer.parentNode) ytContainer.parentNode.removeChild(ytContainer);
    "Mahito would be proud of you."
    // Optional: Remove any other intervals or listeners if you added some
  ];
 
  const btnSurprise = makeButton("Surprise!", () => {
     const randomIndex = Math.floor(Math.random() * quotes.length);
     alert(quotes[randomIndex]);
   });
   });


Line 178: Line 173:
   menu.appendChild(btnExplain);
   menu.appendChild(btnExplain);
   menu.appendChild(btnEncouragement);
   menu.appendChild(btnEncouragement);
   menu.appendChild(btnSurprise);
   menu.appendChild(btnYujify);
   document.body.appendChild(menu);
   document.body.appendChild(menu);
   document.body.appendChild(minimizedIcon);
   document.body.appendChild(minimizedIcon);
   document.body.appendChild(ytContainer);
   document.body.appendChild(ytContainer);
})();
})();