// ==UserScript== // @name Hello, Dolly! // @description Displays lyrics from the song "Hello Dolly" by Jerry Herman // @author HotSocket // @downloadURL https://tangled.org/did:plc:jlplwn5pi4dqrls7i6dx2me7/hello-dolly/raw/main/hello.user.js // @match *://tangled.org/* // @match *://tangled.sh/* // @version 1.1 // ==/UserScript== function hello_dolly_get_lyric() { /** These are the lyrics to Hello Dolly */ const lyrics = `Hello, Dolly Well, hello, Dolly It's so nice to have you back where you belong You're lookin' swell, Dolly I can tell, Dolly You're still glowin', you're still crowin' You're still goin' strong I feel the room swayin' While the band's playin' One of our old favorite songs from way back when So, take her wrap, fellas Dolly, never go away again Hello, Dolly Well, hello, Dolly It's so nice to have you back where you belong You're lookin' swell, Dolly I can tell, Dolly You're still glowin', you're still crowin' You're still goin' strong I feel the room swayin' While the band's playin' One of our old favorite songs from way back when So, golly, gee, fellas Have a little faith in me, fellas Dolly, never go away Promise, you'll never go away Dolly'll never go away again`; // Here we split it into lines. const lines = lyrics.split("\n"); // And then randomly choose a line. return lines[Math.max(0, Math.round((Math.random()*lines.length) - 1))]; } // This just creates the element for the chosen line, we'll position it later. function hello_dolly() { const chosen = hello_dolly_get_lyric(); const el = document.createElement("span"); el.classList.add("text-gray-700", "dark:text-gray-400"); el.textContent = chosen; el.ariaLabel = `Quote from Hello Dolly song, by Jerry Herman: ${chosen}`; return el; } const leftItems = document.getElementById("left-items"); leftItems.style.display = "flex"; leftItems.style.alignItems = "center"; leftItems.style.gap = "1em"; leftItems.appendChild(hello_dolly());