Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Tcip/3a12f1e71a0c8b29e4ef34c8cdda6081 to your computer and use it in GitHub Desktop.
Save Tcip/3a12f1e71a0c8b29e4ef34c8cdda6081 to your computer and use it in GitHub Desktop.
Copy Player Name and Twitch Channel to Clipboard for Embervale
javascript:(function()%7B(async%20function()%20%7Bconst%20playerNameElement%20%3D%20document.querySelector(%22.character-menu-background%20span%5Bstyle%5E%3D'font-size'%5D%22)%3Bconst%20playerTwitchChannelElement%20%3D%20document.querySelector(%22.character-menu-background%20.popper%22)%3Bif%20(playerNameElement%20%26%26%20playerTwitchChannelElement)%20%7Btry%20%7Bawait%20navigator.clipboard.writeText(%60%24%7BplayerNameElement.textContent.trim()%7D%20-%20%24%7BplayerTwitchChannelElement.textContent.trim()%7D%60)%3B%7D%20catch%20(error)%20%7Bconsole.error(%22Error%20copying%20text%20to%20clipboard%3A%22%2C%20error)%3B%7D%7D%20else%20%7Bconsole.error(%22One%20or%20more%20required%20elements%20not%20found%22)%3B%7D%7D())%7D)()
(async function() {
const playerNameElement = document.querySelector(".character-menu-background span[style^='font-size']");
const playerTwitchChannelElement = document.querySelector(".character-menu-background .popper");
if (playerNameElement && playerTwitchChannelElement) {
try {
await navigator.clipboard.writeText(`${playerNameElement.textContent.trim()} - ${playerTwitchChannelElement.textContent.trim()}`);
} catch (error) {
console.error("Error copying text to clipboard:", error);
}
} else {
console.error("One or more required elements not found");
}
}())
@Tcip
Copy link
Author

Tcip commented Jul 2, 2025

Copy Name and Twitch Channel to Clipboard

Copies the player name and Twitch channel to the clipboard for the game Embervale


Usage

  1. Create a new bookmark with the Website Address from the file above
  2. While on a opponent's page (example clicked on a player in the Leaderboard or Arena) click on the bookmarklet and the player name and Twitch channel is copied to the clipboard

Note
can also be used on Character page if you want to copy your own name and Twitch channel


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment