Advertisement
jamastar

Twitch Chat Box Custom HTML/CSS/JS

May 12th, 2022
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.07 KB | None | 0 0
  1. -----------------READ ME-------------------
  2. ♡ Set up by Guppy - https://www.twitch.tv/bubbaguppylive
  3. ♡ Watch the tutorial - https://www.youtube.com/channel/UCCncUabhB43dAZ7ZMAiwIbA
  4.  
  5. DISCLAIMER:
  6. ♡ Only works on SLOBS or STREAM LABS OBS | if there's a demand, I'll make it work for all stream services :)
  7. ♡ DO NOT INCLUDE "-------Copy and Past..." or "- END -" when copy/pasting, they're just for separation.
  8. -------------------------------------------
  9.  
  10. -------Copy and Paste this to HTML---------
  11. <div id="log" class="sl__chat__layout">
  12. </div>
  13.  
  14. <!-- chat item -->
  15. <script type="text/template" id="chatlist_item">
  16. <div data-from="{from}" data-id="{messageId}">
  17. <span class="meta" style="color: {color}">
  18. <span class="name">{from}</span>
  19. </span>
  20. <span class="message">
  21. {message}
  22. </span>
  23. </div>
  24. </script>
  25.  
  26.  
  27. ------- END ---------
  28.  
  29.  
  30.  
  31. -------Copy and Paste this to CSS---------
  32.  
  33. /* CHANGE FONT HERE */
  34. @font-face {
  35. font-family: joodles;
  36. src: url('https://raw.githack.com/cjlaserna/birbuniverse/master/Littlejoodles-Regular.ttf'); }
  37. /* END */
  38.  
  39. html, body {
  40. height: 100%;
  41. overflow: hidden;
  42. }
  43.  
  44. body {
  45. color: #916E56 !important; /* CHANGE FONT COLOR */
  46. text-shadow: 0 0 1px rgba(0, 0, 0, 0.6), 0 0 2px rgba(0, 0, 0, 0.6); /* TEXT SHADOW */
  47.  
  48. font-family: 'joodles', sans-serif !important; /* CHANGE THIS IF YOU CHANGED THE FONT */
  49. }
  50.  
  51. /* CUSTOMIZE MESSAGE */
  52. .message {
  53. font-size: 72px; /* CHANGE MESSAGE FONT SIZE */
  54. margin: none;
  55. padding: 0px;
  56. }
  57.  
  58. /* CUSTOMIZE NAME */
  59. .name {
  60. font-size: 56px; /* CHANGE USERNAME FONT SIZE */
  61. color: #916E56; /* CHANGE NAME FONT COLOR */
  62. }
  63.  
  64. /* TRY NOT TO CHANGE ANY OF THESE UNLESS YOU KNOW WHAT YOU'RE DOING */
  65. /* YOU CAN ALWAYS GO BACK TO THE PASTEBIN TO START OVER. */
  66. #log {
  67. position: absolute;
  68. bottom: 0;
  69. left: 0;
  70. width: 100%;
  71. box-sizing: border-box;
  72. overflow: hidden;
  73. }
  74.  
  75. #log>div {
  76. padding: 5px 10px 10px;
  77. animation: fadeIn 0.5s ease, fadeOut 0.5s ease 99999999ms forwards;
  78. -webkit-animation: fadeIn 0.5s ease, fadeOut0.5s ease 99999999ms forwards;
  79. border-radius: 20px;
  80. }
  81.  
  82. #log>div.deleted {
  83. visibility: hidden;
  84. }
  85.  
  86. .meta {
  87. display: block;
  88. }
  89.  
  90. .colon {
  91. display: none;
  92. }
  93.  
  94. .badge {
  95. float: right;
  96. padding-left: 5px;
  97. height: 1em;
  98. }
  99.  
  100. #log .emote {
  101. background-repeat: no-repeat;
  102. background-position: center;
  103. padding: 0.1em;
  104. background-size: contain;
  105. }
  106.  
  107. #log .emote img {
  108. display: inline-block;
  109. height: 1em;
  110. opacity: 0;
  111. vertical-align: top;
  112. }
  113.  
  114.  
  115.  
  116. ------- END ---------
  117.  
  118. ------- Copy and Paste this to JS ---------
  119. // Please use event listeners to run functions.
  120. document.addEventListener('onLoad', function(obj) {
  121. // obj will be empty for chat widget
  122. // this will fire only once when the widget loads
  123. });
  124.  
  125. document.addEventListener('onEventReceived', function(obj) {
  126. // obj will contain information about the event
  127.  
  128. });
  129. ------- END ---------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement