Skip to content

Instantly share code, notes, and snippets.

@caffeinewriter
Created December 7, 2017 07:40
Show Gist options
  • Save caffeinewriter/e240970cd08c488300a78c07382ce012 to your computer and use it in GitHub Desktop.
Save caffeinewriter/e240970cd08c488300a78c07382ce012 to your computer and use it in GitHub Desktop.
Twitch Custom Username Color
<html>
<head>
<style>
body, html {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
}
.bookmarklet, .bookmarklet:visited, .bookmarklet:active {
text-decoration: none;
font-family: sans-serif;
color: #6441A4;
font-size: 1.2rem;
line-height: 1.2rem;
vertical-align: middle;
background-color: #F3F3F3;
padding: 1rem;
text-align: center;
border-radius: .4rem;
border: 1px solid #888;
display: block;
margin: 1rem auto;
}
</style>
</head>
<body>
Drag this link to your bookmarks bar, then visit the <a href="https://twitch.tv/settings/prime">Prime Settings page</a> to change your color.
<a class="bookmarklet" href="javascript:(function()%7Bjavascript%3A%20var%20colorInput%20%3D%20document.querySelector('.js-color-input')%3BcolorInput%20%7C%7C%20alert('You%20don%5C't%20appear%20to%20be%20on%20Twitch%5C's%20color%20settings%20page.')%3Bvar%20successMsg%20%3D%20%7Btype%3A%20'success'%2Ctemplate%3A%20'%3Cdiv%20class%3D%5C'noty_message%5C'%3E%3Cdiv%20class%3D%5C'text-container%5C'%3E%3Cdiv%20class%3D%5C'glitch%5C'%3E%3C%2Fdiv%3E%3Cdiv%20class%3D%5C'noty_text%5C'%3E%3C%2Fdiv%3E%3C%2Fdiv%3E%3Cdiv%20class%3D%5C'noty_close%5C'%3E%3C%2Fdiv%3E%3C%2Fdiv%3E'%2Ctext%3A%20'Your%20color%20was%20successfully%20changed!%20It%20will%20not%20show%20until%20you%20save%20and%20reload.'%2Ctimeout%3A%204500%7D%2Ccolor%20%3D%20prompt('Enter%20the%20color%20you%20want%20as%20a%206%20character%20hex%20value.')%2CcolorRegex%20%3D%20%2F%23%3F(%5B0-9A-F%5D%7B6%7D)%2Fgi%3BcolorInput.value%20%3D%20'%23'%20%2B%20colorRegex.exec(color)%5B1%5D%2C%20noty(successMsg)%7D)()">Custom Twitch Color</a>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment