CosmosisT's TinyChat Script (CTS V1.6.81)

Modified TinyChat - Best Scripts; prepare to be amazed.

当前为 2020-06-05 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name CosmosisT's TinyChat Script (CTS V1.6.81)
  3. // @version 1.6.81
  4. // @description Modified TinyChat - Best Scripts; prepare to be amazed.
  5. // @author CosmosisT
  6. // @url https://gist.github.com/CosmosisT
  7. // @license Copyright (C) 2019-2020 CosmosisT
  8. // @icon https://tinychat.com/webrtc/2.0.0-81/images/favicon.png
  9. // @match https://tinychat.com/room/*
  10. // @match https://tinychat.com/*
  11. // @exclude https://tinychat.com/settings/*
  12. // @exclude https://tinychat.com/subscription/*
  13. // @exclude https://tinychat.com/promote/*
  14. // @exclude https://tinychat.com/coins/*
  15. // @exclude https://tinychat.com/gifts*
  16. // @grant none
  17. // @run-at document-start
  18. // jshint esversion: 6
  19. // @namespace https://greasyfork.org/users/395685
  20. // ==/UserScript==
  21. (function() {
  22. "use strict";
  23. //DEBUGGER
  24. window.DebugClear = true; // TRUE = CLEARS || FALSE = SHOWS
  25. window.CTSVersion = {
  26. Major: 1,
  27. Minor: 6,
  28. Patch: 81
  29. };
  30. var MainElement, ChatLogElement, VideoListElement, SideMenuElement, TitleElement, UserListElement, ModerationListElement, ChatListElement, UserContextElement, MicrophoneElement,
  31. FeaturedCSS, VideoCSS, SideMenuCSS, MainCSS, RoomCSS, TitleCSS, ContextMenuCSS, ModeratorCSS, UserListCSS, ChatListCSS, NotificationCSS, ChatboxCSS;
  32. //CTS MAIN VARIABLES
  33. var CTS = {
  34. Project: {
  35. Name: "CTS",
  36. Storage: "CTS_",
  37. isTouchScreen: false
  38. },
  39. Chuck: {
  40. XHR: new XMLHttpRequest()
  41. },
  42. Urb: {
  43. XHR: new XMLHttpRequest()
  44. },
  45. Dad: {
  46. XHR: new XMLHttpRequest()
  47. },
  48. Advice: {
  49. XHR: new XMLHttpRequest()
  50. },
  51. //API_KEY FOR YOUTUBE CAN BE INSERTED BELOW (NO WHERE ELSE)
  52. //TC KEY AIzaSyAf1XXorjOLdjS2j5PGi3SLCGl7LhyxQXs
  53. YouTube: {
  54. API_KEY: "AIzaSyAf1XXorjOLdjS2j5PGi3SLCGl7LhyxQXs",
  55. XHR: new XMLHttpRequest(),
  56. Playing: false,
  57. MessageQueueList: [],
  58. NotPlayable: ["Private video", "Deleted video"],
  59. VideoID: undefined,
  60. Busy: false,
  61. DataReady: false,
  62. Clear: false,
  63. VideoReturn: false,
  64. SearchReturn: false,
  65. ListBuilt: true,
  66. PlayListCount: undefined,
  67. ShowQueue: false,
  68. CurrentTrack: {
  69. ID: undefined,
  70. duration: undefined,
  71. title: undefined,
  72. thumbnail: undefined
  73. }
  74. },
  75. Me: [],
  76. Room: [],
  77. ScriptInit: false,
  78. MainBackground: undefined,
  79. OGStyle: {
  80. HeightCounter: 3,
  81. WidthCounter: 1,
  82. SavedHeight: undefined,
  83. SavedWidth: undefined
  84. },
  85. NormalStyle: {
  86. ChatHide: false
  87. },
  88. FontSize: 20,
  89. ChatStyleCounter: 0,
  90. ChatHeight: 30,
  91. ChatWidth: 0,
  92. ChatDisplay: true,
  93. UserListDisplay: true,
  94. ChatStyles: undefined,
  95. MainBackgroundCounter: 0,
  96. ChatLimit: 650,
  97. NotificationLimit: 100,
  98. ChatScroll: true,
  99. NotificationScroll: true,
  100. NoGreet: false,
  101. Featured: true,
  102. Bot: true,
  103. AutoKick: false,
  104. AutoBan: false,
  105. GreetMode: false,
  106. PerformanceMode: false,
  107. CanTTS: false,
  108. VoteSystem: false,
  109. Popups: true,
  110. Avatar: true,
  111. Reminder: true,
  112. CanSeeGames: true,
  113. CanHostGames: false,
  114. imgur: true,
  115. Notification: true,
  116. UserYT: true,
  117. ThemeChange: true,
  118. SoundMeterToggle: true,
  119. TimeStampToggle: true,
  120. AutoMicrophone: false,
  121. GreenRoomToggle: true,
  122. PublicCommandToggle: true,
  123. Game: {
  124. NoReset: false,
  125. Fish: {
  126. HighScore: ["CosmosisT", 13337],
  127. StartTimeout: undefined,
  128. RestockTimeout: undefined,
  129. ReCastTimeout: undefined,
  130. NotEnoughTimeout: undefined,
  131. Round: 0,
  132. Player: [],
  133. TypesOfFish: [
  134. ["frog", 1, true],
  135. ["sunfish", 2, true],
  136. ["goldfish", 3, true],
  137. ["fish swollowed hook", 4, false],
  138. ["family of sardine", 5, true],
  139. ["catfish", 6, true],
  140. ["spotted bass", 7, true],
  141. ["largemouth bass", 8, true],
  142. ["family of shrimp", 9, true],
  143. ["it pays to not drink,\ncrazy night however!", 10, false],
  144. ["cisco", 11, true],
  145. ["seaweed, still edible", 12, true],
  146. ["snagged a tire and lost rod", 13, false],
  147. ["snagged a tire and lost hook", 14, false],
  148. ["lost their rod to a shark", 15, false],
  149. ["rainbow trout", 16, true],
  150. ["It's your turn for dinner", 80, false],
  151. ["parrot fish", 17, true],
  152. ["snagged a plastic bag,\n their hook is gone", 18, false],
  153. ["walleye", 19, true],
  154. ["Round Whitefish", 20, true],
  155. ["family of clams", 21, true],
  156. ["family of oyster", 22, true],
  157. ["Round blackfish", 23, true],
  158. ["dolphin", 24, true],
  159. ["seagull,\n not a fish but will do", 25, true],
  160. ["pufferfish", 26, true],
  161. ["fined for smuggling\nmore than fish", 27, false],
  162. ["lobster", 28, true],
  163. ["tuna", 29, true],
  164. ["electric eel", 30, true],
  165. ["Eel electricuted you,\nrod is toast", 31, false],
  166. ["swordfish", 32, true],
  167. ["had bills at home to pay", 33, false],
  168. ["slipped and lost equipment", 34, false],
  169. ["bike, still good too", 35, true],
  170. ["great white", 36, true],
  171. ["octopus", 37, true],
  172. ["serpeant", 38, true],
  173. ["sea turtle", 39, true],
  174. ["cleaned garbage from the lake", 40, true],
  175. ["fined for capturing,\n a female whale", 41, false],
  176. ["male whale", 42, true],
  177. ["barracuda", 43, true],
  178. ["pike", 44, true],
  179. ["lochiness monster", 45, true],
  180. ["anglerfish", 46, true],
  181. ["small treasure chest", 47, true],
  182. ["golden tuna", 48, true],
  183. ["family of beautiful rims", 49, true],
  184. ["red snapper", 50, true],
  185. ["jaws", 51, true],
  186. ["mermaid", 52, true],
  187. ["holy grail,\nhow'd that get there?", 75, true],
  188. ["secret formula", 100, true]
  189. ]
  190. }
  191. },
  192. TTS: {
  193. synth: undefined,
  194. voices: undefined
  195. },
  196. hasGreetedWC: false,
  197. Host: 0,
  198. HostAttempt: 0,
  199. HostWaiting: false,
  200. WaitToVoteList: [],
  201. UserList: [],
  202. MentionList: [],
  203. TempIgnoreList: [],
  204. IgnoreList: [],
  205. UserBanList: [],
  206. NickBanList: [],
  207. UserKickList: [],
  208. NickKickList: [],
  209. BotOPList: [],
  210. BotModList: [],
  211. TTSList: [],
  212. BanKeywordList: [],
  213. KickKeywordList: [],
  214. HighlightList: [],
  215. GreetList: [],
  216. ReminderList: [],
  217. ReminderServerInList: [],
  218. Favorited: [],
  219. SafeList: [],
  220. GreenRoomIgnoreList: [],
  221. GreenRoomList: [],
  222. WatchList: [],
  223. KBQueue: [],
  224. MessageCallback: [],
  225. Message: [
  226. []
  227. ],
  228. LastMessage: new Date(),
  229. ShowedSettings: false,
  230. SendQueue: [],
  231. MissedMsg: 0,
  232. ActiveMessage: 0,
  233. Camera: {
  234. List: [],
  235. Sweep: false,
  236. SweepTimer: 5,
  237. clearRandom: undefined
  238. },
  239. NotificationTimeOut: [],
  240. };
  241. //API_KEY SAVE (PLEASE ENTER YOUR KEY ABOVE NOT HERE)
  242. if (CTS.YouTube.API_KEY !== "") Save("YouTubeAPI", CTS.YouTube.API_KEY);
  243. //CTS SETTINGS
  244. CTS.Game.Fish.HighScore = JSON.parse(Load("FishHighScore", JSON.stringify(["CosmosisT", 13337])));
  245. CTS.PublicCommandToggle = JSON.parse(Load("PublicCommandToggle", JSON.stringify(true)));
  246. CTS.OGStyle.SavedHeight = JSON.parse(Load("OGStyleHeight", JSON.stringify(3)));
  247. CTS.GreenRoomIgnoreList = JSON.parse(Load("GreenRoomIgnoreList", JSON.stringify([])));
  248. CTS.CameraBorderToggle = JSON.parse(Load("CameraBorderToggle", JSON.stringify(true)));
  249. CTS.OGStyle.SavedWidth = JSON.parse(Load("OGStyleWidth", JSON.stringify(1)));
  250. CTS.NotificationToggle = JSON.parse(Load("NotificationToggle", JSON.stringify(0)));
  251. CTS.ChatStyleCounter = JSON.parse(Load("ChatStyle", JSON.stringify(0)));
  252. CTS.SoundMeterToggle = JSON.parse(Load("SoundMeterToggle", JSON.stringify(true)));
  253. CTS.KickKeywordList = JSON.parse(Load("KickKeywordList", JSON.stringify([])));
  254. CTS.PerformanceMode = JSON.parse(Load("PerformanceMode", JSON.stringify(false)));
  255. CTS.TimeStampToggle = JSON.parse(Load("TimeStampToggle", JSON.stringify(true)));
  256. //API_KEY SAVE (PLEASE ENTER YOUR KEY ABOVE NOT HERE)
  257. CTS.YouTube.API_KEY = Load("YouTubeAPI", "");
  258. CTS.GreenRoomToggle = JSON.parse(Load("GreenRoomToggle", JSON.stringify(true)));
  259. CTS.BanKeywordList = JSON.parse(Load("BanKeywordList", JSON.stringify([])));
  260. CTS.MainBackground = Load("MainBackground", "url(https://i.imgur.com/RC3bKe7.jpg) rgb(0, 0, 0) no-repeat");
  261. CTS.GreenRoomList = JSON.parse(Load("GreenRoomList", JSON.stringify([])));
  262. CTS.HighlightList = JSON.parse(Load("HighlightList", JSON.stringify([])));
  263. CTS.CanHostGames = JSON.parse(Load("CanHostGames", JSON.stringify(false)));
  264. CTS.ReminderList = JSON.parse(Load("ReminderList", JSON.stringify([])));
  265. CTS.UserKickList = JSON.parse(Load("UserKickList", JSON.stringify([])));
  266. CTS.NickKickList = JSON.parse(Load("NickKickList", JSON.stringify([])));
  267. CTS.UserBanList = JSON.parse(Load("UserBanList", JSON.stringify([])));
  268. CTS.NickBanList = JSON.parse(Load("NickBanList", JSON.stringify([])));
  269. CTS.MentionList = JSON.parse(Load("MentionList", JSON.stringify([])));
  270. CTS.CanSeeGames = JSON.parse(Load("CanSeeGames", JSON.stringify(true)));
  271. CTS.ThemeChange = JSON.parse(Load("ThemeChange", JSON.stringify(true)));
  272. CTS.BotModList = JSON.parse(Load("BotModList", JSON.stringify([])));
  273. CTS.IgnoreList = JSON.parse(Load("IgnoreList", JSON.stringify([])));
  274. CTS.Favorited = JSON.parse(Load("Favorited", JSON.stringify([
  275. ["stonercircle", "https://avatars.tinychat.com/da/838b96/5f/medium/phpKXAdEn.jpeg"], null, null, null, null
  276. ])));
  277. CTS.GreetList = JSON.parse(Load("GreetList", JSON.stringify([])));
  278. CTS.BotOPList = JSON.parse(Load("BotOPList", JSON.stringify(["-ALL"])));
  279. CTS.GreetMode = JSON.parse(Load("GreetMode", JSON.stringify(false)));
  280. CTS.FontSize = JSON.parse(Load("FontSize", JSON.stringify(20)));
  281. CTS.SafeList = JSON.parse(Load("AKB", JSON.stringify([])));
  282. CTS.Featured = JSON.parse(Load("Featured", JSON.stringify(false)));
  283. CTS.Reminder = JSON.parse(Load("Reminder", JSON.stringify(true)));
  284. CTS.TTSList = JSON.parse(Load("TTSList", JSON.stringify([])));
  285. CTS.UserYT = JSON.parse(Load("UserYT", JSON.stringify(true)));
  286. CTS.Popups = JSON.parse(Load("Popups", JSON.stringify(true)));
  287. CTS.Avatar = JSON.parse(Load("Avatar", JSON.stringify(true)));
  288. CTS.imgur = JSON.parse(Load("imgur", JSON.stringify(true)));
  289. CTS.Bot = JSON.parse(Load("Bot", JSON.stringify(true)));
  290. //IS USER TOUCHSCREEN
  291. CheckUserTouchScreen();
  292.  
  293. if (CTS.ThemeChange) {
  294. FeaturedCSS = "#videos.column>.videos-items{background:#0000003b;height:20%}#videos.column>.videos-items+.videos-items{background:none;height:80%}#videos.row>.videos-items{background:#0000003b;width:20%}#videos.row>.videos-items+.videos-items{background:none;width:80%}#videos.row.featured-2>.videos-items{width:20%}#videos.row.featured-2>.videos-items+.videos-items{width:80%}#videos.column.featured-2>.videos-items{height:20%}#videos.column.featured-2>.videos-items+.videos-items{height:80%}#videos.row.featured-3>.videos-items{width:20%}#videos.row.featured-3>.videos-items+.videos-items{width:80%}#videos.column.featured-3>.videos-items{height:20%}#videos.column.featured-3>.videos-items+.videos-items{height:80%}";
  295. ChatListCSS = "#chatlist{background:#00000075;}.list-item>span>img{top:6px;}.list-item>span.active>span{transition:none;box-shadow:none;background:transparent;visibility:hidden;}.list-item>span>span{top:-4px;background:transparent;box-shadow:none;}.list-item>span>span[data-messages]:before{background:#53b6ef;}.list-item>span[data-status=\"gold\"]:before,.list-item>span[data-status=\"extreme\"]:before,.list-item>span[data-status=\"pro\"]:before{top:5px;}#chatlist>#header>.list-item>span.active{background:#53b6ef;}#chatlist>#header{height:60px;top:30px}#chatlist>div>span{font-weight: 600;border-radius:unset;color:#FFFFFF;height:22px;line-height:22px;}#chatlist>div{height:22px;line-height:22px;}";
  296. ChatboxCSS = "#chat-download:hover{cursor: pointer;-webkit-box-shadow: inset 0 0 20px #53b6ef;box-shadow: inset 0 0 20px 0 #53b6ef;}#chat-download{position: absolute;right: 0;height: 22px;width: 22px;background: url(\"https://i.imgur.com/Bb3fr6Q.png\") center;background-size: 22px;}#chatlog-button{display:none!important;}@media screen and (max-width: 1200px){#chat-hide{top: -39px!important;left: -1px!important;width: 100%!important;border-radius: 0!important;}}#chat-hide{top: calc(50% - 18px);position: absolute;display: block;height: 16px;width: 16px;left: -8px;margin-top: -20px;border-radius: 16px;font-size: 0;background:url(https://i.imgur.com/jFSLyDD.png) #000000 center no-repeat;background-size:16px;cursor: pointer;z-index: 1;-webkit-box-shadow: 0 0 6px #53b6ef;box-shadow: 0 0 6px #53b6ef;}#chat-instant.show{background:linear-gradient(0deg,rgb(0, 19, 29)0%,rgba(0, 0, 0, 0.85)50%,rgb(25, 29, 32)100%)!important;}#chat-wider:before{transition:.3s;margin: -4px 0 0 -4px;border-width: 6px 6px 6px 0;border-color: transparent #ffffff!important;}#chat-wider{-webkit-box-shadow: 0 0 6px #53b6ef;box-shadow: 0 0 6px #53b6ef;z-index: 2;background:#000000!important}#chat-wrapper{transition:none;}#fav-opt{display: inline-block;cursor: pointer;padding: 12px;background: #10131494;}#input-user:checked ~ #user-menu{display:inline-block;}#user-menu > a:hover #user-menu > span > a:hover{color: #FFFFFF}#user-menu > a, #user-menu > span > a {font-weight: 600;position: relative;display: inline-block;width:calc(100% - 30px);padding: 6px;box-sizing: border-box;font-size: 18px;color: #53b6ef;cursor: pointer;transition: .2s;}#user-menu {position: absolute;display: none;bottom: 50px;right: 0;border: 1px solid rgba(0, 0, 0, .06);box-sizing: border-box;border-radius: 3px;color: #FFFFFF;background: #101314;line-height: 1;box-shadow: 0 1px 4px 0 rgba(0, 0, 0, .09);z-index: 1;}#user-menu > span {display: inline-block;width: 100%;padding: 12px;box-sizing: border-box;font-size: 16px;font-weight: 500;white-space: nowrap;text-overflow: ellipsis;cursor: default;overflow: hidden;}#label-user > img {position: absolute;height: 100%;left: -8px;vertical-align: top;}#label-user{position: relative;display: inline-block;height: 48px;width: 48px;border-radius: 100%;overflow: hidden;cursor: pointer;}#header-user{text-shadow:-1px 0 black,0 1px black,1px 0 black,0 -1px black;position: absolute;top: 10px;right: 0;}#chat-wrapper.full-screen #chat-instant, #chatf-wrapper.full-screen #chat-instant>.avatar>.status-icon,#chat-wrapper.full-screen #chat-content>.message>.avatar>.status-icon {background:unset;}.cts-message-unread{display:block;border-radius:6px;padding:1px 6px 1px 6px;background:#53b6ef;text-shadow:-1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;color:#FFF;font:bold 16px sans-serif;cursor:pointer}.ctstime{position:absolute;right:3px;top:3px;background: #101314;border: 1px solid black;border-radius: 6px;padding: 1px 6px;}#chat-instant>.avatar>div>img,#cts-chat-content>.message>.avatar>div>img{position:relative;height:100%;left:-7px}.message>#system_user{background:linear-gradient(0deg,rgb(0, 19, 29)0%,rgba(0, 0, 0, 0.85)50%,rgba(0, 0, 0, 0.72)100%);border: 1px solid black;border-radius: 6px;padding: 1px 6px 1px 6px;word-wrap: break-word;font-weight: 600;font-size: 16px;color: #FFF;text-decoration: none;overflow: hidden;text-overflow: ellipsis;}.gift>a{background:black;}.gift{border-radius:12px;background: #0165d0;-webkit-box-shadow: inset 0 0 5em 5px #000;box-shadow: inset 0 0 5em 5px #000;}.message{color:#FFF;text-shadow:-1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;font-family:sans-serif;font-weight:300;font-size:20px;white-space:pre-line;word-wrap:break-word}.message a, .message a:visited, .message a:hover, .message a:active{position:relative;transition:0.5s color ease;text-decoration:none;color:#53b6ef}.message a:hover{text-decoration:underline;}#chat{will-change: transform;min-height:unset;}#cts-chat-content{display:flex;flex-direction:column;justify-content:flex-end;min-height:100%}#cts-chat-content>.message{padding:3px 3px;background:#101314a8;position:relative;left:0;margin-bottom:3px;border-radius:6px}#cts-chat-content>.message.highlight,.message.common.highlight{background:#e24c05;-webkit-box-shadow: inset 0 0 20px #000000;box-shadow: inset 0 0 20px 0 #000000;}#cts-chat-content>.message.common{min-height: 50px;padding:3px 3px 3px 50px;box-sizing:border-box;text-align:left}#chat-instant>.avatar,#cts-chat-content>.message>.avatar{position:absolute;height:40px;width:40px;top:3px;left:3px;-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1);pointer-events:none;}#chat-instant>.avatar>div,#cts-chat-content>.message>.avatar>div{position:absolute;height:100%;width:100%;top:0;left:0;border-radius:100%;overflow:hidden}#notification-content .nickname{border-radius:6px;padding:1px 6px 1px 6px}.notification{padding:1px 0 1px 0;text-shadow:-1px 0 black, 0 1px black, 1px 0 black, 0 -1px black}.time{position:absolute;right:5px}.notifbtn:hover{background:linear-gradient(0deg,rgb(0, 135, 186)0%,rgba(0, 49, 64, 0.94)75%,rgba(0, 172, 255, 0.6)100%);}.notifbtn{cursor: pointer;border-radius: 0 0 12px 12px;outline: none;background:linear-gradient(0deg,rgba(0, 0, 0, 0)0%,rgba(37, 37, 37, 0.32)75%,rgba(255, 255, 255, 0.6)100%);border: none;color: white;width: 100%;}#notification-content.large{height:50%;}#notification-content{will-change: transform;top:0;position:relative;scrollbar-width:none;background:#101314;text-shadow:-1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;height:20%;min-height:38px;font:bold 16px sans-serif;color:#FFF;overflow-y:scroll;overflow-wrap:break-word;padding:0 6px 0 6px}#notification-content::-webkit-scrollbar{width:0;background:transparent}#cts-chat-content{display:flex;flex-direction:column;justify-content:flex-end;min-height:100%}#chat-instant>.avatar>.status-icon,#cts-chat-content>.message>.avatar>.status-icon{left:0!important}#chat-instant>.nickname{color:#53b6ef;text-shadow:-1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;font-size: 20px;font-weight: 800;} nm#chat-instant::after{background:none;}.on-white-scroll{scrollbar-width: none;overflow-wrap: break-word;}.on-white-scroll::-webkit-scrollbar{width:0;background:transparent}#cts-chat-content>.message>.nickname{border:1px solid black;border-radius:6px;padding:1px 6px 1px 6px;word-wrap:break-word;max-width:calc(100% - 115px);font-weight:600;font-size:16px;color:#FFF;display:inline-block;text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#input{padding-top:0}:host,#input>.waiting{background:#20262870}#input:before,#input:after{content:unset}#input>textarea::placeholder{color:#FFF}#input>textarea::-webkit-input-placeholder{color:#fff}#input>textarea:-moz-placeholder{color:#fff}#input>textarea{width: calc(100% - 57px);line-height:unset;min-height:65px;max-height:65px;border-radius:6px;scrollbar-width:none;background:#101314;text-shadow:-1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;color:#FFF;font-size:" + (CTS.FontSize - 4) + "px;font-family:sans-serif;font-weight:300;}#chat-position{top:22px;left:6px;right:6px;bottom:5px;}.on-white-scroll::webkit-scrollbar{width:0;background:transparent;}";
  297. MainCSS = "#mobile-app.show{display:none;}html{background:rgba(0,0,0,1);}#menu-icon{display:none;}body{background:" + CTS.MainBackground + ";background-position: center!important;background-size:cover!important;overflow:hidden;}#nav-static-wrapper {display:none;}#content{padding:0!important;}";
  298. VideoCSS = "@media screen and (max-width: 600px){#videos-header{position: unset;height: unset;width: unset;top: unset;bottom: unset;padding: 0 2px 10px 15px;box-sizing: border-box;}}#videos-footer-broadcast-wrapper > #videos-footer-submenu-button{height:unset;}#videolist[data-mode=\"dark\"]{background-color:unset;}@media screen and (max-width: 1200px){#videos-footer{right: unset!important;bottom: -22px!important;top: unset!important;}}#videos-footer-broadcast-wrapper{margin-top:16px;}#youtube.video > div > .overlay, .video > div > .overlay{display:block!important}.tcsettings{display:none}#videos-header{background:#101314;}#videos-footer-broadcast-wrapper.active>#videos-footer-broadcast,#videos-footer-broadcast-wrapper.active>#videos-footer-submenu-button,#videos-footer-broadcast-wrapper.active>#videos-footer-submenu-button:focus{background-color:#2d373a!important;}.js-video.broken{display:none;}.videos-header-volume {border-color:#202627;}.tcsettings:hover{background:#008cda;}.tcsettings{cursor: pointer;outline: none;background:#101314;border: none;color: white;}.music-radio-info>.description{cursor:default;overflow-wrap: break-word;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;}.music-radio-info>.volume{bottom: 0;position: absolute;background: #2a6a89;height: 6px;width: 100%;line-height: 24px;overflow-wrap: break-word;white-space: nowrap;overflow: hidden;text-overflow: ellipsis}.music-radio-info{top: -50px;position: absolute;background: #071c19f0;height: 50px;width: 336px;line-height: 24px;}.ctsdrop{position:fixed;display:inline-block;top:3px;left:4px;z-index:5;min-width: 46px;}.ctsdrop-content{position:absolute;top:28px;right:0;background:#101314;min-width:46px;width: 46px;padding:0;z-index:1;display:none;}.ctsdrop:hover .ctsdrop-content{display:block;}.ctsoptions:hover{background:#53b6ef}.ctsoptions{width:46px;height:28px;z-index: 2;cursor: pointer;top: 4px;background: #10131475;border: none;padding: 5% 0;display: inline-block;}#youtube{padding: unset}#grab{left: 0;background:#2d373a;border-radius: 12px;visibility: hidden;top: -36px;position: absolute;display: flex}#videos-footer #music-radio .music-radio-playpause{position:absolute;top:0;left:30px;height:100%;width:60px;}#videos-footer #music-radio .music-radio-vol{position: absolute;right: 0;top: 0;}#videos-footer #music-radio button{line-height: 14px;background: #101314;border: none;font-size: 18px;color: white;height: 50%;display: block;width: 30px;}#videos-footer #videos-footer-youtube{left: 120px;border-radius: 0;display:none;}#videos-footer #videos-footer-soundcloud{display:none;border-radius: 0;left: 240px}#videos-footer #videos-footer-youtube,#videos-footer #videos-footer-soundcloud,#videos-footer #music-radio{transition: .2s;line-height: 33px;bottom: -64px;visibility: hidden;height: 36px;margin: unset;width: 120px;position: absolute;z-index: 1;}#videos-footer-push-to-talk{border-radius: unset}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button{border-radius: unset;}#videos-footer-broadcast-wrapper.moderation>#videos-footer-broadcast{padding: unset}#videos-footer #music-radio button:hover{background: #53b6ef;cursor: pointer;}#videos-footer #music-radio{left: 0;border-radius: 12px;background: #101314;}#videos-footer:hover #videos-footer-youtube,#videos-footer:hover #videos-footer-soundcloud,#videos-footer:hover #music-radio{visibility: visible}#videos-footer:hover{background:linear-gradient(0deg,rgba(255, 255, 255, 0)0%,rgba(24, 60, 62, 0.29)50%,rgb(83, 182, 239)100%);}#videos-footer{background: linear-gradient(0deg,rgba(255, 255, 255, 0)0%,rgba(24, 60, 62, 0.29)50%,rgba(200, 200, 200, 0.26)100%);cursor:pointer;top:0;display:block;padding: 2px 0 0 11px;text-shadow: -1px 0 black,0 1px black,1px 0 black,0 -1px black;font: 800 14px sans-serif;color: #FFFFFF;left: unset;right: -70px;height: 22px;min-height: 22px;z-index: 2;width: 70px;position: absolute}#videos-footer-broadcast{height:unset;border-radius:unset;z-index: 1;padding: unset!important;white-space: pre}span[title=\"Settings\"]>svg{padding:4px;height:24px;width:24px}#seek-duration{pointer-events: none;text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;font: 600 20px sans-serif}#videos{bottom: 0;left: 0;right: 0;top: 0}:host,#videolist{background:unset!important;}.video:after{content: unset;border:unset;}#videos-header-mic>svg{padding: 2px 10px;}#videos-header>span{display:block;}#videos-header-sound>svg{padding: 4px}#videos-header-fullscreen > svg {padding: 7px 8px;}";
  299. RoomCSS = "tc-title{display:flex!important;}#room-content{padding-top:0!important;background:unset!important;}";
  300. TitleCSS = "#room-header-avatar{display:none}#room-header-gifts{display:none}#room-header-info-text{display:none}#room-header-info-details{display:none}#room-header-mobile-button{display:none}#room-header{display:none;}";
  301. SideMenuCSS = "#sidemenu{left:0;}@media screen and (max-width: 1000px){#sidemenu{left:-270px;}}#sidemenu.full-screen{left:-270px;}#user-info{display:none;}#top-buttons-wrapper{display:none;}#sidemenu-content{scrollbar-width:none;padding-top:unset;}#sidemenu-wider:before{margin: -4px 0 0 -4px;border-width: 6px 6px 6px 0;border-color: transparent #ffffff;}#sidemenu-wider{-webkit-box-shadow: 0 0 6px #53b6ef;box-shadow: 0 0 6px #53b6ef;z-index: 2;display:block;background-color: #000000;}#sidemenu-content::-webkit-scrollbar{display: none;}#sidemenu.wider {left: -270px;}";
  302. NotificationCSS = "#videos-header > span {background-color: unset!important;line-height: unset;}.PMTime{display:inline-block;padding:0 6px 0 0;margin:0 8px 0 0;border-right:4px groove #797979;}.PMName{display:inline-block;}#popup div{word-break: break-word;white-space: pre-line;word-wrap: break-word;user-select: text;-webkit-user-select: text;-moz-user-select: text;color:#FFFFFF;text-shadow:-1px 0 black,0 1px black,1px 0 black,0 -1px black;font-weight: 300;font-size: 18px;font-family: sans-serif;z-index:1;}.PMOverlay{height: calc(100% - 92px);overflow: hidden;pointer-events:none;position:absolute;padding-top:12px;top:0;bottom:0;left:0;right:0;visibility:visible;}.PMPopup{pointer-events:all;margin:5px auto;width:50%;position:relative;color: #FFF;text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;}.PMPopup a, .PMPopup a:visited, .PMPopup a:hover, .PMPopup a:active{position:relative;transition:0.5s color ease;text-decoration:none;color:#53b6ef}.PMPopup a:hover{color:#FFFFFF;text-decoration:underline;}.PMPopup h2{border-radius:5px 5px 0 0;background:linear-gradient(0deg,rgb(24, 29, 30) 0%,rgb(24, 29, 30) 52%,rgb(60, 117, 148) 100%);margin:0;padding:5px;font-size:16px;}.PMPopup .PMContent {border-radius: 0 0 5px 5px;padding:5px;max-height:30%;overflow:hidden;word-break:break-all;background:#202628;}";
  303. UserListCSS = ".list-item>span>span{padding: 0 8px;top:-2px}.list-item > span:hover > span{background-color:unset;box-shadow:unset;}#userlist{background: #00000075;}.js-user-list-item{background: linear-gradient(0deg,rgb(0, 0, 0) 2px,rgba(0, 0, 0, 0.25) 2px,rgba(0, 0, 0, 0.59) 32%);}.list-item>span>span[data-cam=\"1\"]:after{height:15px;width:15px;background-image:url(https://i.imgur.com/QKSbq8d.png);}.list-item>span>span[data-moderator=\"1\"]:before{margin-right:3px;width:15px;height:15px;background-image:url(https://i.imgur.com/CEA9aro.png);}.list-item>span>span{background:transparent;box-shadow:none;}.list-item>span>span>.send-gift{top:5px;}.list-item>span>img{top:6px;}#button-banlist{border-radius:unset;top:-1px;right:10px;}.list-item>span[data-status=\"gold\"]:before,.list-item>span[data-status=\"extreme\"]:before,.list-item>span[data-status=\"pro\"]:before{top:5px;}#userlist>div{height:22px;}#userlist>div>span{font-weight: 600;color:#FFFFFF;height:22px;line-height:22px;}#userlist>#header{height:40px;top:10px;}";
  304. ModeratorCSS = ".video{min-width: 114px;max-width: 114px;}#moderatorlist:after{right:5px;color:#FFFFFF;background:#53b6ef;}#moderatorlist>#header>span>button>svg path{fill:#FFFFFF;}#moderatorlist>#header>span>button{top:-2px;background: #20262870;}#moderatorlist.show>#header>span>button>svg path{fill:#FFFFFF;}#moderatorlist{max-height:60px;background: #00000075;}#moderatorlist>#header{height:60px;font-size:16px;font-weight:600;font-family:sans-serif;color:#FFFFFF;text-shadow:-1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;}#moderatorlist.show[data-videos-count=\"1\"], #moderatorlist.show[data-videos-count=\"2\"] {max-height:205px;}#moderatorlist.show[data-videos-count=\"3\"], #moderatorlist.show[data-videos-count=\"4\"] {max-height:290px;}#moderatorlist.show[data-videos-count=\"5\"], #moderatorlist.show[data-videos-count=\"6\"] {max-height:400px;}#moderatorlist.show[data-videos-count=\"7\"], #moderatorlist.show[data-videos-count=\"8\"] {max-height:460px;}#moderatorlist.show[data-videos-count=\"9\"], #moderatorlist.show[data-videos-count=\"10\"] {max-height:545px;}#moderatorlist.show[data-videos-count=\"11\"], #moderatorlist.show[data-videos-count=\"12\"] {max-height:630px;}";
  305. } else {
  306. //OG CTS
  307. FeaturedCSS = "#videos.column>.videos-items{background:#0000003b;height:20%}#videos.column>.videos-items+.videos-items{background:none;height:80%}#videos.row>.videos-items{background:#0000003b;width:20%}#videos.row>.videos-items+.videos-items{background:none;width:80%}#videos.row.featured-2>.videos-items{width:20%}#videos.row.featured-2>.videos-items+.videos-items{width:80%}#videos.column.featured-2>.videos-items{height:20%}#videos.column.featured-2>.videos-items+.videos-items{height:80%}#videos.row.featured-3>.videos-items{width:20%}#videos.row.featured-3>.videos-items+.videos-items{width:80%}#videos.column.featured-3>.videos-items{height:20%}#videos.column.featured-3>.videos-items+.videos-items{height:80%}";
  308. VideoCSS = "#videolist[data-mode=\"dark\"]{background-color:unset;}#youtube.video > div > .overlay, .video > div > .overlay{display:block!important}.js-video.broken{display:none;}#videos-footer-broadcast-wrapper.show-ptt > #videos-footer-submenu{right:0;}#videos-footer-submenu{width: calc(100% - 14px);right:0;bottom:-2px;}.videos-header-volume {border-color:#202627;}.tcsettings:hover{background:#008cda;}.tcsettings{cursor: pointer;outline: none;background:#101314;border: none;color: white;}.music-radio-info>.description{cursor:default;overflow-wrap: break-word;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;}.music-radio-info>.volume{bottom: 0;position: absolute;background: #2a6a89;height: 6px;width: 100%;line-height: 24px;overflow-wrap: break-word;white-space: nowrap;overflow: hidden;text-overflow: ellipsis}.music-radio-info{top: -50px;position: absolute;background: #071c19f0;height: 50px;width: 336px;line-height: 24px;}.ctsdrop{position:fixed;display:inline-block;top:3px;right:4px;z-index:5;min-width: 46px;}.ctsdrop-content{position:absolute;top:28px;right:0;background:#101314;min-width:46px;width: 46px;padding:0;z-index:1;display:none;}.ctsdrop:hover .ctsdrop-content{display:block;}.ctsoptions:hover{background:#53b6ef}.ctsoptions{width:46px;height:28px;z-index: 2;cursor: pointer;top: 4px;background: #101314;border: none;padding: 5% 0;display: inline-block;}#youtube{padding: unset}#grab{left: 0;background:#2d373a;border-radius: 12px;visibility: hidden;top: -36px;position: absolute;display: flex}#videos-footer-broadcast-wrapper>.video{position: fixed;display: none;width: 5%;top: 0;left: 0}#videos-footer-broadcast-wrapper.active>#videos-footer-submenu-button:hover{background: #1f2223!important}#videos-footer-broadcast-wrapper.active>#videos-footer-submenu-button{background: #2d373a!important}#videos-footer #music-radio .music-radio-playpause{position:absolute;top:0;left:30px;height:100%;width:60px;}#videos-footer #music-radio .music-radio-vol{position: absolute;right: 0;top: 0;}#videos-footer #music-radio button{line-height: 14px;background: #101314;border: none;font-size: 18px;color: white;height: 50%;display: block;width: 30px;}#videos-footer #videos-footer-youtube{left: 120px;border-radius: 0;display:none;}#videos-footer #videos-footer-soundcloud{display:none;border-radius: 0;left: 240px}#videos-footer #videos-footer-youtube,#videos-footer #videos-footer-soundcloud,#videos-footer #music-radio{transition: .2s;line-height: 33px;bottom: 21px;visibility: hidden;height: 36px;margin: unset;width: 120px;position: absolute;z-index: 1;}#videos-footer-push-to-talk{border-radius: unset}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button{border-radius: unset;}#videos-footer-broadcast-wrapper.moderation>#videos-footer-broadcast{padding: unset}#videos-footer #music-radio button:hover{background: #53b6ef;cursor: pointer;}#videos-footer #music-radio{left: 0;border-radius: 12px;background: #101314;}#videos-footer:hover #videos-footer-youtube,#videos-footer:hover #videos-footer-soundcloud,#videos-footer:hover #music-radio{visibility: visible}#videos-footer:hover{background:linear-gradient(0deg,rgba(255, 255, 255, 0)0%,rgba(24, 60, 62, 0.29)50%,rgb(83, 182, 239)100%);}#videos-footer{background: linear-gradient(0deg,rgba(255, 255, 255, 0)0%,rgba(24, 60, 62, 0.29)50%,rgba(200, 200, 200, 0.26)100%);cursor:pointer;top: calc(30% + 119px);display:block;padding: 2px 0 0 11px;text-shadow: -1px 0 black,0 1px black,1px 0 black,0 -1px black;font: 800 14px sans-serif;color: #FFFFFF;left: unset;right: -70px;height: 22px;min-height: 22px;z-index: 2;width: 70px;position: absolute}#videos-footer-broadcast{border-radius:unset;z-index: 1;padding: unset!important;white-space: pre}#videos-footer-broadcast-wrapper{z-index: 0;visibility: visible;height: 50px;min-height: 50px;width: 400px;padding: unset;right: 0;left: unset;position: fixed;top: calc(30% + 34px)}span[title=\"Settings\"]>svg{padding:4px;height:24px;width:24px}#seek-duration{pointer-events: none;text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;font: 600 20px sans-serif}#videos{bottom: 0;left: 0;right: 0;top: 0}:host,#videolist{background:unset!important;}.video:after{content: unset;border:unset;}#videos-header-mic>svg{padding: 2px 10px;}#videos-header{z-index: 3;background:#101314;transition: none;left: unset;right: 0;width: 400px;top: calc(30%);position: fixed;max-height: 34px;min-height: 34px;}#videos-header>span{display:block;line-height: unset;}#videos-header-sound>svg{padding: 4px}#videos-header-fullscreen > svg {padding: 7px 8px;}";
  309. SideMenuCSS = "#close-users{display:none!important;}#user-info{display:none;}#top-buttons-wrapper{display:none;}@media screen and (max-width: 600px) {#sidemenu {top:unset;z-index:2;padding-bottom:0;margin-top:0;}}#sidemenu-wider{display:none;}#sidemenu-content::-webkit-scrollbar{width:0;background:transparent;}#sidemenu{text-shadow:-1px 0 black,0 1px black,1px 0 black,0 -1px black;font:300 20px sans-serif;left:unset!important;right:0!important;padding-bottom:0;height:30%!important;min-width:400px;max-width:400px;}#sidemenu-content{scrollbar-width:none;padding-top:unset;}";
  310. MainCSS = "#mobile-app.show{display:none;}html{background:rgba(0,0,0,1);}#users-icon{display:none;}#menu-icon{display:none;}body{background:" + CTS.MainBackground + ";background-position: center!important;background-size:cover!important;overflow:hidden;}#content{width:calc(100% - 400px);padding:0!important;}#nav-static-wrapper, #nav-fixed-wrapper{display:none;}";
  311. RoomCSS = "tc-title{display:flex!important;}#room{padding:0!important;}#room-content{padding-top:0!important;background:unset!important;}";
  312. TitleCSS = "#room-header-avatar{display:none}#room-header-gifts{display:none}#room-header-info-text{display:none}#room-header-info-details{display:none}#room-header-mobile-button{display:none}#room-header{border:unset;z-index:1;min-height:36px!important;max-height:36px!important;min-width:400px;max-width:400px;top:calc(30% + 84px);right:0;position:fixed;background: linear-gradient(0deg,rgb(0, 19, 29)0%,rgba(0, 0, 0, 0.85)50%,rgb(9, 41, 57)100%);}#room-header-info>h1{height:100%;top: unset;left: unset;right: unset;text-transform:uppercase;text-shadow:-1px 0 black,0 1px black,1px 0 black,0 -1px black;font:600 20px sans-serif;color:#FFFFFF;}#room-header-info>h1:after{content:unset;}#room-header-info {padding: 7px 0 0 6px!important;box-sizing: border-box;width: 100%!important;top: 0!important;left: 0!important;right: 0!important;}#room-he#room-header-info>span{right: 8px;position: absolute;top:7px;margin-top:0!important;}";
  313. ContextMenuCSS = ".context.show{height:100%;}.context:after{content:unset;}.context>span{text-shadow:-1px 0 black,0 1px black,1px 0 black,0 -1px black;font:800 14px sans-serif;color:#FFFFFF;display:inline-block;padding:1px 1%;line-height:17px;height:17px;}.context{background:#101314;position:unset;padding:0;height:0;transition:.25s;}";
  314. ModeratorCSS = ".video{min-width: 114px;max-width: 114px;}#moderatorlist:after{right:5px;color:#FFFFFF;background:#53b6ef;}#moderatorlist>#header>span>button>svg path{fill:#FFFFFF;}#moderatorlist>#header>span>button{top:-2px;background: #20262870;}#moderatorlist.show>#header>span>button>svg path{fill:#FFFFFF;}#moderatorlist{max-height:60px;}#moderatorlist>#header{height:60px;font-size:16px;font-weight:600;font-family:sans-serif;color:#FFFFFF;text-shadow:-1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;}#moderatorlist.show[data-videos-count=\"1\"], #moderatorlist.show[data-videos-count=\"2\"] {max-height:205px;}#moderatorlist.show[data-videos-count=\"3\"], #moderatorlist.show[data-videos-count=\"4\"] {max-height:290px;}#moderatorlist.show[data-videos-count=\"5\"], #moderatorlist.show[data-videos-count=\"6\"] {max-height:400px;}#moderatorlist.show[data-videos-count=\"7\"], #moderatorlist.show[data-videos-count=\"8\"] {max-height:460px;}#moderatorlist.show[data-videos-count=\"9\"], #moderatorlist.show[data-videos-count=\"10\"] {max-height:545px;}#moderatorlist.show[data-videos-count=\"11\"], #moderatorlist.show[data-videos-count=\"12\"] {max-height:630px;}";
  315. UserListCSS = "#userlist{padding-bottom:40px;}.list-item>span>span[data-cam=\"1\"]:after{height:15px;width:15px;background-image:url(https://i.imgur.com/QKSbq8d.png);}.list-item>span>span[data-moderator=\"1\"]:before{margin-right:3px;width:15px;height:15px;background-image:url(https://i.imgur.com/CEA9aro.png);}.list-item>span>span{background:transparent;box-shadow:none;}.list-item>span>span>.send-gift{top:4px;}.list-item>span>img{top:6px;}#button-banlist{color:#53b6ef;transition:none;top:calc(30% + 89px);right:3px;position:fixed;}.list-item>span[data-status=\"gold\"]:before,.list-item>span[data-status=\"extreme\"]:before,.list-item>span[data-status=\"pro\"]:before{top:5px;}#userlist>div{height:22px;}#userlist>div>span{color:#FFFFFF;font:bold 16px sans-serif;height:22px;line-height:22px;}#userlist>#header{height:40px;top:10px;}#contextmenu {top:unset!important;bottom:0!important;right:0!important;left:0!important;}";
  316. ChatListCSS = ".list-item>span>img{top:6px;}.list-item>span.active>span{transition:none;box-shadow:none;background:transparent;visibility:hidden;}.list-item>span>span{top:-4px;background:transparent;box-shadow:none;}.list-item>span>span[data-messages]:before{background:#53b6ef;}.list-item>span[data-status=\"gold\"]:before,.list-item>span[data-status=\"extreme\"]:before,.list-item>span[data-status=\"pro\"]:before{top:5px;}#chatlist>#header>.list-item>span.active{background:#53b6ef;}#chatlist>#header{height:60px;top:30px}#chatlist>div>span{color:#FFFFFF;font:bold 16px sans-serif;height:22px;line-height:22px;}#chatlist>div{height:22px;line-height:22px;}";
  317. NotificationCSS = "#videos-header > span {background-color: unset!important;line-height: unset;}.PMTime{display:inline-block;padding:0 6px 0 0;margin:0 8px 0 0;border-right:4px groove #797979;}.PMName{display:inline-block;}#popup div{word-break: break-word;white-space: pre-line;word-wrap: break-word;user-select: text;-webkit-user-select: text;-moz-user-select: text;color:#FFFFFF;text-shadow:-1px 0 black,0 1px black,1px 0 black,0 -1px black;font-weight: 300;font-size: 18px;font-family: sans-serif;z-index:1;}.PMOverlay{height: calc(100% - 92px);overflow: hidden;pointer-events:none;position:absolute;padding-top:12px;top:0;bottom:0;left:0;right:0;visibility:visible;}.PMPopup{pointer-events:all;margin:5px auto;width:50%;position:relative;color: #FFF;text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;}.PMPopup a, .PMPopup a:visited, .PMPopup a:hover, .PMPopup a:active{position:relative;transition:0.5s color ease;text-decoration:none;color:#53b6ef}.PMPopup a:hover{color:#FFFFFF;text-decoration:underline;}.PMPopup h2{border-radius:5px 5px 0 0;background:linear-gradient(0deg,rgb(24, 29, 30) 0%,rgb(24, 29, 30) 52%,rgb(60, 117, 148) 100%);margin:0;padding:5px;font-size:16px;}.PMPopup .PMContent {border-radius: 0 0 5px 5px;padding:5px;max-height:30%;overflow:hidden;word-break:break-all;background:#202628;}";
  318. ChatboxCSS = "#chat-download:hover{cursor: pointer;-webkit-box-shadow: inset 0 0 20px #53b6ef;box-shadow: inset 0 0 20px 0 #53b6ef;}#chat-download{position: absolute;right: 0;height: 22px;width: 22px;background: url(\"https://i.imgur.com/Bb3fr6Q.png\") center;background-size: 22px;}#chatlog-button{display:none!important;}#chat-instant.show{background:linear-gradient(0deg,rgb(0, 19, 29)0%,rgba(0, 0, 0, 0.85)50%,rgb(25, 29, 32)100%)!important;}#chat-wider{display:none;}#fav-opt{display: inline-block;cursor: pointer;padding: 12px;background: #10131494;}#input-user:checked ~ #user-menu{display:inline-block;}#user-menu > a:hover #user-menu > span > a:hover{color: #FFFFFF}#user-menu > a, #user-menu > span > a {font-weight: 600;position: relative;display: inline-block;width:calc(100% - 30px);padding: 6px;box-sizing: border-box;font-size: 18px;color: #53b6ef;cursor: pointer;transition: .2s;}#user-menu {position: absolute;display: none;bottom: 50px;right: 0;border: 1px solid rgba(0, 0, 0, .06);box-sizing: border-box;border-radius: 3px;color: #FFFFFF;background: #101314;line-height: 1;box-shadow: 0 1px 4px 0 rgba(0, 0, 0, .09);z-index: 1;}#user-menu > span {display: inline-block;width: 100%;padding: 12px;box-sizing: border-box;font-size: 16px;font-weight: 500;white-space: nowrap;text-overflow: ellipsis;cursor: default;overflow: hidden;}#label-user > img {position: absolute;height: 100%;left: -8px;vertical-align: top;}#label-user{position: relative;display: inline-block;height: 48px;width: 48px;border-radius: 100%;overflow: hidden;cursor: pointer;}#header-user{text-shadow:-1px 0 black,0 1px black,1px 0 black,0 -1px black;position: absolute;top: 10px;right: 0;}#chat-wrapper.full-screen #chat-instant, #chatf-wrapper.full-screen #chat-instant>.avatar>.status-icon,#chat-wrapper.full-screen #chat-content>.message>.avatar>.status-icon {background:unset;}.cts-message-unread{display:block;border-radius:6px;padding:1px 6px 1px 6px;background:#53b6ef;text-shadow:-1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;color:#FFF;font:bold 16px sans-serif;cursor:pointer}.ctstime{position:absolute;right:3px;top:3px;background: #101314;border: 1px solid black;border-radius: 6px;padding: 1px 6px;}#chat-instant>.avatar>div>img,#cts-chat-content>.message>.avatar>div>img{position:relative;height:100%;left:-7px}.message>#system_user{background:linear-gradient(0deg,rgb(0, 19, 29)0%,rgba(0, 0, 0, 0.85)50%,rgba(0, 0, 0, 0.72)100%);border: 1px solid black;border-radius: 6px;padding: 1px 6px 1px 6px;word-wrap: break-word;font-weight: 600;font-size: 16px;color: #FFF;text-decoration: none;overflow: hidden;text-overflow: ellipsis;}.gift>a{background:black;}.gift{border-radius:12px;background: #0165d0;-webkit-box-shadow: inset 0 0 5em 5px #000;box-shadow: inset 0 0 5em 5px #000;}.message{color:#FFF;text-shadow:-1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;font-family:sans-serif;font-weight:300;font-size:20px;white-space:pre-line;word-wrap:break-word}.message a, .message a:visited, .message a:hover, .message a:active{position:relative;transition:0.5s color ease;text-decoration:none;color:#53b6ef}.message a:hover{text-decoration:underline;}#chat{will-change: transform;min-height:unset;}#cts-chat-content{display:flex;flex-direction:column;justify-content:flex-end;min-height:100%}#cts-chat-content>.message{padding:3px 3px;background:#101314a8;position:relative;left:0;margin-bottom:3px;border-radius:6px}#cts-chat-content>.message.highlight,.message.common.highlight{background:#e24c05;-webkit-box-shadow:inset 0 0 20px #000000;box-shadow: inset 0 0 20px 0 #000000;}#cts-chat-content>.message.common{min-height: 50px;padding:3px 3px 3px 50px;box-sizing:border-box;text-align:left}#chat-instant>.avatar,#cts-chat-content>.message>.avatar{position:absolute;height:40px;width:40px;top:3px;left:3px;-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1);transform:scale(1);pointer-events:none;}#chat-instant>.avatar>div,#cts-chat-content>.message>.avatar>div{position:absolute;height:100%;width:100%;top:0;left:0;border-radius:100%;overflow:hidden}#notification-content .nickname{border-radius:6px;padding:1px 6px 1px 6px}.notification{padding:1px 0 1px 0;text-shadow:-1px 0 black, 0 1px black, 1px 0 black, 0 -1px black}.time{position:absolute;right:5px}.notifbtn:hover{background:linear-gradient(0deg,rgb(0, 135, 186)0%,rgba(0, 49, 64, 0.94)75%,rgba(0, 172, 255, 0.6)100%);}.notifbtn{cursor: pointer;border-radius: 0 0 12px 12px;outline: none;background:linear-gradient(0deg,rgba(0, 0, 0, 0)0%,rgba(37, 37, 37, 0.32)75%,rgba(255, 255, 255, 0.6)100%);border: none;color: white;width: 100%;}#notification-content.large{height:50%;}#notification-content{will-change: transform;top:0;position:relative;scrollbar-width:none;background:#101314;text-shadow:-1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;height: 15%;min-height:38px;font:bold 16px sans-serif;color:#FFF;overflow-y:scroll;overflow-wrap:break-word;padding:0 6px 0 6px}#notification-content::-webkit-scrollbar{width:0;background:transparent}#cts-chat-content{display:flex;flex-direction:column;justify-content:flex-end;min-height:100%}#chat-instant>.avatar>.status-icon,#cts-chat-content>.message>.avatar>.status-icon{left:0!important}#chat-instant>.nickname{color:#53b6ef;text-shadow:-1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;font-size: 20px;font-weight: 800;}#chat-instant::after{background:none;}.on-white-scroll{scrollbar-width: none;overflow-wrap: break-word;}.on-white-scroll::-webkit-scrollbar{width:0;background:transparent}#cts-chat-content>.message>.nickname{border:1px solid black;border-radius:6px;padding:1px 6px 1px 6px;word-wrap:break-word;max-width:calc(100% - 115px);font-weight:600;font-size:16px;color:#FFF;display:inline-block;text-decoration:none;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#input{padding-top:0}:host,#input>.waiting{background:#20262870}#input:before,#input:after{content:unset}#input>textarea::placeholder{color:#FFF}#input>textarea::-webkit-input-placeholder{color:#fff}#input>textarea:-moz-placeholder{color:#fff}#input>textarea{width: calc(100% - 57px);line-height:unset;min-height:65px;max-height:65px;border-radius:6px;scrollbar-width:none;background:#101314;text-shadow:-1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;color:#FFF;font-size:" + (CTS.FontSize - 4) + "px;font-family:sans-serif;font-weight:300;}#chat-wrapper{border:none;transition:none;bottom:0;right:0!important;max-height:calc(70% - 119px)!important;min-height:calc(70% - 119px)!important;position:fixed!important;min-width:400px;max-width:400px;}#chat-position{top:22px;left:6px;right:6px;bottom:5px;}.on-white-scroll::webkit-scrollbar{width:0;background:transparent;}";
  319. }
  320. //INITIATE
  321. CTSInit();
  322.  
  323. function CTSInit() {
  324. //INITIATE CTS
  325. var err_out = 0;
  326. CTS.ScriptLoading = setInterval(function() {
  327. err_out++;
  328. if (document.querySelector("tinychat-webrtc-app")) {
  329. if (document.querySelector("tinychat-webrtc-app").shadowRoot) CTSRoomInject();
  330. debug("TINYCHAT::LOAD", "ROOM");
  331. } else if (document.querySelector("#welcome-wrapper")) {
  332. CTSHomeInject();
  333. debug("TinyChat::LOAD", "HOME");
  334. } else {
  335. err_out++;
  336. }
  337. if (err_out == 50) {
  338. clearInterval(CTS.ScriptLoading);
  339. clearInterval(CTS.FullLoad);
  340. }
  341. }, 200);
  342. //WEBSOCKET HOOK
  343. if (!document.URL.match(/^https:\/\/tinychat\.com\/(?:$|#)/i)) {
  344. new MutationObserver(function() {
  345. this.disconnect();
  346. CTSWebSocket();
  347. }).observe(document, {
  348. subtree: true,
  349. childList: true
  350. });
  351. }
  352. //FULLY LOADED -> RUNALL
  353. CTS.FullLoad = setInterval(function() {
  354. if (CTS.ScriptInit && CTS.SocketConnected) {
  355. clearInterval(CTS.FullLoad);
  356. if (CTS.Me.mod) {
  357. if (CTS.Bot) CheckHost();
  358. if (CTS.Room.YT_ON) VideoListElement.querySelector("#videos-footer>#videos-footer-youtube").style.cssText = "display:block;";
  359. if (CTS.Room.YT_ON && CTS.Project.isTouchScreen) VideoListElement.querySelector("#videos-footer>#videos-footer-youtube").classList.toggle("hidden");
  360. //VideoListElement.querySelector("#videos-footer>#videos-footer-soundcloud").style.cssText = "display:block;";
  361. }
  362. //PTT AUTO
  363. if (CTS.Room.PTT) {
  364. VideoListElement.querySelector("#videos-footer-push-to-talk").addEventListener("mouseup", function(e) {
  365. if (e.which == 1) CTS.AutoMicrophone = false;
  366. if (e.which == 1 && e.ctrlKey === true) CTS.AutoMicrophone = !CTS.AutoMicrophone;
  367. if (e.which == 2) CTS.AutoMicrophone = !CTS.AutoMicrophone;
  368. }, {
  369. passive: true
  370. });
  371. }
  372. //FAVORITE ROOM
  373. var favorited_rooms = "",
  374. len = CTS.Favorited.length,
  375. script = document.createElement("script"),
  376. elem = document.getElementsByTagName("script")[0];
  377. script.text = 'function AddFavorite(obj, index) {\n var val = JSON.parse(localStorage.getItem("' + CTS.Project.Storage + 'Favorited"));\n val[index]=["' + CTS.Room.Name + '","' + CTS.Room.Avatar + '"];\n localStorage.setItem("' + CTS.Project.Storage + 'Favorited", JSON.stringify(val));\n obj.href ="https://tinychat.com/room/' + CTS.Room.Name + '";\n obj.innerText = "' + CTS.Room.Name + '";\n obj.onclick = null;\n return false;\n}';
  378. elem.parentNode.insertBefore(script, elem);
  379. for (var i = 0; i < len; i++) favorited_rooms += CTS.Favorited[i] !== null ? "#" + (i + 1) + '<a href="https://tinychat.com/room/' + CTS.Favorited[i][0] + '">' + CTS.Favorited[i][0] + "</a>" : "#" + (i + 1) + '<a href="#" onclick="return AddFavorite(this,' + i + ');">ADD ROOM</a>';
  380. ChatLogElement.querySelector("#input").insertAdjacentHTML("afterbegin", '<div id="header-user"><label id="label-user" for="input-user"><img class="switcher" src="' + (CTS.Me.avatar ? CTS.Me.avatar : "https://avatars.tinychat.com/standart/small/eyePink.png") + '"></label><input type="checkbox" id="input-user" hidden=""><div id="user-menu"><span id="nickname">FAVORITED ROOMS</span>' + favorited_rooms + '<span id="nickname">' + CTS.Me.username + '</span><a href="https://tinychat.com/settings/gifts"> My Gifts</a><a href="https://tinychat.com/settings/profile">Profile</a><a href="https://tinychat.com/room/' + CTS.Me.username + '">My Room</a><a href="https://tinychat.com/#">Directory</a></div></div>');
  381. //RECENT GIFTS
  382. var recent_gifts = "\n";
  383. for (var g = 0; g < CTS.Room.Recent_Gifts.length; g++) recent_gifts += "<img src=\"" + CTS.Room.Recent_Gifts[g] + "\" />";
  384. //ALERT
  385. Settings("<center><u>" + CTS.Room.Name.toUpperCase() + "</u>" + (CTS.Room.Avatar ? '\n<img src="' + CTS.Room.Avatar + '">' : "") + "\n" + CTS.Room.Bio + '\n<a href="' + CTS.Room.Website + '" target="_blank">' + CTS.Room.Website + "</a>" + ((recent_gifts != "") ? recent_gifts : "") + "\n\nROOM CONFIGURATION:\nYouTube Mode: " + ((CTS.Room.YT_ON) ? "ON" : "OFF") + "\n\n</center>");
  386. CTS.ShowedSettings = true;
  387. AddUserNotification(2, CTS.Me.namecolor, CTS.Me.nick, CTS.Me.username, false);
  388. //FEATURE LAUNCH
  389. SoundMeter();
  390. Reminder();
  391. PerformanceModeInit(CTS.PerformanceMode);
  392. }
  393. }, 500);
  394. }
  395.  
  396. function CTSHomeInject() {
  397. var HomeCSS = "@media screen and (max-width: 1000px){.nav-menu {background-color: #181e1f;}}.nav-sandwich-menu-button{background-color:unset;}#modalfree-wrapper{display: none;}.tile-header > img {transition:unset;}.tile-favroom-opt{cursor:pointer;position: absolute;right: 0;top: 0;padding: 1px;background:#10131494;}.tile-favroom-opt:hover{background:#ff00008c;}#content{padding-bottom:unset;}.tile-content{height:180px;}.cts-footer-contents .tile-info{height:20px}.cts-footer-contents .tile-header>img{cursor:pointer;height: 220px;}.tile-header>img{height: 230px;width: 100%;max-width: 100%;}.cts-footer:hover .cts-footer-contents .tile{font-size: 18px;font-weight: 800;width:20%;display:inline-block;}.cts-footer-contents .tile {background: #00a2ff;text-align: center;border:unset;height:unset;display:none;margin: unset;}.cts-footer {background:#10131494;width: 100%;position: fixed;bottom: 0;left: 0;}#catalog > div {display: inline-block;padding: 5px;box-sizing: border-box;}.tile[data-status=\"pro\"], .tile[data-status=\"extreme\"], .tile[data-status=\"gold\"] {margin-top: 12px;}.tile-header {border-radius: 12px 12px 0 0;}#promoted .tile-header > img{width:100%;}#navigation > label{border-radius:12px;}#welcome>div{padding-top:0}.tile-statistic{padding-top:0;padding-bottom:4px;background: #000000a6;}.tile-name{padding-top:unset;}#promote-button{border-radius: 12px 12px 0 0;}tile-name{padding-top:unset;}.tile-info{bottom:unset;top:0;height:28px;}.cts-footer > h2, #promoted-wrapper > h2, #trended-wrapper > h2, #header-for-all{text-align: center;font-size: 30px;font-weight: 800;}body{background:" + CTS.MainBackground + ";background-size:cover;background-attachment: fixed;}.tile-content-info-icon > img {display:none;}.tile-content-info{font-size: 14px;font-weight: 600;}#promoted .tile-content-info-text{word-break: break-word;max-height:95px;}.tile{border:2px solid #fff;margin-top: 13px;height:425px;}#loadmore-no-more {background:#101314;}.tile-content > img{display:none;}#welcome-wrapper{background: #10131494;border-bottom:unset;}#loadmore{background: #00a2ff;font-weight: 600;}#user-menu{background: #101314;}#nav-static-wrapper {-webkit-box-shadow: 0 0 20px 17px #53b6ef;box-shadow: 0 0 20px 17px #53b6ef;background:#101314;}#up-button:hover > #up-button-content {background: #10131459;}#nav-fixed{border-bottom:unset;}#nav-fixed-wrapper{-webkit-box-shadow: 0 0 20px 17px #53b6ef;box-shadow: 0 0 20px 17px #53b6ef;background: #101314;}#nav-static {border-bottom:unset;}#welcome{padding:12px 30px 24px;}.tile{border-radius: 12px;background: #101314b3;}div, span, a, h1, h2, h3, h4, h5, h6, p {text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;color: #FFFFFF!important;}#promoted-wrapper > div, #trended-wrapper > div {background: #00a2ff;border-radius: 12px;}.tile-content-info-text {word-break: break-word;width:100%;}.tile-content-info.with-icon {display: contents;}#navigation > label:not([for=\"input-catalog-navigation\"]) {font-weight:600;background: #000000;}";
  398. //INSERT HTML/CSS
  399. document.body.querySelector("style").insertAdjacentHTML("beforeend", HomeCSS);
  400. document.body.insertAdjacentHTML("beforeend", '<div class="cts-footer"><h2>FAVORITED ROOMS</h2><div class="cts-footer-contents"></div></div>');
  401. //INSERT SCRIPT
  402. var script = document.createElement("script"),
  403. elem = document.getElementsByTagName("script")[0];
  404. script.text = 'function RemoveFavorite(obj, index) {\n var val = JSON.parse(localStorage.getItem("' + CTS.Project.Storage + 'Favorited"));\n val[index]=null;\n localStorage.setItem("' + CTS.Project.Storage + 'Favorited", JSON.stringify(val));\n return obj.parentNode.parentNode.remove();\n}';
  405. elem.parentNode.insertBefore(script, elem);
  406. var len = CTS.Favorited.length;
  407. for (var i = 0; i < len; i++) document.body.querySelector(".cts-footer-contents").insertAdjacentHTML("beforeend", CTS.Favorited[i] !== null ? '<div class="tile" data-room-name="' + CTS.Favorited[i][0] + '">Favorite #' + (i + 1) + ' <div class="tile-header"><img id="tile-header-image" src="' + (CTS.Favorited[i][1] ? CTS.Favorited[i][1] : "https://i.imgur.com/VnVFEv7.png") + '" onload="MasonryTails.Refresh();" onclick="locationTo(\'/room/' + CTS.Favorited[i][0] + '\');"><div class="tile-info"><div class="tile-favroom-opt" onclick="RemoveFavorite(this,' + i + ')">X</div><div class="tile-name">' + CTS.Favorited[i][0] + '</div><div class="tile-statistic"><svg width="18" height="14" viewBox="0 0 18 14" xmlns="https://www.w3.org/2000/svg"><path d="M9.333 5.667c0-.367-.3-.667-.666-.667h-8C.3 5 0 5.3 0 5.667v6.666C0 12.7.3 13 .667 13h8c.366 0 .666-.3.666-.667V10L12 12.667V5.333L9.333 8V5.667z" transform="translate(3 -3)" fill="#fff" fill-rule="evenodd"></path></svg><span>0</span><svg width="20" height="16" viewBox="0 0 20 16" xmlns="https://www.w3.org/2000/svg"><path d="M57 4c-3.182 0-5.9 2.073-7 5 1.1 2.927 3.818 5 7 5s5.9-2.073 7-5c-1.1-2.927-3.818-5-7-5zm0 8.495c1.93 0 3.495-1.565 3.495-3.495 0-1.93-1.565-3.495-3.495-3.495-1.93 0-3.495 1.565-3.495 3.495 0 1.93 1.565 3.495 3.495 3.495zm0-1.51c1.096 0 1.985-.89 1.985-1.985 0-1.096-.89-1.985-1.985-1.985-1.096 0-1.985.89-1.985 1.985 0 1.096.89 1.985 1.985 1.985z" transform="translate(-47 -2)" fill="#fff" fill-rule="evenodd"></path></svg><span>0</span></div></div></div></div>' : '<div class="tile">Favorite #' + (i + 1) + "</div>");
  408. //SCRIPT INIT -> PREPARE()
  409. clearInterval(CTS.ScriptLoading);
  410. CTS.ScriptInit = true;
  411. CTSHomePrepare();
  412. }
  413.  
  414. function CTSHomePrepare() {
  415. //FUNCTION BYPASS
  416. window.ModalFreeTrialPro = function() {};
  417. //REMOVE
  418. Remove(document, "#footer");
  419. Remove(document, ".nav-logo");
  420. }
  421.  
  422. function CTSRoomInject() {
  423. // PUBLIC / ADDON GRABBERS
  424. window.CTSImages = [
  425. "https://i.imgur.com/8M0NPCv.png", "https://i.imgur.com/6IAL4aM.png", "https://i.imgur.com/QdOTqIR.jpg", "https://i.imgur.com/qqFsein.jpg", "https://i.imgur.com/vVD5pUb.jpg", "https://i.imgur.com/Sux2Age.jpg", "https://i.imgur.com/cIKznlf.jpg", "https://i.imgur.com/iEMP5I6.jpg", "https://i.imgur.com/rEGy1tK.jpg", "https://i.imgur.com/JR6Ped5.jpg", "https://i.imgur.com/m3dX7yn.jpg", "https://i.imgur.com/2cJqV1K.jpg", "https://i.imgur.com/QL1M4yG.jpg", "https://i.imgur.com/Syy1mUU.jpg", "https://i.imgur.com/sRpDOp3.jpg", "https://i.imgur.com/Im7dWdM.jpg", "https://i.imgur.com/9uCdYyq.png", "https://i.imgur.com/X9Kp6ka.jpg", "https://i.imgur.com/TOZTx1M.jpg", "https://i.imgur.com/wcjxVjk.png", "https://i.imgur.com/UZfmih9.png", "https://i.imgur.com/mkauZUT.jpg", "https://i.imgur.com/GfPqv7d.jpg", "https://i.imgur.com/R7AOtjV.jpg", "https://i.imgur.com/Qso6n8k.jpg", "https://i.imgur.com/vVfj23z.jpg", "https://i.imgur.com/BYPsShX.jpg", "https://i.imgur.com/1EWYBQw.jpg", "https://i.imgur.com/Oaq0eip.jpg", "https://i.imgur.com/HVHaJ1r.jpg", "https://i.imgur.com/SImcSc2.png", "https://i.imgur.com/CgRDCdy.jpg", "https://i.imgur.com/VMtXsES.png", "https://i.imgur.com/oxHz9un.jpg", "https://i.imgur.com/VN6x9QA.jpg", "https://i.imgur.com/9KhjWvW.jpg", "https://i.imgur.com/fu0eiv4.jpg", "https://i.imgur.com/QgcvxZf.jpg", "https://i.imgur.com/2kz8Roz.jpg", "https://i.imgur.com/A2AdQd8.jpg", "https://i.imgur.com/zuNUJ4J.jpg", "https://i.imgur.com/CW4mVWE.jpg", "https://i.imgur.com/0NGecGX.jpg", "https://i.imgur.com/4IEcVlr.jpg", "https://i.imgur.com/JDnQzF4.jpg", "https://i.imgur.com/Ye6iIrw.jpg", "https://i.imgur.com/DVlwQFN.jpg", "https://i.imgur.com/G6Oa9s6.jpg", "https://i.imgur.com/cXpEHvX.jpg", "https://i.imgur.com/ANXRz54.jpg", "https://i.imgur.com/i7KvpAf.jpg", "https://i.imgur.com/kJ44IQQ.jpg", "https://i.imgur.com/5ONal5c.jpg", "https://i.imgur.com/nWuC5FK.jpg", "https://i.imgur.com/ZYNsEN6.jpg", "https://i.imgur.com/C3aVnBq.jpg", "https://i.imgur.com/8Kts9t7.jpg", "https://i.imgur.com/QiaDx3C.jpg", "https://i.imgur.com/wrt6zBN.jpg", "https://i.imgur.com/3YgGoV0.jpg", "https://i.imgur.com/HPsbhiF.jpg", "https://i.imgur.com/X4wSs8f.jpg", "https://i.imgur.com/cqeMox0.jpg", "https://i.imgur.com/apNgmSO.jpg", "https://i.imgur.com/YjYcyCn.jpg", "https://i.imgur.com/2hUFTDv.png", "https://i.imgur.com/7lDQKff.jpg", "https://i.imgur.com/yuQTkOy.png", "https://i.imgur.com/7zvCOpV.jpg", "https://i.imgur.com/L5v6bcs.jpg", "https://i.imgur.com/5h3N2HY.jpg", "https://i.imgur.com/AvhrIcv.jpg", "https://i.imgur.com/DsAMAG1.jpg", "https://i.imgur.com/dDvOwXi.jpg", "https://i.imgur.com/ii00Lnl.jpg",
  426. "https://i.imgur.com/vHDQY7N.jpg", "https://i.imgur.com/czfeyXQ.jpg", "https://i.imgur.com/pHEAee2.jpg", "https://i.imgur.com/txu4z7B.jpg", "https://i.imgur.com/NOapG69.jpg", "https://i.imgur.com/cxA4ist.jpg", "https://i.imgur.com/2keIszu.jpg", "https://i.imgur.com/q2Kpinf.jpg", "https://i.imgur.com/nDiFD2D.jpg", "https://i.imgur.com/Lvk0Lql.jpg", "https://i.imgur.com/QcRIeBr.jpg", "https://i.imgur.com/GlBONNB.jpg", "https://i.imgur.com/jVmJ9Iz.jpg", "https://i.imgur.com/9h2N288.png", "https://i.imgur.com/q0Rm3dS.jpg", "https://i.imgur.com/1tTKfKM.png", "https://i.imgur.com/nEwJBan.jpg", "https://i.imgur.com/NgE4lXY.jpg", "https://i.imgur.com/I4Pv5Zc.jpg", "https://i.imgur.com/QVDBSEm.jpg", "https://i.imgur.com/N9KfkgT.jpg", "https://i.imgur.com/mLIDP8a.jpg", "https://i.imgur.com/C8fAtMn.jpg", "https://i.imgur.com/e2Pubr3.jpg", "https://i.imgur.com/6drF4lG.jpg", "https://i.imgur.com/JcFhmPT.jpg", "https://i.imgur.com/wQQlX06.jpg", "https://i.imgur.com/qPTFnVp.jpg", "https://i.imgur.com/KWto7ab.jpg", "https://i.imgur.com/DHEdXnE.jpg", "https://i.imgur.com/49vqbrB.jpg", "https://i.imgur.com/TK4I9DI.jpg", "https://i.imgur.com/o5QNrcQ.jpg", "https://i.imgur.com/49adw4l.jpg", "https://i.imgur.com/vyYOZkE.jpg", "https://i.imgur.com/sBaXCoY.jpg", "https://i.imgur.com/dH0M8aN.png", "https://i.imgur.com/aqZ4VDh.jpg", "https://i.imgur.com/hMpMR84.jpg", "https://i.imgur.com/5zR2i8W.jpg", "https://i.imgur.com/oUPXbGf.jpg", "https://i.imgur.com/YW5tv1t.jpg", "https://i.imgur.com/JgKwHXs.jpg", "https://i.imgur.com/2k9JihV.jpg", "https://i.imgur.com/V5MUGj4.jpg", "https://i.imgur.com/3dUgoAf.jpg", "https://i.imgur.com/Q6aJgBM.jpg", "https://i.imgur.com/gRSmljE.jpg", "https://i.imgur.com/nkhsbE9.jpg", "https://i.imgur.com/I6LMqZq.jpg", "https://i.imgur.com/7OzdeRk.jpg", "https://i.imgur.com/wW94Pvc.jpg", "https://i.imgur.com/jQrTdv2.jpg", "https://i.imgur.com/UDgQ2Fh.jpg", "https://i.imgur.com/qjdMmPf.jpg", "https://i.imgur.com/yh7QoUN.jpg", "https://i.imgur.com/XchwuKo.jpg", "https://i.imgur.com/fdPaQbz.jpg", "https://i.imgur.com/zNfKy8I.jpg", "https://i.imgur.com/TaOf7dX.jpg", "https://i.imgur.com/bZxfyu8.jpg", "https://i.imgur.com/ccZRfsA.jpg", "https://i.imgur.com/wlbmT74.jpg", "https://i.imgur.com/29ffHeU.jpg", "https://i.imgur.com/30HbBAA.jpg", "https://i.imgur.com/4pO8b0B.jpg", "https://i.imgur.com/kD6BveQ.jpg", "https://i.imgur.com/LrCsiQj.jpg", "https://i.imgur.com/QN5NcXK.jpg", "https://i.imgur.com/MWW5cOv.jpg", "https://i.imgur.com/7LvskAH.jpg", "https://i.imgur.com/S7kLNct.jpg", "https://i.imgur.com/rL0olge.jpg", "https://i.imgur.com/0Apm59C.jpg", "https://i.imgur.com/ZMRBVvO.jpg",
  427. "https://i.imgur.com/xFNZTwS.jpg", "https://i.imgur.com/iqq8ECW.jpg", "https://i.imgur.com/xEth2qp.jpg", "https://i.imgur.com/8ijIZMj.jpg", "https://i.imgur.com/zSB1DOw.jpg", "https://i.imgur.com/6TzjZSd.jpg", "https://i.imgur.com/Gf9yAwP.jpg", "https://i.imgur.com/u5ifVZy.jpg", "https://i.imgur.com/4ibO4FN.jpg", "https://i.imgur.com/bDCygo7.jpg", "https://i.imgur.com/lqktMar.jpg", "https://i.imgur.com/b2jAXiC.jpg", "https://i.imgur.com/oPE32ni.jpg", "https://i.imgur.com/YRjfPjP.jpg", "https://i.imgur.com/1FRwNEb.jpg", "https://i.imgur.com/dzgvlEx.jpg", "https://i.imgur.com/3FCAMiu.jpg", "https://i.imgur.com/wF5k6Ux.jpg", "https://i.imgur.com/mkuNYYa.jpg", "https://i.imgur.com/Y2Yu3yA.jpg", "https://i.imgur.com/Zchlast.jpg", "https://i.imgur.com/2FbH2jq.jpg", "https://i.imgur.com/Bb4iyy0.jpg", "https://i.imgur.com/7rjAtTt.jpg", "https://i.imgur.com/g1rNC8Z.jpg", "https://i.imgur.com/RC3bKe7.jpg", "https://i.imgur.com/qloc683.jpg", "https://i.imgur.com/irmzqz7.jpg", "https://i.imgur.com/pvmhbwL.jpg", "https://i.imgur.com/Xti1aEf.jpg", "https://i.imgur.com/FqFYows.jpg", "https://i.imgur.com/92zz2Zu.jpg", "https://i.imgur.com/jWrqBga.jpg", "https://i.imgur.com/OMSQsDe.jpg", "https://i.imgur.com/bvTtaLQ.jpg", "https://i.imgur.com/vxt6B7Y.jpg", "https://i.imgur.com/siw7Ipn.jpg", "https://i.imgur.com/paQsmXk.jpg", "https://i.imgur.com/VLHs9cT.png", "https://i.imgur.com/6VSxbJY.jpg", "https://i.imgur.com/C3Xn1WD.jpg", "https://i.imgur.com/d6BBFfS.jpg", "https://i.imgur.com/HyK1BFP.jpg", "https://i.imgur.com/2InicOt.jpg", "https://i.imgur.com/IVM4luE.jpg", "https://i.imgur.com/VLE0zNA.jpg", "https://i.imgur.com/rfgwqVI.jpg", "https://i.imgur.com/GsTMYfk.jpg", "https://i.imgur.com/yMEdYBN.jpg", "https://i.imgur.com/LvrO8oB.jpg", "https://i.imgur.com/1VBNkJP.jpg", "https://i.imgur.com/beuJiKd.jpg", "https://i.imgur.com/61h9Twq.jpg", "https://i.imgur.com/mnszrZ3.jpg", "https://i.imgur.com/He8K7kF.jpg", "https://i.imgur.com/id5BSLh.jpg", "https://i.imgur.com/huazhWL.jpg", "https://i.imgur.com/ttc4EYq.jpg", "https://i.imgur.com/HTO5tGy.jpg", "https://i.imgur.com/Pg1NrT1.jpg", "https://i.imgur.com/HEubZeG.jpg", "https://i.imgur.com/yk4XVVu.jpg", "https://i.imgur.com/Q6xqV8U.jpg", "https://i.imgur.com/ROTOMPV.jpg", "https://i.imgur.com/5DBP49J.jpg", "https://i.imgur.com/1pafkRu.jpg", "https://i.imgur.com/ZYJW79s.jpg", "https://i.imgur.com/5hJnezu.jpg", "https://i.imgur.com/LHRwsur.jpg", "https://i.imgur.com/858hMb9.jpg", "https://i.imgur.com/WOtpN81.jpg", "https://i.imgur.com/ITCxNl1.jpg", "https://i.imgur.com/OvXfe6w.jpg", "https://i.imgur.com/EVYKONX.jpg", "https://i.imgur.com/9nP4KwW.jpg",
  428. "https://i.imgur.com/1SaESYp.jpg", "https://i.imgur.com/xBQlQKh.jpg", "https://i.imgur.com/yonFqV5.jpg", "https://i.imgur.com/go0xMSw.png", "https://i.imgur.com/jJhFpGw.jpg", "https://i.imgur.com/fcULcZq.jpg", "https://i.imgur.com/66l2lHM.jpg", "https://i.imgur.com/bujMfoQ.jpg", "https://i.imgur.com/JdbenHz.jpg", "https://i.imgur.com/merXbme.jpg", "https://i.imgur.com/ogrqxoQ.jpg", "https://i.imgur.com/fCstr3I.jpg", "https://i.imgur.com/t4d6ngW.jpg", "https://i.imgur.com/QzTlCSw.png", "https://i.imgur.com/CjrvvRI.jpg", "https://i.imgur.com/Du0abK6.jpg", "https://i.imgur.com/fZxRbtq.jpg", "https://i.imgur.com/zJB8VZc.jpg", "https://i.imgur.com/5lFG1Bf.jpg", "https://i.imgur.com/hvGzGNb.png", "https://i.imgur.com/UHZ8gC6.jpg", "https://i.imgur.com/ZIlJIIZ.png", "https://i.imgur.com/H7SjU1N.jpg", "https://i.imgur.com/yxxQsmf.jpg", "https://i.imgur.com/1TBkVzd.jpg", "https://i.imgur.com/3WffDw4.jpg", "https://i.imgur.com/XQU3W19.png", "https://i.imgur.com/2YxUgbQ.jpg", "https://i.imgur.com/8TVSB7D.jpg", "https://i.imgur.com/lNfEZwF.jpg", "https://i.imgur.com/2CgZewR.jpg", "https://i.imgur.com/ZJMFXGM.jpg", "https://i.imgur.com/9pZLYVF.jpg", "https://i.imgur.com/i9KaWdK.jpg", "https://i.imgur.com/X0hUxMg.jpg", "https://i.imgur.com/cWNLBLC.jpg", "https://i.imgur.com/oVQ1qmK.jpg", "https://i.imgur.com/MFa4WPr.jpg", "https://i.imgur.com/QalYWeA.png", "https://i.imgur.com/bLAlVzX.jpg", "https://i.imgur.com/OEXO2kT.jpg", "https://i.imgur.com/MnK5lmL.jpg", "https://i.imgur.com/dVMdMZh.jpg", "https://i.imgur.com/nNfOFvX.png", "https://i.imgur.com/yzoTLrK.jpg", "https://i.imgur.com/b1mTB58.jpg", "https://i.imgur.com/uWMQpMV.jpg", "https://i.imgur.com/TVGqTdH.jpg", "https://i.imgur.com/GFfZk0L.jpg", "https://i.imgur.com/aS5RCaX.jpg", "https://i.imgur.com/TTWYjDg.png", "https://i.imgur.com/OKUbuLl.jpg", "https://i.imgur.com/FyIJb7S.jpg", "https://i.imgur.com/KVTNHKB.jpg", "https://i.imgur.com/G9cpqNM.jpg", "https://i.imgur.com/cFf5e30.jpg", "https://i.imgur.com/1Nok0ho.jpg", "https://i.imgur.com/ozEWuPz.jpg", "https://i.imgur.com/QhHTLxc.jpg", "https://i.imgur.com/YYto1AX.jpg", "https://i.imgur.com/1THGvEA.jpg", "https://i.imgur.com/Rt3mp6H.jpg", "https://i.imgur.com/M2tiiNS.jpg", "https://i.imgur.com/lRtAxDM.jpg", "https://i.imgur.com/dlqkyFg.jpg", "https://i.imgur.com/lSLHeHM.png", "https://i.imgur.com/wKBOEof.png", "https://i.imgur.com/0aF2Si4.jpg", "https://i.imgur.com/bPDtdqH.jpg", "https://i.imgur.com/wZ08FwN.jpg", "https://i.imgur.com/gEtlvpr.jpg", "https://i.imgur.com/sTrwc9U.jpg", "https://i.imgur.com/nPEjErr.png", "https://i.imgur.com/bRaK26l.jpg", "https://i.imgur.com/vwJe85N.jpg",
  429. "https://i.imgur.com/F8RFA5t.jpg", "https://i.imgur.com/M08DwfB.jpg", "https://i.imgur.com/gvF4hmM.jpg", "https://i.imgur.com/vINAgNJ.jpg", "https://i.imgur.com/ZzIHnk7.png", "https://i.imgur.com/IaYE1SA.png", "https://i.imgur.com/h3uA809.jpg", "https://i.imgur.com/uSxy1TH.jpg", "https://i.imgur.com/ihUpL67.jpg", "https://i.imgur.com/JA5pSwV.jpg", "https://i.imgur.com/S5PaNRb.jpg", "https://i.imgur.com/vPKxrIj.jpg", "https://i.imgur.com/Zb2vtPA.jpg", "https://i.imgur.com/uUkxBYp.jpg", "https://i.imgur.com/fpsAui6.jpg", "https://i.imgur.com/Ns5gM3Y.jpg", "https://i.imgur.com/qUFLtvX.jpg", "https://i.imgur.com/JsVmBaH.jpg", "https://i.imgur.com/DUFEeDG.jpg", "https://i.imgur.com/VkT9WNe.jpg", "https://i.imgur.com/7rHa1t1.jpg", "https://i.imgur.com/6rt4Xsc.jpg", "https://i.imgur.com/1woJRNz.jpg", "https://i.imgur.com/DZizgSe.jpg", "https://i.imgur.com/WcPkq2p.jpg", "https://i.imgur.com/FWgshWM.jpg", "https://i.imgur.com/ce28KTw.jpg", "https://i.imgur.com/Z1kgLE9.jpg", "https://i.imgur.com/qmTDbVf.jpg", "https://i.imgur.com/Glfmlwk.jpg", "https://i.imgur.com/1ZlA3eI.jpg", "https://i.imgur.com/FyY9zQB.jpg", "https://i.imgur.com/5vION1i.jpg", "https://i.imgur.com/GN8VSLo.jpg", "https://i.imgur.com/fMHj9aD.png", "https://i.imgur.com/AZKVqlm.jpg", "https://i.imgur.com/N6yrNAp.jpg", "https://i.imgur.com/mzfGu1K.jpg", "https://i.imgur.com/PbDAvp8.jpg", "https://i.imgur.com/PeKxWNd.png", "https://i.imgur.com/q6HucmK.jpg", "https://i.imgur.com/PcpoEr9.jpg", "https://i.imgur.com/m8MKD34.jpg", "https://i.imgur.com/rEfHYFj.png", "https://i.imgur.com/YOnQC7m.jpg", "https://i.imgur.com/IKZ1dnz.png", "https://i.imgur.com/7dKl6GR.jpg", "https://i.imgur.com/7QTdYyC.jpg", "https://i.imgur.com/VY6CRU9.jpg", "https://i.imgur.com/JbbTXGZ.jpg", "https://i.imgur.com/LiWognc.jpg", "https://i.imgur.com/lAlCmCS.jpg", "https://i.imgur.com/tuoVfDz.jpg", "https://i.imgur.com/jDtr7VV.jpg", "https://i.imgur.com/Fmq1w0x.jpg", "https://i.imgur.com/SW9tEby.jpg", "https://i.imgur.com/OIeGtF1.jpg", "https://i.imgur.com/y28VX6l.jpg", "https://i.imgur.com/SmN01pH.jpg", "https://i.imgur.com/pYIHV3V.jpg", "https://i.imgur.com/4mefbZJ.jpg", "https://i.imgur.com/CrnksCn.jpg", "https://i.imgur.com/DqdQHU5.jpg", "https://i.imgur.com/Kyp7Mrq.jpg", "https://i.imgur.com/5uUI0FK.jpg", "https://i.imgur.com/nYyKnjc.jpg", "https://i.imgur.com/8yngY9r.png", "https://i.imgur.com/LXTztRk.jpg", "https://i.imgur.com/YW9f04H.jpg", "https://i.imgur.com/VEOTdF4.jpg", "https://i.imgur.com/CNcnljn.jpg", "https://i.imgur.com/cVyPQRQ.jpg", "https://i.imgur.com/QVnisWP.jpg", "https://i.imgur.com/xkOmSt2.jpg", "https://i.imgur.com/OWqkrGA.jpg",
  430. "https://i.imgur.com/407ypHE.jpg", "https://i.imgur.com/q7CBMPA.jpg", "https://i.imgur.com/jLgvLEB.jpg", "https://i.imgur.com/ZgRybJZ.jpg", "https://i.imgur.com/BCiqZoY.jpg", "https://i.imgur.com/C4FCE08.jpg", "https://i.imgur.com/mwQMddH.jpg", "https://i.imgur.com/c9Na9m7.jpg", "https://i.imgur.com/rvkOyhW.jpg", "https://i.imgur.com/fXikj5n.jpg", "https://i.imgur.com/B9nwfN2.jpg", "https://i.imgur.com/NitZTxZ.jpg", "https://i.imgur.com/4U7Wc6E.jpg", "https://i.imgur.com/wk2byhf.jpg", "https://i.imgur.com/kmeF9zK.jpg", "https://i.imgur.com/fpOurZh.jpg", "https://i.imgur.com/A6t86N6.jpg", "https://i.imgur.com/CnGthdb.jpg", "https://i.imgur.com/FgCA3uK.jpg", "https://i.imgur.com/sCYYhqf.jpg", "https://i.imgur.com/2NopGqw.jpg", "https://i.imgur.com/fzYZGdC.jpg", "https://i.imgur.com/nZufx8p.jpg", "https://i.imgur.com/IjMMreD.jpg", "https://i.imgur.com/HEpf4Eb.jpg", "https://i.imgur.com/jZeIfAc.jpg", "https://i.imgur.com/ZxaX4j0.jpg", "https://i.imgur.com/DXetwFt.jpg", "https://i.imgur.com/euIXHlP.jpg", "https://i.imgur.com/U4Mo2Hn.jpg", "https://i.imgur.com/w4pR6Hp.jpg", "https://i.imgur.com/79GciEk.jpg", "https://i.imgur.com/WpDbcAA.jpg", "https://i.imgur.com/YODAe6Z.jpg", "https://i.imgur.com/4It1NIe.jpg", "https://i.imgur.com/ALkfNHF.jpg", "https://i.imgur.com/xJOaHZP.jpg", "https://i.imgur.com/nFCIuJo.jpg", "https://i.imgur.com/oXgFh2K.jpg", "https://i.imgur.com/Vcs3jXT.jpg", "https://i.imgur.com/XGtJE58.jpg", "https://i.imgur.com/q4WalQY.jpg", "https://i.imgur.com/WFIyruV.jpg", "https://i.imgur.com/sItJMKv.jpg", "https://i.imgur.com/LAQ3Wpl.jpg", "https://i.imgur.com/C64XPAR.jpg", "https://i.imgur.com/hyehxek.jpg", "https://i.imgur.com/4XYBWKu.jpg", "https://i.imgur.com/KU1adf4.jpg", "https://i.imgur.com/L3sbodb.png", "https://i.imgur.com/JPMfbL9.jpg", "https://i.imgur.com/ieae2zo.jpg", "https://i.imgur.com/VVswQpo.jpg", "https://i.imgur.com/fWUr6ic.jpg", "https://i.imgur.com/juRIj2L.jpg", "https://i.imgur.com/2Mq8ZR8.jpg", "https://i.imgur.com/ibC5gSl.jpg", "https://i.imgur.com/63uHgyR.jpg", "https://i.imgur.com/xs3yEut.jpg", "https://i.imgur.com/0SYzA7u.jpg", "https://i.imgur.com/hRKhVTS.jpg", "https://i.imgur.com/IGv4V1p.jpg", "https://i.imgur.com/hmlxgXG.jpg", "https://i.imgur.com/q97Z7Nc.jpg", "https://i.imgur.com/1A6NPKj.jpg", "https://i.imgur.com/y97L14a.jpg", "https://i.imgur.com/DPohLPu.jpg", "https://i.imgur.com/JvXJ74s.jpg", "https://i.imgur.com/mA5b8Y1.jpg", "https://i.imgur.com/FVNerO1.jpg", "https://i.imgur.com/KNsh665.jpg", "https://i.imgur.com/Z9b0Gme.jpg", "https://i.imgur.com/z90LZmp.jpg", "https://i.imgur.com/tfXYXr7.png", "https://i.imgur.com/atHkjXl.jpg",
  431. "https://i.imgur.com/u1l34Vi.jpg", "https://i.imgur.com/X0yROLr.jpg", "https://i.imgur.com/EpHkJZI.jpg", "https://i.imgur.com/TIKipWb.jpg", "https://i.imgur.com/Lq4qnDF.jpg", "https://i.imgur.com/N1KmzQo.jpg", "https://i.imgur.com/pAReFTB.jpg", "https://i.imgur.com/ZKMQwxk.jpg", "https://i.imgur.com/aSDE7i4.jpg", "https://i.imgur.com/kabITqS.jpg", "https://i.imgur.com/W7oaDNe.jpg", "https://i.imgur.com/VHYmth8.jpg",
  432. ];
  433. window.CTSEightBall = ["It is certain.", "It is decidedly so.", "Without a doubt.", "Yes - definitely.", "You may rely on it.", "As I see it, yes.", "Most Likely.", "Outlook good.", "Yes.", "Signs point to yes.", "Reply hazy, try again.", "Ask again later.", "Better not tell you now.", "Cannot predict now.", "Concentrate and ask again.", "Don't count on it.", "My reply is no.", "My sources say no.", "Outlook not so good.", "Very doubtful."];
  434. window.CTSWelcomes = ["Hey ", "What's crackin ", "Hello ", "Good to see you ", "Howdy ", "Hey there ", "Yo ", "What's up ", "Greetings ", "What's hangin' "];
  435. window.CTSSound = {
  436. C: new Audio("https://media.vocaroo.com/mp3/e3VIvvFqdHe"),
  437. HIGHLIGHT: new Audio("https://media.vocaroo.com/mp3/mjS6tza4Tu4"),
  438. GREET: new Audio("https://media.vocaroo.com/mp3/mjS6tza4Tu4"),
  439. MENTION: new Audio("https://media.vocaroo.com/mp3/gsrjQNCdhlX"),
  440. MSG: new Audio("https://tinychat.com" + window.rootDir + "/sound/pop.mp3"),
  441. GIFT: new Audio("https://tinychat.com" + window.rootDir + "/sound/magic.mp3"),
  442. PVTMSG: new Audio("https://media.vocaroo.com/mp3/1eX3L752VdQ")
  443. };
  444. window.CTSRadioStations = [
  445. ["Flex 98.5FM", "https://edge1-b.exa.live365.net/a23768"],
  446. ["The Loop 97.9", "https://16883.live.streamtheworld.com/WLUPFMAAC.aac"],
  447. ["HOT899", "https://newcap.leanstream.co/CIHTFM"],
  448. ["chillstep.info", "https://chillstep.info/listen.ogg"],
  449. ["HOT997", "https://ice5.securenetsystems.net/KHHK"],
  450. ["Dance365", "https://edge1-b.exa.live365.net/a93720"],
  451. ["kexp.org", "https://kexp-mp3-128.streamguys1.com/kexp128.mp3"],
  452. ["Classic Deep Cuts", "https://edge1-b.exa.live365.net/a72496"],
  453. ["Divas Hustle Radio", "https://edge1-b.exa.live365.net/a72972"],
  454. ["Retro 8089", "https://edge1-b.exa.live365.net/a53202"],
  455. ["Teerex Radio Teerex", "https://edge1-b.exa.live365.net/a74387"],
  456. ["NGI Radio", "https://edge1-b.exa.live365.net/a24650"],
  457. ["Legend Oldies", "https://edge1-b.exa.live365.net/a88135"],
  458. ["Music City Roadhouse", "https://edge1-b.exa.live365.net/a73754"],
  459. ["Mashrup Reggae Radio", "https://edge1-b.exa.live365.net/a00564"],
  460. ["97.5 Dance Hits", "https://edge1-b.exa.live365.net/a50365"]
  461. ];
  462. window.CTSNameColor = ["#3f69c0", "#b63fc0", "#001f3f", "#0074D9", "#7FDBFF", "#39CCCC", "#3D9970", "#26a635", "#00b34d", "#e6c700", "#FF851B", "#FF4136", "#c81e70", "#f00fbb", "#B10DC9", "#111111", "#AAAAAA", "#cc6600", "#009933", "#003366", "#660033", "#804000"];
  463. window.CTSChatCSS = [
  464. [ //STYLE #0
  465. ["#chat-wrapper{background:linear-gradient(0deg,rgba(32,38,40,0.59)0%,rgba(16,14,14,0.76)calc(100% - 62px),rgba(45,55,58,0.72)100%)!important;}#cts-chat-content>.message{background:#101314a8;}.message{color:#FFF;text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;}"],
  466. [".PMPopup .PMContent{background: #2d373ADB;}.PMPopup h2{background:linear-gradient(0deg,rgb(0, 0, 0)0%,rgba(19,19,19,0.73)8px,rgba(0,0,0,0.34)100%);}#videos-footer-broadcast-wrapper>.waiting{background:#53b6ef;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button{background:#53b6ef!important;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button:hover{background:#3d89b5!important;}#videos-footer-push-to-talk{background:#53b6ef}#videos-footer-push-to-talk:hover{background:#3d89b5}#videos-footer-broadcast:hover{background:#3d89b5}#videos-footer-broadcast{background:#53b6ef;}"],
  467. ["#sidemenu{background: linear-gradient(0deg,rgb(0, 0, 0)0%,rgba(19,19,19,0.73)8px,rgba(0,0,0,0.34)100%);}"]
  468. ],
  469. [ //STYLE #1
  470. ["#chat-wrapper{background:linear-gradient(0deg,rgb(255,255,255)0%,rgba(99,99,99)calc(100% - 62px),rgba(255,255,255)100%)!important;}#cts-chat-content>.message{background:#101314a8;}.message{color:#FFF;text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;}"],
  471. [".PMPopup .PMContent{background: #2d373ADB;}.PMPopup h2{background:linear-gradient(0deg,rgb(0, 0, 0)0%,rgb(58, 58, 58)8px,rgb(30, 30, 30)100%);}#videos-footer-broadcast-wrapper>.waiting{background:#53b6ef;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button{background:#53b6ef!important;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button:hover{background:#3d89b5!important;}#videos-footer-push-to-talk{background:#53b6ef}#videos-footer-push-to-talk:hover{background:#3d89b5}#videos-footer-broadcast:hover{background:#3d89b5}#videos-footer-broadcast{background:#53b6ef;}"],
  472. ["#sidemenu{background: linear-gradient(0deg,rgb(0, 0, 0)0%,rgb(25,25,25)8px,rgb(76,76,76)100%);}"]
  473. ],
  474. [ //STYLE #2
  475. ["#chat-wrapper{background:linear-gradient(0deg,rgb(121,24,188)0%,rgb(36,15,45)calc(100% - 62px),rgb(121,24,188)100%)!important;}#cts-chat-content>.message{background:#101314a8;}.message{color:#FFF;text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;}"],
  476. [".PMPopup .PMContent{background: #2d373ADB;}.PMPopup h2{background:linear-gradient(0deg,rgb(0, 0, 0)0%,rgb(83, 17, 128)8px,rgb(68, 15, 103)100%);}#videos-footer-broadcast-wrapper>.waiting{background:#7918bc;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button{background:#7918bc!important;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button:hover{background:#460b6f!important;}#videos-footer-push-to-talk{background:#7918bc}#videos-footer-push-to-talk:hover{background:#460b6f}#videos-footer-broadcast:hover{background:#460b6f}#videos-footer-broadcast{background:#7918bc;}"],
  477. ["#sidemenu{background: linear-gradient(0deg,rgb(0, 0, 0)0%,rgb(13,5,15)8px,rgb(121,24,188)100%);}"]
  478. ],
  479. [ //STYLE #3
  480. ["#chat-wrapper{background:linear-gradient(0deg,rgb(248,5,5)0%,rgb(81,22,22)calc(100% - 62px),rgba(204,0,0)100%)!important;}#cts-chat-content>.message{background:#101314a8;}.message{color:#FFF;text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;}"],
  481. [".PMPopup .PMContent{background:#2d373ADB;}.PMPopup h2{background:linear-gradient(0deg,rgb(0, 0, 0)0%,rgb(121, 3, 3)8px,rgb(176, 2, 2)100%);}#videos-footer-broadcast-wrapper>.waiting{background:#c10101;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button{background:#c10101!important;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button:hover{background:#6b0f0f!important;}#videos-footer-push-to-talk{background:#c10101}#videos-footer-push-to-talk:hover{background:#6b0f0f}#videos-footer-broadcast:hover{background:#6b0f0f}#videos-footer-broadcast{background:#c10101;}"],
  482. ["#sidemenu{background: linear-gradient(0deg,rgb(0, 0, 0)0%,rgb(15,5,5)8px,rgb(193,1,1)100%);}"]
  483. ],
  484. [ //STYLE #4
  485. ["#chat-wrapper{background:linear-gradient(0deg,rgb(65,144,219)0%,rgb(7,69,97)calc(100% - 62px),rgb(37,179,222)100%)!important;}#cts-chat-content>.message{background:#101314a8;}.message{color:#FFF;text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;}"],
  486. [".PMPopup .PMContent{background: #2d373ADB;}.PMPopup h2{background:linear-gradient(0deg,rgb(0, 0, 0)0%,rgb(26, 59, 75)8px,rgb(59, 130, 170)100%);}#videos-footer-broadcast-wrapper>.waiting{background:#53b6ef;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button{background:#53b6ef!important;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button:hover{background:#3d89b5!important;}#videos-footer-push-to-talk{background:#53b6ef}#videos-footer-push-to-talk:hover{background:#3d89b5}#videos-footer-broadcast:hover{background:#3d89b5}#videos-footer-broadcast{background:#53b6ef;}"],
  487. ["#sidemenu{background: linear-gradient(0deg,rgb(0, 0, 0)0%,rgb(5,14,15)8px,rgb(83,182,239)100%);}"]
  488. ],
  489. [ //STYLE #5
  490. ["#chat-wrapper{background:linear-gradient(0deg,rgb(0,158,5)0%,rgb(5,15,5)calc(100% - 62px),rgb(13,181,0)100%)!important;}#cts-chat-content>.message{background:#101314a8;}.message{color:#FFF;text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;}"],
  491. [".PMPopup .PMContent{background:#2d373ADB;}.PMPopup h2{background:linear-gradient(0deg,rgb(0, 0, 0)0%,rgb(13, 96, 7)8px,rgb(8, 48, 6)100%);}#videos-footer-broadcast-wrapper>.waiting{background:#0cae00;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button{background:#0cae00!important;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button:hover{background:#054c00!important;}#videos-footer-push-to-talk{background:#0cae00}#videos-footer-push-to-talk:hover{background:#054c00}#videos-footer-broadcast:hover{background:#054c00}#videos-footer-broadcast{background:#0cae00;}"],
  492. ["#sidemenu{background: linear-gradient(0deg,rgb(0, 0, 0)0%,rgb(5,15,5)8px,rgb(14,104,7)100%);}"]
  493. ],
  494. [ //STYLE #6
  495. ["#chat-wrapper{background:linear-gradient(0deg,rgba(0, 0, 0, 0.69)0%,rgba(0, 0, 0, 0.56)calc(100% - 62px),rgb(13, 179, 0)100%)!important;}#cts-chat-content>.message{background:#101314a8;}.message{color:#FFF;text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;}"],
  496. [".PMPopup .PMContent{background:#2d373ADB;}.PMPopup h2{background:linear-gradient(0deg,rgb(0, 0, 0)0%,rgb(13, 96, 7)8px,rgb(8, 48, 6)100%);}#videos-footer-broadcast-wrapper>.waiting{background:#0cae00;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button{background:#0cae00!important;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button:hover{background:#054c00!important;}#videos-footer-push-to-talk{background:#0cae00}#videos-footer-push-to-talk:hover{background:#054c00}#videos-footer-broadcast:hover{background:#054c00}#videos-footer-broadcast{background:#0cae00;}"],
  497. ["#sidemenu{background: linear-gradient(0deg,rgb(0, 0, 0)0%,rgba(5, 15, 5, 0.72)8px,rgba(0, 0, 0, 0.42)100%);}"]
  498. ],
  499. [ //STYLE #7
  500. ["#chat-wrapper{background: linear-gradient(0deg,rgb(255, 255, 255)0%,rgba(255, 255, 255, 0.82)calc(100% - 62px),rgb(255, 255, 255)100%)!important;}#cts-chat-content>.message{background:#101314a8;}.message{color:#FFF;text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;}"],
  501. [".PMPopup .PMContent{background:#2d373ADB;}.PMPopup h2{background:linear-gradient(0deg,rgb(0, 0, 0)0%,rgba(255, 255, 255, 0.72)8px,rgba(255, 255, 255, 0.81)100%);}#videos-footer-broadcast-wrapper>.waiting{background:#53b6ef;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button{background:#53b6ef!important;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button:hover{background:#3d89b5!important;}#videos-footer-push-to-talk{background:#53b6ef}#videos-footer-push-to-talk:hover{background:#3d89b5}#videos-footer-broadcast:hover{background:#3d89b5}#videos-footer-broadcast{background:#53b6ef;}"],
  502. ["#sidemenu{background: linear-gradient(0deg,rgb(0, 0, 0)0%,rgba(255, 255, 255, 0.72)8px,rgba(255, 255, 255, 0.81)100%);}"]
  503. ],
  504. [ //STYLE #8
  505. ["#chat-wrapper{background: linear-gradient(0deg,rgba(255, 255, 0, 1)0%,rgba(255, 255, 0, 0.82)calc(100% - 62px),rgba(255, 255, 0, 1)100%)!important;}#cts-chat-content>.message{background:#101314a8;}.message{color:#FFF;text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;}"],
  506. [".PMPopup .PMContent{background: #2d373ADB;}.PMPopup h2{background:linear-gradient(0deg,rgb(0, 0, 0)0%,rgb(234, 236, 5)8px,rgb(180, 187, 15)100%);}#videos-footer-broadcast-wrapper>.waiting{background:#53b6ef;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button{background:#53b6ef!important;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button:hover{background:#3d89b5!important;}#videos-footer-push-to-talk{background:#53b6ef}#videos-footer-push-to-talk:hover{background:#3d89b5}#videos-footer-broadcast:hover{background:#3d89b5}#videos-footer-broadcast{background:#53b6ef;}"],
  507. ["#sidemenu{background: linear-gradient(0deg,rgb(56, 50, 6)0%,rgb(149, 158, 22)8px,rgba(255, 255, 0, 1)100%);}"]
  508. ],
  509. [ //STYLE #9
  510. ["#chat-wrapper{background: linear-gradient(0deg,rgb(119, 45, 2) 0%,rgb(24, 29, 30) 52%,rgb(234, 129, 38) 100%)!important;}#cts-chat-content>.message{background:#101314a8;}.message{color:#FFF;text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;}"],
  511. [".PMPopup .PMContent{background: #2d373ADB;}.PMPopup h2{background:linear-gradient(0deg,rgb(0, 0, 0)0%,rgb(226, 92, 19)8px,rgb(158, 73, 16)100%);}#videos-footer-broadcast-wrapper>.waiting{background:#53b6ef;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button{background:#53b6ef!important;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button:hover{background:#3d89b5!important;}#videos-footer-push-to-talk{background:#53b6ef}#videos-footer-push-to-talk:hover{background:#3d89b5}#videos-footer-broadcast:hover{background:#3d89b5}#videos-footer-broadcast{background:#53b6ef;}"],
  512. ["#sidemenu{background: linear-gradient(0deg,rgb(154, 51, 1)0%,rgba(255, 125, 0, 1)8px,rgba(255, 125, 0, 1)100%);}"]
  513. ],
  514. [ //STYLE #10
  515. ["#chat-wrapper{background: linear-gradient(0deg,rgb(141, 36, 95)0%,rgba(191, 0, 255, 0.82)calc(100% - 62px),rgb(255, 0, 202)100%)!important;}#cts-chat-content>.message{background:#101314a8;}.message{color:#FFF;text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;}"],
  516. [".PMPopup .PMContent{background: #2d373ADB;}.PMPopup h2{background:linear-gradient(0deg,rgb(0, 0, 0)0%,rgb(150, 0, 175)8px,rgb(176, 0, 226)100%);}#videos-footer-broadcast-wrapper>.waiting{background:#53b6ef;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button{background:#53b6ef!important;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button:hover{background:#3d89b5!important;}#videos-footer-push-to-talk{background:#53b6ef}#videos-footer-push-to-talk:hover{background:#3d89b5}#videos-footer-broadcast:hover{background:#3d89b5}#videos-footer-broadcast{background:#53b6ef;}"],
  517. ["#sidemenu{background: linear-gradient(0deg,rgb(94, 3, 62)0%,rgb(191, 0, 255)8px,rgb(71, 0, 20)100%);}"]
  518. ],
  519. [ //STYLE #11
  520. ["#cts-chat-content>.message{background:#101314;}#chat-wrapper{background: repeating-linear-gradient(-45deg,rgb(0, 0, 0)1px,rgb(0, 186, 255)3px,rgba(0, 115, 255, 0.49)15px)!important;}#cts-chat-content>.message{background:#101314a8;}.message{color:#FFF;text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;}"],
  521. [".PMPopup .PMContent{background: #2d373ADB;}.PMPopup h2{background:repeating-linear-gradient(-45deg,rgb(0, 0, 0)1px,rgb(0, 186, 255)3px,rgba(0, 115, 255, 0.49)15px);}#videos-footer-broadcast-wrapper>.waiting{background:#53b6ef;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button{background:#53b6ef!important;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button:hover{background:#3d89b5!important;}#videos-footer-push-to-talk{background:#53b6ef}#videos-footer-push-to-talk:hover{background:#3d89b5}#videos-footer-broadcast:hover{background:#3d89b5}#videos-footer-broadcast{background:#53b6ef;}"],
  522. ["#sidemenu{background: repeating-linear-gradient(-45deg,rgb(0, 0, 0)1px,rgb(0, 186, 255)3px,rgba(0, 115, 255, 0.49)15px);}"]
  523. ],
  524. [ //STYLE #12
  525. ["#chat-wrapper{background: #fff!important;}.message>#system_user{color:#FFFFFF}#cts-chat-content>.message{background:#00000000}.message{color:#000000;text-shadow: unset;}"],
  526. [".PMPopup .PMContent{background:#2d373ADB;}.PMPopup h2{background:linear-gradient(0deg,rgb(0, 0, 0)0%,rgba(255, 255, 255, 0.72)8px,rgba(255, 255, 255, 0.81)100%);}#videos-footer-broadcast-wrapper>.waiting{background:#53b6ef;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button{background:#53b6ef!important;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button:hover{background:#3d89b5!important;}#videos-footer-push-to-talk{background:#53b6ef}#videos-footer-push-to-talk:hover{background:#3d89b5}#videos-footer-broadcast:hover{background:#3d89b5}#videos-footer-broadcast{background:#53b6ef;}"],
  527. ["#sidemenu{background: #2d373a;}"]
  528. ],
  529. [ //STYLE #13
  530. ["#chat-wrapper{background: url(https://i.imgur.com/ek4TEsz.jpg)!important;}#cts-chat-content>.message{background:#17951a8c;}.message{color:#FFF;text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;}"],
  531. [".PMPopup .PMContent{background:#2d373ADB;}.PMPopup h2{background:linear-gradient(0deg,rgb(0, 0, 0)0%,rgb(37, 101, 27)8px,rgb(36, 98, 25)100%);}#videos-footer-broadcast-wrapper>.waiting{background:#53b6ef;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button{background:#53b6ef!important;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button:hover{background:#3d89b5!important;}#videos-footer-push-to-talk{background:#53b6ef}#videos-footer-push-to-talk:hover{background:#3d89b5}#videos-footer-broadcast:hover{background:#3d89b5}#videos-footer-broadcast{background:#53b6ef;}"],
  532. ["#sidemenu{background: url(https://i.imgur.com/LCOulGB.png) repeat-x bottom;}"]
  533. ],
  534. [ //STYLE #14
  535. ["#chat-wrapper{background:linear-gradient(0deg,rgba(32,38,40,0.59)0%,rgba(16,14,14,0.76)calc(100% - 62px),rgba(45,55,58,0.72)100%)!important;}#cts-chat-content>.message{background:#101314a8;}.message{color:#FFF;text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;}"],
  536. [".PMPopup .PMContent{background: #2d373ADB;}.PMPopup h2{background:linear-gradient(0deg,rgb(0, 0, 0)0%,rgba(19,19,19,0.73)8px,rgba(0,0,0,0.34)100%);}#videos-footer-broadcast-wrapper>.waiting{background:#53b6ef;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button{background:#53b6ef!important;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button:hover{background:#3d89b5!important;}#videos-footer-push-to-talk{background:#53b6ef}#videos-footer-push-to-talk:hover{background:#3d89b5}#videos-footer-broadcast:hover{background:#3d89b5}#videos-footer-broadcast{background:#53b6ef;}"],
  537. ["#sidemenu{background: linear-gradient(0deg,rgb(0, 0, 0)0%,rgba(19,19,19,0.73)8px,rgba(0,0,0,0.34)100%);}"]
  538. ],
  539. [ //STYLE #14
  540. ["#chat-wrapper{background:linear-gradient(0deg,rgb(255,255,255)0%,rgba(99,99,99)calc(100% - 62px),rgba(255,255,255)100%)!important;}#cts-chat-content>.message{background:#101314a8;}.message{color:#FFF;text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;}"],
  541. [".PMPopup .PMContent{background: #2d373ADB;}.PMPopup h2{background:linear-gradient(0deg,rgb(0, 0, 0)0%,rgb(58, 58, 58)8px,rgb(30, 30, 30)100%);}#videos-footer-broadcast-wrapper>.waiting{background:#53b6ef;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button{background:#53b6ef!important;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button:hover{background:#3d89b5!important;}#videos-footer-push-to-talk{background:#53b6ef}#videos-footer-push-to-talk:hover{background:#3d89b5}#videos-footer-broadcast:hover{background:#3d89b5}#videos-footer-broadcast{background:#53b6ef;}"],
  542. ["#sidemenu{background: linear-gradient(0deg,rgb(0, 0, 0)0%,rgba(19,19,19,0.73)8px,rgba(0,0,0,0.34)100%);}"]
  543. ],
  544. [ //STYLE #15
  545. ["#chat-wrapper{background:linear-gradient(0deg,rgb(121,24,188)0%,rgb(36,15,45)calc(100% - 62px),rgb(121,24,188)100%)!important;}#cts-chat-content>.message{background:#101314a8;}.message{color:#FFF;text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;}"],
  546. [".PMPopup .PMContent{background: #2d373ADB;}.PMPopup h2{background:linear-gradient(0deg,rgb(0, 0, 0)0%,rgb(83, 17, 128)8px,rgb(68, 15, 103)100%);}#videos-footer-broadcast-wrapper>.waiting{background:#7918bc;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button{background:#7918bc!important;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button:hover{background:#460b6f!important;}#videos-footer-push-to-talk{background:#7918bc}#videos-footer-push-to-talk:hover{background:#460b6f}#videos-footer-broadcast:hover{background:#460b6f}#videos-footer-broadcast{background:#7918bc;}"],
  547. ["#sidemenu{background: linear-gradient(0deg,rgb(0, 0, 0)0%,rgba(19,19,19,0.73)8px,rgba(0,0,0,0.34)100%);}"]
  548. ],
  549. [ //STYLE #16
  550. ["#chat-wrapper{background:linear-gradient(0deg,rgb(248,5,5)0%,rgb(81,22,22)calc(100% - 62px),rgba(204,0,0)100%)!important;}#cts-chat-content>.message{background:#101314a8;}.message{color:#FFF;text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;}"],
  551. [".PMPopup .PMContent{background:#2d373ADB;}.PMPopup h2{background:linear-gradient(0deg,rgb(0, 0, 0)0%,rgb(121, 3, 3)8px,rgb(176, 2, 2)100%);}#videos-footer-broadcast-wrapper>.waiting{background:#c10101;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button{background:#c10101!important;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button:hover{background:#6b0f0f!important;}#videos-footer-push-to-talk{background:#c10101}#videos-footer-push-to-talk:hover{background:#6b0f0f}#videos-footer-broadcast:hover{background:#6b0f0f}#videos-footer-broadcast{background:#c10101;}"],
  552. ["#sidemenu{background: linear-gradient(0deg,rgb(0, 0, 0)0%,rgba(19,19,19,0.73)8px,rgba(0,0,0,0.34)100%);}"]
  553. ],
  554. [ //STYLE #17
  555. ["#chat-wrapper{background:linear-gradient(0deg,rgb(65,144,219)0%,rgb(7,69,97)calc(100% - 62px),rgb(37,179,222)100%)!important;}#cts-chat-content>.message{background:#101314a8;}.message{color:#FFF;text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;}"],
  556. [".PMPopup .PMContent{background: #2d373ADB;}.PMPopup h2{background:linear-gradient(0deg,rgb(0, 0, 0)0%,rgb(26, 59, 75)8px,rgb(59, 130, 170)100%);}#videos-footer-broadcast-wrapper>.waiting{background:#53b6ef;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button{background:#53b6ef!important;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button:hover{background:#3d89b5!important;}#videos-footer-push-to-talk{background:#53b6ef}#videos-footer-push-to-talk:hover{background:#3d89b5}#videos-footer-broadcast:hover{background:#3d89b5}#videos-footer-broadcast{background:#53b6ef;}"],
  557. ["#sidemenu{background: linear-gradient(0deg,rgb(0, 0, 0)0%,rgba(19,19,19,0.73)8px,rgba(0,0,0,0.34)100%);}"]
  558. ],
  559. [ //STYLE #18
  560. ["#chat-wrapper{background:linear-gradient(0deg,rgb(0,158,5)0%,rgb(5,15,5)calc(100% - 62px),rgb(13,181,0)100%)!important;}#cts-chat-content>.message{background:#101314a8;}.message{color:#FFF;text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;}"],
  561. [".PMPopup .PMContent{background:#2d373ADB;}.PMPopup h2{background:linear-gradient(0deg,rgb(0, 0, 0)0%,rgb(13, 96, 7)8px,rgb(8, 48, 6)100%);}#videos-footer-broadcast-wrapper>.waiting{background:#0cae00;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button{background:#0cae00!important;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button:hover{background:#054c00!important;}#videos-footer-push-to-talk{background:#0cae00}#videos-footer-push-to-talk:hover{background:#054c00}#videos-footer-broadcast:hover{background:#054c00}#videos-footer-broadcast{background:#0cae00;}"],
  562. ["#sidemenu{background: linear-gradient(0deg,rgb(0, 0, 0)0%,rgba(19,19,19,0.73)8px,rgba(0,0,0,0.34)100%);}"]
  563. ],
  564. [ //STYLE #19
  565. ["#chat-wrapper{background: linear-gradient(0deg,rgb(255, 255, 255)0%,rgba(255, 255, 255, 0.82)calc(100% - 62px),rgb(255, 255, 255)100%)!important;}#cts-chat-content>.message{background:#101314a8;}.message{color:#FFF;text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;}"],
  566. [".PMPopup .PMContent{background:#2d373ADB;}.PMPopup h2{background:linear-gradient(0deg,rgb(0, 0, 0)0%,rgba(255, 255, 255, 0.72)8px,rgba(255, 255, 255, 0.81)100%);}#videos-footer-broadcast-wrapper>.waiting{background:#53b6ef;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button{background:#53b6ef!important;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button:hover{background:#3d89b5!important;}#videos-footer-push-to-talk{background:#53b6ef}#videos-footer-push-to-talk:hover{background:#3d89b5}#videos-footer-broadcast:hover{background:#3d89b5}#videos-footer-broadcast{background:#53b6ef;}"],
  567. ["#sidemenu{background: linear-gradient(0deg,rgb(0, 0, 0)0%,rgba(19,19,19,0.73)8px,rgba(0,0,0,0.34)100%);}"]
  568. ],
  569. [ //STYLE #20
  570. ["#chat-wrapper{background: linear-gradient(0deg,rgba(255, 255, 0, 1)0%,rgba(255, 255, 0, 0.82)calc(100% - 62px),rgba(255, 255, 0, 1)100%)!important;}#cts-chat-content>.message{background:#101314a8;}.message{color:#FFF;text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;}"],
  571. [".PMPopup .PMContent{background: #2d373ADB;}.PMPopup h2{background:linear-gradient(0deg,rgb(0, 0, 0)0%,rgb(234, 236, 5)8px,rgb(180, 187, 15)100%);}#videos-footer-broadcast-wrapper>.waiting{background:#53b6ef;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button{background:#53b6ef!important;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button:hover{background:#3d89b5!important;}#videos-footer-push-to-talk{background:#53b6ef}#videos-footer-push-to-talk:hover{background:#3d89b5}#videos-footer-broadcast:hover{background:#3d89b5}#videos-footer-broadcast{background:#53b6ef;}"],
  572. ["#sidemenu{background: linear-gradient(0deg,rgb(0, 0, 0)0%,rgba(19,19,19,0.73)8px,rgba(0,0,0,0.34)100%);}"]
  573. ],
  574. [ //STYLE #21
  575. ["#chat-wrapper{background: linear-gradient(0deg,rgb(119, 45, 2) 0%,rgb(24, 29, 30) 52%,rgb(234, 129, 38) 100%)!important;}#cts-chat-content>.message{background:#101314a8;}.message{color:#FFF;text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;}"],
  576. [".PMPopup .PMContent{background: #2d373ADB;}.PMPopup h2{background:linear-gradient(0deg,rgb(0, 0, 0)0%,rgb(226, 92, 19)8px,rgb(158, 73, 16)100%);}#videos-footer-broadcast-wrapper>.waiting{background:#53b6ef;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button{background:#53b6ef!important;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button:hover{background:#3d89b5!important;}#videos-footer-push-to-talk{background:#53b6ef}#videos-footer-push-to-talk:hover{background:#3d89b5}#videos-footer-broadcast:hover{background:#3d89b5}#videos-footer-broadcast{background:#53b6ef;}"],
  577. ["#sidemenu{background: linear-gradient(0deg,rgb(0, 0, 0)0%,rgba(19,19,19,0.73)8px,rgba(0,0,0,0.34)100%);}"]
  578. ],
  579. [ //STYLE #22
  580. ["#chat-wrapper{background: linear-gradient(0deg,rgb(141, 36, 95)0%,rgba(191, 0, 255, 0.82)calc(100% - 62px),rgb(255, 0, 202)100%)!important;}#cts-chat-content>.message{background:#101314a8;}.message{color:#FFF;text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;}"],
  581. [".PMPopup .PMContent{background: #2d373ADB;}.PMPopup h2{background:linear-gradient(0deg,rgb(0, 0, 0)0%,rgb(150, 0, 175)8px,rgb(176, 0, 226)100%);}#videos-footer-broadcast-wrapper>.waiting{background:#53b6ef;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button{background:#53b6ef!important;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button:hover{background:#3d89b5!important;}#videos-footer-push-to-talk{background:#53b6ef}#videos-footer-push-to-talk:hover{background:#3d89b5}#videos-footer-broadcast:hover{background:#3d89b5}#videos-footer-broadcast{background:#53b6ef;}"],
  582. ["#sidemenu{background: linear-gradient(0deg,rgb(0, 0, 0)0%,rgba(19,19,19,0.73)8px,rgba(0,0,0,0.34)100%);}"]
  583. ],
  584. [ //STYLE #23
  585. ["#cts-chat-content>.message{background:#101314;}#chat-wrapper{background: repeating-linear-gradient(-45deg,rgb(0, 0, 0)1px,rgb(0, 186, 255)3px,rgba(0, 115, 255, 0.49)15px)!important;}#cts-chat-content>.message{background:#101314a8;}.message{color:#FFF;text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;}"],
  586. [".PMPopup .PMContent{background: #2d373ADB;}.PMPopup h2{background:repeating-linear-gradient(-45deg,rgb(0, 0, 0)1px,rgb(0, 186, 255)3px,rgba(0, 115, 255, 0.49)15px);}#videos-footer-broadcast-wrapper>.waiting{background:#53b6ef;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button{background:#53b6ef!important;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button:hover{background:#3d89b5!important;}#videos-footer-push-to-talk{background:#53b6ef}#videos-footer-push-to-talk:hover{background:#3d89b5}#videos-footer-broadcast:hover{background:#3d89b5}#videos-footer-broadcast{background:#53b6ef;}"],
  587. ["#sidemenu{background: linear-gradient(0deg,rgb(0, 0, 0)0%,rgba(19,19,19,0.73)8px,rgba(0,0,0,0.34)100%);}"]
  588. ]
  589. ];
  590. //INSERT SCRIPT
  591. var script = document.createElement("script"),
  592. elem = document.getElementsByTagName("script")[0];
  593. script.text = 'var StationSelected = 0,\n StationPlay = false,\n StationVol = 1;\nfunction VolStation(elem, vol){\n var StationElem = elem.parentElement.nextSibling;\n var StationVolElem = elem.parentElement.querySelector(".music-radio-info>.volume");\nStationVol += vol;\n if (StationVol < 0){\n StationVol = 0;\n } else if (StationVol > 1) {\n StationVol = 1.0;\n }\n StationElem.volume = StationVol;\nStationVolElem.style.width=((StationVol * 100)+"%");}\nfunction PlayPauseStation(elem) {\n var StationPlayPauseBtn = elem.parentElement.querySelector(".music-radio-playpause");\n var StationElem=elem.parentElement.nextSibling;\nvar StationDescElem=elem.parentElement.querySelector(".music-radio-info>.description");\n StationPlay=!StationPlay;\n if (StationPlay) {\n StationElem.volume = StationVol;\n StationElem.play();\n StationPlayPauseBtn.innerText="❚❚"; StationDescElem.innerText = ("Playing: "+window.CTSRadioStations[StationSelected][0]+"\\nURL: "+window.CTSRadioStations[StationSelected][1]);\n} else {\n StationElem.pause();\nStationPlayPauseBtn.innerText="▶";\n StationDescElem.innerText = ("Paused: "+window.CTSRadioStations[StationSelected][0]+"\\nURL: "+window.CTSRadioStations[StationSelected][1]);}\n}\nfunction SeekStation(elem, direction) {\n var StationElem = elem.parentElement.nextSibling;\n var StationDescElem = elem.parentElement.querySelector(".music-radio-info>.description");\nvar StationPlayPauseBtn = elem.parentElement.querySelector(".music-radio-playpause");\n StationPlay = true;\n StationSelected += direction;\n \n if (StationSelected > window.CTSRadioStations.length-1) {\n StationSelected = 0;\n } else if (StationSelected < 0){\n StationSelected = window.CTSRadioStations.length-1;\n }\n StationElem.pause();\n StationElem.setAttribute("src", window.CTSRadioStations[StationSelected][1]);\n StationElem.load();\n StationElem.volume = StationVol;\nStationPlayPauseBtn.innerText="❚❚";\n StationElem.play();\nStationDescElem.innerText = ("Playing: "+window.CTSRadioStations[StationSelected][0]+"\\nURL: "+window.CTSRadioStations[StationSelected][1]);\n}';
  594. elem.parentNode.insertBefore(script, elem);
  595. //LOCALSETTINGS
  596. CTS.enablePMs = (window.localStorage.tinychat_settings) ? JSON.parse(window.localStorage.tinychat_settings).enablePMs : true;
  597. CTS.enableSound = (window.localStorage.tinychat_settings) ? JSON.parse(window.localStorage.tinychat_settings).enableSound : true;
  598. //TTS (TEXT-TO-SPEECH)
  599. if (CTS.enableSound === true && "speechSynthesis" in window) {
  600. CTS.TTS.synth = window.speechSynthesis;
  601. CTS.TTS.voices = CTS.TTS.synth.getVoices();
  602. }
  603. //ELEMENT DEFINE
  604. MainElement = document.querySelector("tinychat-webrtc-app").shadowRoot;
  605. ChatLogElement = MainElement.querySelector("tc-chatlog").shadowRoot;
  606. VideoListElement = MainElement.querySelector("tc-videolist").shadowRoot;
  607. MicrophoneElement = document.createEvent("MouseEvent");
  608. SideMenuElement = MainElement.querySelector("tc-sidemenu").shadowRoot;
  609. TitleElement = MainElement.querySelector("tc-title").shadowRoot;
  610. UserListElement = SideMenuElement.querySelector("tc-userlist").shadowRoot;
  611. ModerationListElement = SideMenuElement.querySelector("tc-video-moderation").shadowRoot;
  612. ChatListElement = SideMenuElement.querySelector("tc-chatlist").shadowRoot;
  613. UserContextElement = UserListElement.querySelector("tc-user-contextmenu").shadowRoot;
  614. var insert = TitleElement.querySelector('span[title="Settings"]');
  615. VideoListElement.querySelector("#videos-header").appendChild(insert);
  616. //INSERT HTML/CSS
  617. if (!CTS.Project.isTouchScreen) {
  618. insert = VideoListElement.querySelector("#videos-footer-broadcast-wrapper");
  619. VideoListElement.querySelector("#videolist").appendChild(insert);
  620. VideoListElement.querySelector("#videos-footer").insertAdjacentHTML("afterbegin", "Media");
  621. VideoListElement.querySelector("#videos-footer").insertAdjacentHTML("beforeend", '<div id="music-radio"><div class="music-radio-info"><div class="description">Playing: None<br>URL: None</div><div class="volume"></div></div><button class="music-radio-seek" onclick="SeekStation(this,-1);">&#8592;</button><button class="music-radio-seek" onclick="SeekStation(this,1);">&#8594;</button><button class="music-radio-playpause" onclick="PlayPauseStation(this);">&#9654;</button><button class="music-radio-vol" onclick="VolStation(this,.05);">&#43;</button><button class="music-radio-vol" style="top:50%" onclick="VolStation(this,-.05);">&#45;</button></div><audio id="music-radio-audio" src="' + window.CTSRadioStations[0][1] + '"></audio>');
  622. TitleCSS += "span[title=\"Follow\"], span[title=\"Share room\"]{display:none!important;}";
  623. } else {
  624. VideoCSS = "#videos-footer-broadcast{border-radius:unset!important;}#videos-footer-broadcast-wrapper > #videos-footer-submenu-button{border-radius:unset;}#videos-footer-push-to-talk{margin-left:0!important;border-radius:unset;}#videos-footer-youtube, #videos-footer-soundcloud{min-width:35px;border-radius:unset;margin-right: 0;}@media screen and (max-width: 600px){#videos-footer-broadcast, #videos-footer-broadcast-wrapper.hide-submenu > #videos-footer-broadcast {height:50px;line-height:50px;}#videos-footer{min-height: 50px;padding:0}}span[title=\"Settings\"]>svg{padding:7px 10px;height:24px;width:24px;}#videolist[data-mode=\"dark\"]{background-color:unset;}#videos-footer-broadcast-wrapper{display:contents;}.video:after{content: unset;border:unset;}#videos-header{padding:0;background:#181d1e;}.ctsdrop{position:fixed;display:inline-block;top:3px;left:4px;z-index:5;min-width: 46px;}.ctsdrop-content{position:absolute;top:28px;right:0;background:#181d1e;min-width:46px;width: 46px;padding:0;z-index:1;display:none;}.ctsdrop:hover .ctsdrop-content{display:block;}.ctsoptions:hover{background:#53b6ef}.ctsoptions{width:46px;height:28px;z-index: 2;cursor: pointer;top: 4px;background: #181d1e75;border: none;padding: 5% 0;display: inline-block;}";
  625. MainCSS += "body{overflow:auto;}";
  626. ContextMenuCSS = ".context.show{height:100%;}.context:after{content:unset;}.context>span{text-shadow:-1px 0 black,0 1px black,1px 0 black,0 -1px black;font:800 14px sans-serif;color:#FFFFFF;display:inline-block;padding:1px 1%;line-height:17px;height:17px;}.context{background:#101314;position:unset;padding:0;height:0;transition:.25s;}";
  627. UserListCSS += "#contextmenu{top:unset;bottom:0;left:0;}";
  628. }
  629. ChatLogElement.querySelector("style").insertAdjacentHTML("beforeend", ChatboxCSS);
  630. StyleSet();
  631. document.body.querySelector("style").insertAdjacentHTML("beforeend", MainCSS);
  632. MainElement.querySelector("style").insertAdjacentHTML("beforeend", RoomCSS);
  633. VideoListElement.querySelector("style").insertAdjacentHTML("beforeend", NotificationCSS);
  634. VideoListElement.querySelector("style").insertAdjacentHTML("beforeend", VideoCSS);
  635. SideMenuElement.querySelector("style").insertAdjacentHTML("beforeend", SideMenuCSS);
  636. UserListElement.querySelector("style").insertAdjacentHTML("beforeend", UserListCSS);
  637. ChatListElement.querySelector("style").insertAdjacentHTML("beforeend", ChatListCSS);
  638. ModerationListElement.querySelector("style").insertAdjacentHTML("beforeend", ModeratorCSS);
  639. UserContextElement.querySelector("style").insertAdjacentHTML("beforeend", ContextMenuCSS);
  640. TitleElement.querySelector("style").insertAdjacentHTML("beforeend", TitleCSS);
  641. UserListElement.querySelector("#button-banlist").insertAdjacentHTML("beforebegin", "<span>1</span>");
  642. VideoListElement.querySelector("#videos-header").insertAdjacentHTML("afterbegin", "<button style=\"display:" + ((CTS.Project.isTouchScreen) ? "none" : "block") + "\" class=\"tcsettings\">←</button>");
  643. VideoListElement.querySelector("#videos-content").insertAdjacentHTML("beforeend", '<div id="popup" class="PMOverlay"></div>');
  644. VideoListElement.querySelector("#videolist").insertAdjacentHTML("afterbegin", '<div class="ctsdrop"><button class="ctsoptions" title="CTS Options"><img src="https://i.imgur.com/nvr9FjM.png" /></button><div class="ctsdrop-content"><div style="height:6px;background:#624482;"></div><button id="BackgroundUpdateRight" class="ctsoptions" title="Background"><img src="https://i.imgur.com/Zn97vqS.png" /></button><button id="BackgroundUpdateLeft" class="ctsoptions" title="Background"><img src="https://i.imgur.com/OAcfZRy.png" /></button><div style="height:6px;background:#624482;"></div><button id="FontSizeUpdate" class="ctsoptions" title="Font Size"><img src="https://i.imgur.com/eVc0N5A.png" /></button><div style="height:6px;background:#624482;"></div><button id="ChatColor" class="ctsoptions" title="Chat Style"><img src="https://i.imgur.com/62jpRbt.png" /></button><button id="CameraBorderToggled" class="ctsoptions" title="Camera Border"><img src="https://i.imgur.com/BXK3MR2.png" /></button><button id="FeaturedToggled" class="ctsoptions" title="YouTube/Featured Resize"><img src="https://i.imgur.com/u8mBZYJ.png" /></button>' + ((!CTS.ThemeChange) ? '<button id="ChatWidthToggled" class="ctsoptions" title="Chat Resize"><img src="https://i.imgur.com/G95jVFI.png" /></button><button id="ChatHeightToggled" class="ctsoptions" title="Chat Resize"><img src="https://i.imgur.com/AGc7mLN.png" /></button><div style="height:6px;background:#624482;"></div>' : '') + '<button id="PerformanceModeToggled" class="ctsoptions" title="Performance Mode"><img src="https://i.imgur.com/qoKTU4y.png" /></button>' + ((!CTS.Project.isTouchScreen) ? '<div style="height:6px;background:#624482;"></div><button id="ThemeChange" class="ctsoptions" title="Switch CTS Theme Mode"><img src="https://i.imgur.com/NF6U3Us.png" /></button></div></div>' : ''));
  645. ChatLogElement.querySelector("#chat-position").insertAdjacentHTML("afterbegin", '<div id="notification-content"></div><button class="notifbtn">▼</button>');
  646. ChatLogElement.querySelector("#chat").insertAdjacentHTML("beforeend", '<div id="cts-chat-content"></div>');
  647. ChatLogElement.querySelector("#chat").insertAdjacentHTML("afterend", '<div class="cts-message-unread" style="display:none;">There are unread messages!</div>');
  648. //SCRIPT INIT -> PREPARE()
  649. clearInterval(CTS.ScriptLoading);
  650. CTS.ScriptInit = true;
  651. CTSRoomPrepare();
  652. }
  653.  
  654. function CTSRoomPrepare() {
  655. //FUNCTION BYPASS
  656. window.TinychatApp.BLL.Videolist.prototype.blurOtherVids = function() {};
  657. window.TinychatApp.BLL.SoundPlayer.playMessage = function() {};
  658. window.TinychatApp.BLL.SoundPlayer.playGift = function() {};
  659. window.TinychatApp.BLL.User.isSubscription = function() {
  660. return true;
  661. };
  662. window.TinychatApp.BLL.User.canUseFilters = function() {
  663. return true;
  664. };
  665. window.TinychatApp.BLL.MediaConnection.prototype.Close = function() {
  666. RTC(this);
  667. };
  668. window.TinychatApp.BLL.ChatRoom.prototype.sendPushForUnreadPrivateMessage = function() {};
  669. if (!CTS.Project.isTouchScreen) {
  670. window.TinychatApp.BLL.ChatRoom.prototype.BroadcastStart = function(a) {
  671. var b = this,
  672. d = this.settings.getSettings();
  673. if (d.video === null) {
  674. return void this.app.MediaSettings(() => {
  675. this.BroadcastStart();
  676. });
  677. }
  678. this.videolist.AddingVideoSelf(this.self_handle);
  679. var e = {};
  680. if (!navigator.mediaDevices || !navigator.mediaDevices.enumerateDevices) {
  681. e.audio = true;
  682. e.video = {
  683. width: {
  684. min: 320,
  685. max: 4096
  686. },
  687. height: {
  688. min: 240,
  689. max: 2160
  690. },
  691. frameRate: {
  692. min: 15,
  693. ideal: 30,
  694. max: 60
  695. }
  696. };
  697. } else {
  698. navigator.mediaDevices.enumerateDevices().then(g => {
  699. var h = false;
  700. var len = g.length;
  701. for (var c = 0; c < len; c++) {
  702. if (g[c].kind === "videoinput") {
  703. if (e.video === void 0) e.video = {
  704. width: {
  705. min: 320,
  706. max: 4096
  707. },
  708. height: {
  709. min: 240,
  710. max: 2160
  711. },
  712. frameRate: {
  713. min: 15,
  714. ideal: 30,
  715. max: 60
  716. }
  717. };
  718. if (h) {
  719. d.video = g[c];
  720. h = false;
  721. this.settings.saveSettings(d);
  722. } else if (d.video === null) {
  723. d.video = g[c];
  724. this.settings.saveSettings(d);
  725. } else if (d.video !== null && typeof d.video == "object" && d.video.deviceId == g[c].deviceId && d.video.deviceId !== a) {
  726. e.video.deviceId = {
  727. exact: d.video.deviceId
  728. };
  729. } else if (d.video.deviceId === a) {
  730. h = true;
  731. }
  732. }
  733. if (g[c].kind === "audioinput") {
  734. if (e.audio === void 0) e.audio = {};
  735. if (d.audio !== null && typeof d.audio == "object" && d.audio.deviceId == g[c].deviceId) {
  736. e.audio = {
  737. deviceId: {
  738. exact: d.audio.deviceId
  739. },
  740. };
  741. }
  742. }
  743. }
  744. if (e.video !== null && d.video !== null && d.video.deviceId == b.id__miconly) delete e.video;
  745. let i = navigator.mediaDevices.getSupportedConstraints();
  746. for (let a in i) {
  747. if (i.hasOwnProperty(a) && "echoCancellation" == a && e.audio) e.audio[a] = this.settings.isAcousticEchoCancelation();
  748. }
  749. if (!(e.audio || e.video)) {
  750. b.onMediaFailedCallback(new Error("No media devices to start broadcast."));
  751. } else if ("https:" === location.protocol || this.app.isDebug()) {
  752. debug("BROADCAST", "Initiating Media...");
  753. var m = new window.TinychatApp.BLL.BroadcastProgressEvent(window.TinychatApp.BLL.BroadcastProgressEvent.MEDIA_START);
  754. this.EventBus.broadcast(window.TinychatApp.BLL.BroadcastProgressEvent.ID, m);
  755. b.mediaLastConstraints = e;
  756. navigator.mediaDevices.getUserMedia(e).then(m => {
  757. b.onMediaSuccessCallback(m);
  758. });
  759. }
  760. }).catch(er => {
  761. debug("CAMERA::ERROR", er);
  762. });
  763. }
  764. };
  765. }
  766. window.TinychatApp.BLL.Userlist.prototype.ignore = function(a) {
  767. var b = a.isUsername ? a.username : a.nickname;
  768. if (this.isIgnored(a) || this.ignored.push(b)) {
  769. var c = new window.TinychatApp.BLL.IgnorelistUpdateUserEvent(a);
  770. this.EventBus.broadcast(window.TinychatApp.BLL.IgnorelistUpdateUserEvent.ID, c);
  771. this.app.showToast(b + " ignored successfully till they leave or you refresh!");
  772. CTS.TempIgnoreList.push(b.toUpperCase());
  773. Cameras();
  774. }
  775. };
  776. window.TinychatApp.BLL.Userlist.prototype.unignore = function(a) {
  777. var b = a.isUsername ? a.username : a.nickname,
  778. len = this.ignored.length;
  779. for (var TI = 0; TI < len; TI++) {
  780. if (CTS.TempIgnoreList[TI] === b.toUpperCase()) {
  781. this.ignored.splice(TI, 1);
  782. break;
  783. }
  784. }
  785. len = CTS.TempIgnoreList.length;
  786. for (TI = 0; TI < len; TI++) {
  787. if (CTS.TempIgnoreList[TI] === b.toUpperCase()) {
  788. CTS.TempIgnoreList.splice(TI, 1);
  789. break;
  790. }
  791. }
  792. var e = new window.TinychatApp.BLL.IgnorelistUpdateUserEvent(a);
  793. this.EventBus.broadcast(window.TinychatApp.BLL.IgnorelistUpdateUserEvent.ID, e);
  794. this.app.showToast(a.username + " unignored");
  795. };
  796. //REMOVE
  797. Remove(ChatLogElement, 'span[id="input-unread"]');
  798. Remove(ChatLogElement, "#chat-content");
  799. //PARAM REMOVE
  800. if (CTS.enablePMs === false) Remove(ChatListElement, "#chatlist");
  801. //LOAD
  802. CTSRoomLoad();
  803. }
  804.  
  805. function CTSRoomLoad() {
  806. var element;
  807. //EVENT LISTENERS
  808. if (!CTS.ThemeChange) {
  809. // BOOT UP OG THEME
  810. var finishoff = false;
  811. while (CTS.OGStyle.SavedHeight !== CTS.OGStyle.HeightCounter || CTS.OGStyle.SavedWidth !== CTS.OGStyle.WidthCounter) {
  812. if (CTS.OGStyle.SavedHeight !== CTS.OGStyle.HeightCounter) {
  813. ChatHeightToggled();
  814. } else {
  815. finishoff = true;
  816. }
  817. if (CTS.OGStyle.SaveWidth !== CTS.OGStyle.WidthCounter && finishoff) ChatWidthToggled();
  818. }
  819. VideoListElement.querySelector("#ChatHeightToggled").addEventListener("click", function() {
  820. ChatHeightToggled();
  821. Save("OGStyleHeight", CTS.OGStyle.HeightCounter);
  822. }, {
  823. passive: true
  824. });
  825. VideoListElement.querySelector("#ChatWidthToggled").addEventListener("click", function() {
  826. ChatWidthToggled();
  827. Save("OGStyleWidth", JSON.stringify(CTS.OGStyle.WidthCounter));
  828. }, {
  829. passive: true
  830. });
  831. } else {
  832. if (!CTS.Project.isTouchScreen) {
  833. element = document.createElement("div");
  834. element.setAttribute("id", "chat-hide");
  835. ChatLogElement.querySelector("#chat-wider").parentNode.insertBefore(element, ChatLogElement.querySelector("#chat-wider"));
  836. ChatLogElement.querySelector("#chat-hide").addEventListener("click", function() {
  837. ChatHide();
  838. }, {
  839. passive: true
  840. });
  841. }
  842. }
  843. element = document.createElement("div");
  844. element.setAttribute("id", "chat-download");
  845. ChatLogElement.querySelector("#chat-wrapper").appendChild(element);
  846. ChatLogElement.querySelector("#chat-download").addEventListener("click", function() {
  847. var len = CTS.UserList.length,
  848. t = "Users : " + len + "\n",
  849. c;
  850. for (c = 0; c < len; c++) {
  851. if (c) { // 0 = false
  852. t += ", ";
  853. if (c % 10 === 0) t += "\n";
  854. }
  855. t += CTS.UserList[c].username + " (" + CTS.UserList[c].nick + ")";
  856. }
  857. t += "\n\n";
  858. len = CTS.Message[CTS.ActiveMessage].length;
  859. for (c = 0; c < len; c++) t += "[" + CTS.Message[CTS.ActiveMessage][c].time + "][" + CTS.Message[CTS.ActiveMessage][c].username + "(" + CTS.Message[CTS.ActiveMessage][c].nick + ")]: " + (CTS.Message[CTS.ActiveMessage][c].msg.replace(/(\r\n|\n|\r)/gm, "") + "\n");
  860. Download("TinyChat_" + CTS.Room.Name.toUpperCase() + " " + DateTime() + ".log", "Room : " + CTS.Room.Name + "\n" + t);
  861. }, {
  862. passive: true
  863. });
  864. if (!CTS.Project.isTouchScreen) {
  865. VideoListElement.querySelector("#ThemeChange").addEventListener("click", function() {
  866. CTS.ThemeChange = !CTS.ThemeChange;
  867. Save("ThemeChange", JSON.stringify(CTS.ThemeChange));
  868. location.reload();
  869. }, {
  870. passive: true
  871. });
  872. }
  873. VideoListElement.querySelector("#PerformanceModeToggled").addEventListener("click", function() {
  874. if (CTS.ChatDisplay) {
  875. CTS.PerformanceMode = !CTS.PerformanceMode;
  876. Save("PerformanceMode", JSON.stringify(CTS.PerformanceMode));
  877. PerformanceModeInit(CTS.PerformanceMode);
  878. }
  879. }, {
  880. passive: true
  881. });
  882. VideoListElement.querySelector("#FeaturedToggled").addEventListener("click", function() {
  883. CTS.Featured = !CTS.Featured;
  884. Save("Featured", JSON.stringify(CTS.Featured));
  885. FeaturedCameras(CTS.Featured);
  886. Resize();
  887. }, {
  888. passive: true
  889. });
  890. VideoListElement.querySelector("#CameraBorderToggled").addEventListener("click", function() {
  891. CTS.CameraBorderToggle = !CTS.CameraBorderToggle;
  892. Save("CameraBorderToggle", JSON.stringify(CTS.CameraBorderToggle));
  893. Cameras();
  894. Resize();
  895. }, {
  896. passive: true
  897. });
  898. VideoListElement.querySelector("#ChatColor").addEventListener("click", function() {
  899. CTS.ChatStyleCounter++;
  900. Remove(VideoListElement, "style[id=\"" + (CTS.ChatStyleCounter - 1) + "\"]");
  901. Remove(ChatLogElement, "style[id=\"" + (CTS.ChatStyleCounter - 1) + "\"]");
  902. Remove(SideMenuElement, "style[id=\"" + (CTS.ChatStyleCounter - 1) + "\"]");
  903. var len = window.CTSChatCSS.length - 1;
  904. if (CTS.ChatStyleCounter > len) CTS.ChatStyleCounter = 0;
  905. StyleSet();
  906. Save("ChatStyle", CTS.ChatStyleCounter);
  907. }, {
  908. passive: true
  909. });
  910. ChatLogElement.querySelector(".cts-message-unread").addEventListener("click", function() {
  911. UpdateScroll(1, true);
  912. CheckUnreadMessage();
  913. }, {
  914. passive: true
  915. });
  916. ChatLogElement.querySelector("#chat").addEventListener("scroll", function(event) {
  917. var element = event.target;
  918.  
  919. if (Math.floor(element.scrollTop + 50) >= (element.scrollHeight - element.offsetHeight)) CheckUnreadMessage(true);
  920. }, {
  921. passive: true
  922. });
  923. ChatLogElement.querySelector("#notification-content").addEventListener("scroll", function(event) {
  924. var element = event.target;
  925. if (Math.floor(element.scrollTop + 50) >= (element.scrollHeight - element.offsetHeight)) CTS.NotficationScroll = true;
  926. }, {
  927. passive: true
  928. });
  929. if (CTS.NotificationToggle === 0) {
  930. ChatLogElement.querySelector(".notifbtn").addEventListener("click", NotificationResize, {
  931. passive: true
  932. });
  933. }
  934. VideoListElement.querySelector(".tcsettings").addEventListener("click", function(event) {
  935. var arg;
  936. if (this.innerText === "→") {
  937. this.innerText = "←";
  938. arg = "block";
  939. } else {
  940. this.innerText = "→";
  941. arg = "none";
  942. }
  943. VideoListElement.querySelector("#videos-header-sound").style.display = arg;
  944. if (CTS.Room.PTT === false) VideoListElement.querySelector("#videos-header-mic").style.display = arg;
  945. //VideoListElement.querySelector("#videos-header-snapshot").style.display = arg;
  946. VideoListElement.querySelector("#videos-header-fullscreen").style.display = arg;
  947. VideoListElement.querySelector("span[title=\"Settings\"]").style.display = arg;
  948. }, {
  949. passive: true
  950. });
  951. VideoListElement.querySelector("button[id=\"BackgroundUpdateLeft\"]").addEventListener("click", function() {
  952. if (!Addon.active("BGIMG")) {
  953. CTS.MainBackgroundCounter++;
  954. if (CTS.MainBackgroundCounter === window.CTSImages.length) CTS.MainBackgroundCounter = 0;
  955. var background = "url(\"" + window.CTSImages[CTS.MainBackgroundCounter] + "\") rgb(0, 0, 0) no-repeat";
  956. document.body.style.background = background;
  957. Save("MainBackground", background);
  958. }
  959. }, {
  960. passive: true
  961. });
  962. VideoListElement.querySelector("button[id=\"BackgroundUpdateRight\"]").addEventListener("click", function() {
  963. if (!Addon.active("BGIMG")) {
  964. CTS.MainBackgroundCounter--;
  965. if (CTS.MainBackgroundCounter === -1) CTS.MainBackgroundCounter = window.CTSImages.length - 1;
  966. var background = "url(\"" + window.CTSImages[CTS.MainBackgroundCounter] + "\") rgb(0, 0, 0) no-repeat";
  967. document.body.style.background = background;
  968. Save("MainBackground", background);
  969. }
  970. }, {
  971. passive: true
  972. });
  973. VideoListElement.querySelector("button[id=\"FontSizeUpdate\"]").addEventListener("click", function() {
  974. CTS.FontSize += 5;
  975. if (CTS.FontSize >= 40) CTS.FontSize = 15;
  976. Save("FontSize", CTS.FontSize);
  977. ChatLogElement.querySelector("#textarea").style.fontSize = (CTS.FontSize - 4) + "px";
  978. }, {
  979. passive: true
  980. });
  981. //MUTATION OBSERVERS
  982. new MutationObserver(function() {
  983. LoadMessage();
  984. }).observe(ChatLogElement.querySelector("#chat-instant"), {
  985. attributes: true,
  986. attributeFilter: ["class"],
  987. childList: false,
  988. characterData: false
  989. });
  990. new MutationObserver(function() {
  991. Cameras();
  992. }).observe(VideoListElement.querySelector(".videos-items:first-child"), {
  993. childList: true
  994. });
  995. new MutationObserver(function() {
  996. Cameras();
  997. }).observe(VideoListElement.querySelector(".videos-items:last-child"), {
  998. childList: true
  999. });
  1000. new MutationObserver(function() {
  1001. if (CTS.AutoMicrophone) {
  1002. OpenMicrophone();
  1003. }
  1004. }).observe(VideoListElement.querySelector("#videos-footer-broadcast-wrapper"), {
  1005. attributes: true,
  1006. attributeFilter: ["class"]
  1007. });
  1008. //BOOT UP - FIRST START
  1009. NotificationDisplay();
  1010. FeaturedCameras(CTS.Featured);
  1011. Cameras();
  1012. }
  1013. //YOUTUBE FUNCTIONS
  1014. function CheckHost() {
  1015. if (CTS.Host === 0) {
  1016. Send("msg", "!whoisbot");
  1017. CTS.HostAttempt = 0;
  1018. CTS.HostWaiting = true;
  1019. }
  1020. }
  1021.  
  1022. function SetBot() {
  1023. if (arguments[0]) CTS.Game.NoReset = true;
  1024. Send("msg", "!bot");
  1025. CTS.HostWaiting = false;
  1026. }
  1027.  
  1028. function CheckYouTube() {
  1029. //CHECK YOUTUBE LINK VIA REGEX (NEARLY EVERY LINK ALLOWED SOME FORMATTING REQUIRED ON PLAYLIST)
  1030. if (arguments[3] === undefined) arguments[3] = true;
  1031. CTS.YouTube.XHR.type = arguments[1];
  1032. var videoid = arguments[0].match(/http(?:s)?(?:\:\/\/)(?:w{1,3}\.)?(?:youtu(?:\.be|be.com))(?:\/v\/|\/)?(?:watch\?|playlist\?|embed\/|user\/|v\/|\/)(list\=[a-z0-9\-\_]{1,34}|(?:v\=)?[a-z0-9\-\_]{1,11})/i);
  1033. if (videoid !== null) {
  1034. videoid = videoid[1].replace(/v\=/g, "");
  1035. //LINK IS PLAYLIST
  1036. if (videoid.match(/list\=/i)) {
  1037. if (arguments[3]) {
  1038. videoid = videoid.replace(/list\=/, "");
  1039. debug("YOUTUBE::PLAYLIST LINK GATHERER", videoid);
  1040. CTS.YouTube.XHR.open("GET", "https://www.googleapis.com/youtube/v3/playlistItems?playlistId=" + videoid + "&part=snippet&maxResults=25" + ((arguments[2] !== undefined) ? "&pageToken=" + arguments[2] : "") + "&type=video&eventType=completed&key=" + CTS.YouTube.API_KEY);
  1041. CTS.YouTube.XHR.send();
  1042. }
  1043. } else {
  1044. //LINK IS REGULAR
  1045. CTS.YouTube.XHR.videoid = videoid;
  1046. CTS.YouTube.VideoReturn = true;
  1047. CTS.YouTube.XHR.open("GET", "https://www.googleapis.com/youtube/v3/videos?id=" + CTS.YouTube.XHR.videoid + "&type=video&eventType=completed&part=contentDetails,snippet&fields=items/snippet/title,items/snippet/thumbnails/medium,items/contentDetails/duration&eventType=completed&key=" + CTS.YouTube.API_KEY);
  1048. CTS.YouTube.XHR.send();
  1049. debug("YOUTUBE::LINK SEARCH", CTS.YouTube.XHR.videoid);
  1050. }
  1051. } else {
  1052. //KEYWORD SEARCH
  1053. if (CTS.YouTube.MessageQueueList.length <= 0) {
  1054. arguments[0] = arguments[0].replace(/^(!yt )/, "");
  1055. CTS.YouTube.SearchReturn = true;
  1056. CTS.YouTube.XHR.open("GET", "https://www.googleapis.com/youtube/v3/search?key=" + CTS.YouTube.API_KEY + "&maxResults=1&q=" + encodeURI(arguments[0]) + "&type=video&part=snippet");
  1057. CTS.YouTube.XHR.send();
  1058. debug("YOUTUBE::KEYWORD SEARCH", arguments[0]);
  1059. }
  1060. }
  1061. }
  1062.  
  1063. function YouTubePlayList() {
  1064. CTS.YouTube.ShowQueue = (arguments[0] !== undefined) ? true : false;
  1065. if ((!CTS.YouTube.Playing && CTS.Host == CTS.Me.handle) || CTS.YouTube.Clear === true || CTS.YouTube.ShowQueue === true) Send("yut_playlist");
  1066. }
  1067.  
  1068. function YouTubeTrackAdd() {
  1069. if (CTS.YouTube.MessageQueueList[0] !== undefined) {
  1070. if (CTS.YouTube.Busy === false) {
  1071. if (CTS.YouTube.MessageQueueList.length > 0) {
  1072. debug("YOUTUBE::ID", CTS.YouTube.MessageQueueList[0].snippet.resourceId.videoId);
  1073. CTS.YouTube.XHR.open("GET", "https://www.googleapis.com/youtube/v3/videos?id=" + CTS.YouTube.MessageQueueList[0].snippet.resourceId.videoId + "&type=video&eventType=completed&part=contentDetails,snippet&fields=items/snippet/title,items/snippet/thumbnails/medium,items/contentDetails/duration&eventType=completed&key=" + CTS.YouTube.API_KEY);
  1074. CTS.YouTube.XHR.videoid = CTS.YouTube.MessageQueueList[0].snippet.resourceId.videoId;
  1075. CTS.YouTube.XHR.send();
  1076. CTS.YouTube.MessageQueueList.shift();
  1077. }
  1078. }
  1079. }
  1080. }
  1081.  
  1082. function YouTubePlayListItems() {
  1083. var len = arguments[0].length;
  1084. for (var i = 0; i < len; i++) {
  1085. if (CTS.YouTube.NotPlayable.includes(arguments[0][i].snippet.title) === false) {
  1086. CTS.YouTube.MessageQueueList.push(arguments[0][i]);
  1087. }
  1088. }
  1089. }
  1090.  
  1091. function YouTubeTimeConvert() {
  1092. //TIME CONVERSION FOR APPROPRIATE YOUTUBE DURATION TO SEND BACK
  1093. var a = arguments[0].match(/\d+/g);
  1094. if (arguments[0].indexOf("M") >= 0 && arguments[0].indexOf("H") == -1 && arguments[0].indexOf("S") == -1) a = [0, a[0], 0];
  1095. if (arguments[0].indexOf("H") >= 0 && arguments[0].indexOf("M") == -1) a = [a[0], 0, a[1]];
  1096. if (arguments[0].indexOf("H") >= 0 && arguments[0].indexOf("M") == -1 && arguments[0].indexOf("S") == -1) a = [a[0], 0, 0];
  1097. var len = a.length;
  1098. arguments[0] = 0;
  1099. if (len == 3) {
  1100. arguments[0] = arguments[0] + parseInt(a[0]) * 3600;
  1101. arguments[0] = arguments[0] + parseInt(a[1]) * 60;
  1102. arguments[0] = arguments[0] + parseInt(a[2]);
  1103. }
  1104. if (len == 2) {
  1105. arguments[0] = arguments[0] + parseInt(a[0]) * 60;
  1106. arguments[0] = arguments[0] + parseInt(a[1]);
  1107. }
  1108. if (len == 1) arguments[0] = arguments[0] + parseInt(a[0]);
  1109. return arguments[0];
  1110. }
  1111.  
  1112. function BotCommandCheck() {
  1113. //USER COMMANDS TO HOST
  1114. if (isCommand(arguments[1])) {
  1115. if (arguments[1].match(/^!play$|^!yt\s|^!ytbypass\s|^!ytclear$|^!ytskip$|^!ytqueue$/i)) {
  1116. BotCommandCheckYT(arguments[0], arguments[1]);
  1117. } else if (arguments[1].match(/^!userkick\s|^!userban\s|^!userclose\s|^!nickkick\s|^!nickban\s|^!nickclose\s/i)) {
  1118. BotCommandCheckJR(arguments[0], arguments[1]);
  1119. } else if (arguments[1].match(/^!whoisbot$|^!8ball\s|^!vote\s|^!coin$|^!chuck$|^!urb\s|^!dad$|^!advice$/i)) {
  1120. BotCommandCheckPUB(arguments[0], arguments[1]);
  1121. } else if (CTS.UserList[arguments[0]].canGame) {
  1122. FishCommandCheck(arguments[0], arguments[1]);
  1123. }
  1124. }
  1125. }
  1126.  
  1127. function BotCommandCheckYT() {
  1128. //ROOM IS PAID AND YOUTUBE IS ONLINE (TC SET)
  1129. if (CTS.Room.YT_ON) {
  1130. if (arguments[1].match(/^!play$/i)) {
  1131. if (CTS.UserList[arguments[0]].mod) YouTubePlayList();
  1132. } else if (arguments[1].match(/^!yt\s/i)) {
  1133. BotCommand(1, arguments[0], arguments[1]);
  1134. } else if (arguments[1].match(/^!ytbypass\s/i)) {
  1135. BotCommand(6, arguments[0], arguments[1]);
  1136. } else if (arguments[1].match(/^!ytclear$/i)) {
  1137. BotCommand(2, arguments[0]);
  1138. } else if (arguments[1].match(/^!ytskip$/i)) {
  1139. BotCommand(3, arguments[0]);
  1140. } else if (arguments[1].match(/^!ytqueue$/i)) {
  1141. BotCommand(4, arguments[0]);
  1142. }
  1143. }
  1144. }
  1145.  
  1146. function BotCommandCheckJR() {
  1147. //MOD/JR.MOD
  1148. if (CTS.BotModList.includes(CTS.UserList[arguments[0]].username) || CTS.UserList[arguments[0]].mod) {
  1149. if (arguments[1].match(/^!userkick\s/i)) {
  1150. ModCommand("kick", arguments[1], true);
  1151. } else if (arguments[1].match(/^!userban\s/i)) {
  1152. ModCommand("ban", arguments[1], true);
  1153. } else if (arguments[1].match(/^!userclose\s/i)) {
  1154. ModCommand("stream_moder_close", arguments[1], true);
  1155. } else if (arguments[1].match(/^!nickkick\s/i)) {
  1156. ModCommand("kick", arguments[1], false);
  1157. } else if (arguments[1].match(/^!nickban\s/i)) {
  1158. ModCommand("ban", arguments[1], false);
  1159. } else if (arguments[1].match(/^!nickclose\s/i)) {
  1160. ModCommand("stream_moder_close", arguments[1], false);
  1161. }
  1162. }
  1163. }
  1164.  
  1165. function BotCommandCheckPUB() {
  1166. if (arguments[1].match(/^!whoisbot$/i)) BotCommand(5, arguments[0]);
  1167. if (arguments[1].match(/^!vote\s/i)) Vote(arguments[0], arguments[1]);
  1168. // PUBLIC COMMANDS
  1169. if (CTS.PublicCommandToggle) {
  1170. if (arguments[1].match(/^!8ball\s[\w\s]*\??/i)) {
  1171. if (CTS.UserList[arguments[0]].mod || isSafeListed(CTS.UserList[arguments[0]].username)) Send("msg", "[8BALL]\n" + window.CTSEightBall[Rand(0, window.CTSEightBall.length - 1)]);
  1172. } else if (arguments[1].match(/^!coin$/i)) {
  1173. if (CTS.UserList[arguments[0]].mod || isSafeListed(CTS.UserList[arguments[0]].username)) Send("msg", "[COIN FLIP]\nThe coin landed on " + ((Rand(0, 1) == 1) ? "heads" : "tails") + "!");
  1174. } else {
  1175. if (arguments[1].match(/^!chuck$/i)) {
  1176. Chuck(CTS.UserList[arguments[0]].username);
  1177. } else if (arguments[1].match(/^!urb\s/i)) {
  1178. Urb(arguments[1], CTS.UserList[arguments[0]].username);
  1179. } else if (arguments[1].match(/^!dad$/i)) {
  1180. Dad(CTS.UserList[arguments[0]].username);
  1181. } else if (arguments[1].match(/^!advice$/i)) {
  1182. Advice(CTS.UserList[arguments[0]].username);
  1183. }
  1184. }
  1185. }
  1186. }
  1187.  
  1188. function BotCheck() {
  1189. if (CTS.UserList[arguments[0]].mod) {
  1190. //CHECK HOST
  1191. if (arguments[1].match(/^!bot$/i)) {
  1192. //SET HOST
  1193. CTS.Host = arguments[2].handle;
  1194. CTS.HostWaiting = false;
  1195. //RESET GAMES
  1196. if (CTS.Host != CTS.Me.handle && CTS.Game.NoReset) CTS.Game.NoReset = false;
  1197. if (arguments[2].handle === CTS.Host && CTS.HostWaiting === false && !CTS.Game.NoReset) {
  1198. if (CTS.Me.handle !== arguments[2].handle) {
  1199. CTS.Game.NoReset = false;
  1200. Fish.reset(true);
  1201. }
  1202. }
  1203. //IF CLIENT(ME) BECOMES HOST CHECK YOUTUBE IF ENABLED
  1204. if (CTS.Me.handle == arguments[2].handle && CTS.Room.YT_ON) YouTubePlayList();
  1205. //ELSE KEEP ON UNLESS HOSTWAITING (!WHOISBOT)
  1206. } else if (CTS.HostWaiting === true) {
  1207. CTS.HostAttempt++;
  1208. //SET BOT IF NO RESPONSE IN 10 MESSAGES or 10 SECONDS
  1209. if (CTS.HostAttempt == 1) {
  1210. setTimeout(function() {
  1211. //CHECK WAITING STATE OR IF HOST HAS CHANGED
  1212. if (CTS.HostWaiting === true && CTS.Host === 0) SetBot(false);
  1213. }, 10000);
  1214. }
  1215. //SETS BOT FORCEFULLY ON 10 MESSAGES CANCELING TIMER EVENT WHEN IT QUEUES
  1216. if (CTS.HostAttempt == 10) SetBot(false);
  1217. }
  1218. }
  1219. }
  1220.  
  1221. function Chuck() {
  1222. //OPEN REQUEST
  1223. if (isSafeListed(arguments[0])) {
  1224. CTS.Chuck.XHR.open("GET", "https://api.chucknorris.io/jokes/random");
  1225. CTS.Chuck.XHR.send();
  1226. }
  1227. }
  1228.  
  1229. function Urb() {
  1230. //CHECK TERM
  1231. if (isSafeListed(arguments[1])) {
  1232. var urban = arguments[0].match(/!urb\s(.*)/i);
  1233. if (urban !== null) {
  1234. //OPEN REQUEST
  1235. CTS.Urb.XHR.open("GET", "https://api.urbandictionary.com/v0/define?term=" + urban[1]);
  1236. CTS.Urb.XHR.send();
  1237. }
  1238. }
  1239. }
  1240.  
  1241. function Dad() {
  1242. //OPEN REQUEST
  1243. if (isSafeListed(arguments[0])) {
  1244. CTS.Dad.XHR.open("GET", "https://icanhazdadjoke.com/");
  1245. CTS.Dad.XHR.setRequestHeader("Accept", "application/json");
  1246. CTS.Dad.XHR.send();
  1247. }
  1248. }
  1249.  
  1250. function Advice() {
  1251. //OPEN REQUEST
  1252. if (isSafeListed(arguments[0])) {
  1253. CTS.Advice.XHR.open("GET", "https://api.adviceslip.com/advice");
  1254. CTS.Advice.XHR.setRequestHeader("Accept", "application/json");
  1255. CTS.Advice.XHR.send();
  1256. }
  1257. }
  1258. //MESSAGE FUNCTION
  1259. function CreateMessage() {
  1260. //SCROLLED UP? MISSED A MESSAGE?
  1261. CheckUnreadMessage();
  1262. // POST NEW CHAT ITEM IF ACTIVECHAT IS OUR CURRENT CHAT
  1263. if (arguments[7] == GetActiveChat()) ChatLogElement.querySelector("#cts-chat-content").insertAdjacentHTML("beforeend", "<div class=\"message" + ((CTS.Avatar) ? " common " : " ") + ((CTS.HighlightList.includes(arguments[3]) || arguments[6]) ? "highlight" : "") + "\" " + ((arguments[2] === "") ? "style=\"padding-left:3px;\"" : "") + ">" + ((arguments[2] == "") ? "" : ((CTS.Avatar) ? "<a href=\"#\" class=\"avatar\"><div><img src=\"" + arguments[2] + "\"></div></a>" : "")) + "<div class=\"nickname\" style=\"background:" + arguments[1] + ";\">" + arguments[4] + (CTS.TimeStampToggle ? "<div class=\"ctstime\"> " + arguments[0] + " </div>" : "") + "</div><div class=\"content\"><cts-message-html><span id=\"html\" class=\"message common\"style=\"font-size:" + CTS.FontSize + "px;\">" + arguments[5] + "</span></CTS-message-html></div></div>");
  1264. //CHAT CLEANUP
  1265. var Chat = ChatLogElement.querySelectorAll("#cts-chat-content>.message");
  1266. var len = Chat.length;
  1267. if (len > CTS.ChatLimit + 50) {
  1268. CTS.ChatScroll = true;
  1269. len = Chat.length - CTS.ChatLimit;
  1270. var ChatIndex = 0;
  1271. for (ChatIndex; ChatIndex < len; ChatIndex++) {
  1272. Chat[ChatIndex].parentNode.removeChild(Chat[ChatIndex]);
  1273. CTS.Message[arguments[7]].shift();
  1274. }
  1275. }
  1276. UpdateScroll(1, false);
  1277. }
  1278.  
  1279. window.CreateGift = function() {
  1280. var gift = arguments[0].gift,
  1281. from = (!gift.anon) ? arguments[0].from.name : "ANONYMOUS",
  1282. to = arguments[0].to.name,
  1283. comment = (comment = gift.comment) ? gift.comment : "";
  1284. CTS.Message[0].push({
  1285. "time": Time(),
  1286. "namecolor": "#3f69c0",
  1287. "avatar": "",
  1288. "username": "",
  1289. "nick": "SPECIAL DELIVERY",
  1290. "msg": "<br><div class=\"gift\"><center>" + gift.name + "</center><br><a href=\"" + gift.store_url + "\" target=\"_blank\"><img style=\"display: block;margin-left: auto;margin-right: auto;width: 50%;\" src=\"" + gift.url + "\"></a><center>" + ((comment !== "") ? "<br>" + comment : "") + "<br>From:<br>" + from + "<br>To:<br>" + to + "</div><br></center>",
  1291. "mention": true
  1292. });
  1293. var msg = CTS.Message[0][CTS.Message[0].length - 1];
  1294. CreateMessage(msg.time, msg.namecolor, msg.avatar, msg.username, msg.nick, msg.msg, msg.mention, 0);
  1295. if (CTS.enableSound === true) window.CTSSound.GIFT.play();
  1296. if (GetActiveChat() === 0) UpdateScroll(1, true);
  1297. };
  1298.  
  1299. function AKB() {
  1300. //WATCH OR REMOVE USERS
  1301. if ((CTS.AutoKick === false && CTS.AutoBan === false) && arguments[0] === true) {
  1302. CTS.WatchList.push([arguments[2], arguments[1], new Date()]);
  1303. debug("WATCHLIST::ADDED", arguments[2] + ":" + arguments[1]);
  1304. } else {
  1305. if (CTS.Me.mod) {
  1306. if (CTS.AutoKick === true) {
  1307. CTS.NoGreet = true;
  1308. Send("kick", arguments[1]);
  1309. } else if (CTS.AutoBan === true) {
  1310. CTS.NoGreet = true;
  1311. Send("ban", arguments[1]);
  1312. }
  1313. }
  1314. }
  1315. }
  1316.  
  1317. function AKBS() {
  1318. if (arguments[0].username !== "") {
  1319. //EXTENDED SAFELIST
  1320. var temp = [];
  1321. if (Addon.active("AKB")) temp = Addon.get("AKB");
  1322. //DEFAULT SAFELIST
  1323. if (!isSafeListed(arguments[0].username.toUpperCase())) {
  1324. if (arguments[0].giftpoints > 0 || arguments[0].subscription > 0 || arguments[0].mod === true) {
  1325. if (CTS.SafeList.length < 2500) {
  1326. CTS.SafeList.push(arguments[0].username.toUpperCase());
  1327. Save("AKB", JSON.stringify(CTS.SafeList));
  1328. debug("SAFELIST::ADDED", arguments[0].username.toUpperCase() + ":" + arguments[0].handle);
  1329. }
  1330. } else {
  1331. if (arguments[0].lurker === false) {
  1332. AKB(true, arguments[0].handle, arguments[0].username.toUpperCase());
  1333. } else {
  1334. AKB(false, arguments[0].handle);
  1335. }
  1336. }
  1337. }
  1338. } else {
  1339. AKB(false, arguments[0].handle);
  1340. }
  1341. }
  1342.  
  1343. function CheckSafeList() {
  1344. var target = HandleToUser(arguments[0]);
  1345. if (target !== -1) {
  1346. var a = CTS.SafeList.indexOf(CTS.UserList[target].username);
  1347. if (a !== -1) {
  1348. //REMOVE
  1349. if (arguments[1]) {
  1350. debug("SAFELIST::", "REMOVE USER " + CTS.UserList[target].username + " FROM SAFELIST");
  1351. Alert(GetActiveChat(), "✓ Removing " + CTS.UserList[target].username + " from safelist!");
  1352. CommandList.saferemove(a);
  1353. } else {
  1354. //GETID
  1355. return a;
  1356. }
  1357. }
  1358. }
  1359. }
  1360.  
  1361. function LoadMessage() {
  1362. var ChatIndex, index, Chat = ChatLogElement.querySelector("#cts-chat-content");
  1363. CTS.ChatScroll = true;
  1364. if (!CTS.MessageCallback[CTS.ActiveMessage]) CTS.MessageCallback[CTS.ActiveMessage] = [];
  1365. CTS.MessageCallback[CTS.ActiveMessage].html = Chat.innerHTML;
  1366. CTS.MessageCallback[CTS.ActiveMessage].len = (Chat.innerHTML === "") ? 0 : CTS.Message[CTS.ActiveMessage].length;
  1367. Chat.innerHTML = "";
  1368. CheckUnreadMessage();
  1369. CTS.ActiveMessage = GetActiveChat();
  1370. if (CTS.Message[CTS.ActiveMessage]) {
  1371. index = (CTS.MessageCallback[CTS.ActiveMessage]) ? CTS.MessageCallback[CTS.ActiveMessage].len : 0;
  1372. if (index > 0) Chat.innerHTML = CTS.MessageCallback[CTS.ActiveMessage].html;
  1373. var len = CTS.Message[CTS.ActiveMessage].length;
  1374. for (ChatIndex = index; ChatIndex < len; ChatIndex++) ChatLogElement.querySelector("#cts-chat-content").insertAdjacentHTML("beforeend", "<div class=\"message" + ((CTS.Avatar) ? " common " : " ") + ((CTS.HighlightList.includes(CTS.Message[CTS.ActiveMessage][ChatIndex].username) || CTS.Message[CTS.ActiveMessage][ChatIndex].mention) ? "highlight" : "") + "\" " + ((CTS.Message[CTS.ActiveMessage][ChatIndex].avatar === "") ? "style=\"padding-left:3px;\"" : "") + ">" + ((CTS.Avatar) ? "<a href=\"#\" class=\"avatar\"><div><img src=\"" + (CTS.Message[CTS.ActiveMessage][ChatIndex].avatar) + "\"></div></a>" : "") + "<div class=\"nickname\" style=\"-webkit-box-shadow: 0 0 6px " + CTS.Message[CTS.ActiveMessage][ChatIndex].namecolor + ";box-shadow: 0 0 6px " + CTS.Message[CTS.ActiveMessage][ChatIndex].namecolor + ";background:" + CTS.Message[CTS.ActiveMessage][ChatIndex].namecolor + ";\">" + CTS.Message[CTS.ActiveMessage][ChatIndex].nick + (CTS.TimeStampToggle ? "<div class=\"ctstime\"> " + CTS.Message[CTS.ActiveMessage][ChatIndex].time + " </div>" : "") + "</div><div class=\"content\"><cts-message-html><span id=\"html\" class=\"message common\" style=\"font-size:" + CTS.FontSize + "px;\">" + CTS.Message[CTS.ActiveMessage][ChatIndex].msg + "</span></CTS-message-html></div></div>");
  1375. } else {
  1376. CTS.Message[CTS.ActiveMessage] = [];
  1377. }
  1378. UpdateScroll(1, false);
  1379. UpdateScroll(2, false);
  1380. }
  1381.  
  1382. function CheckUnreadMessage() {
  1383. if ((Math.floor(ChatLogElement.querySelector("#chat").scrollTop + 50) >= (ChatLogElement.querySelector("#chat").scrollHeight - ChatLogElement.querySelector("#chat").offsetHeight)) || arguments[0] !== undefined) {
  1384. CTS.MissedMsg = 0;
  1385. CTS.ChatScroll = true;
  1386. ChatLogElement.querySelector(".cts-message-unread").style.display = "none";
  1387. } else {
  1388. CTS.MissedMsg++;
  1389. CTS.ChatScroll = false;
  1390. ChatLogElement.querySelector(".cts-message-unread").style.display = "block";
  1391. ChatLogElement.querySelector(".cts-message-unread").innerHTML = "There are " + CTS.MissedMsg + " unread message(s)!";
  1392. }
  1393. }
  1394.  
  1395. function GetActiveChat() {
  1396. var elem = ChatListElement.querySelector(".active");
  1397. if (elem) return elem.getAttribute("data-chat-id");
  1398. return 0;
  1399. }
  1400.  
  1401. function CheckImgur() {
  1402. if (CTS.imgur) {
  1403. var i = arguments[0].match(/https?:\/\/i\.imgur\.com\/[a-zA-Z0-9]*\.(jpeg|jpg|gif|png|mp4)/);
  1404. if (i !== null) {
  1405. arguments[0] = (i[1] == "mp4") ? "<center>(Video Below)\n<video onclick=\"if (this.paused) {this.play();}else{this.pause();}\" oncontextmenu=\"return false;\" width=\"288px\" height=\"162px\"><source src=\"" + i[0] + "\" type=\"video/mp4\" /><source src=\"https://i.imgur.com/qLOIgom.mp4\" type=\"video/mp4\" /></video>\n<a href=\"" + i[0] + "\" target=\"_blank\">Direct Link</a></center>" : "<center><img src=\"" + i[0] + "\" width=\"320px\" height=\"240px\" />\n<a href=\"" + i[0] + "\" target=\"_blank\">Direct Link</a></center>";
  1406. }
  1407. }
  1408. return arguments[0];
  1409. }
  1410.  
  1411. function TTS() {
  1412. var utter = new window.SpeechSynthesisUtterance(arguments[0]);
  1413. utter.voice = CTS.TTS.voices[0];
  1414. utter.rate = 1.0;
  1415. utter.pitch = 0.5;
  1416. CTS.TTS.synth.speak(utter);
  1417. }
  1418.  
  1419. function isCommand() {
  1420. return arguments[0].match(/^!/);
  1421. }
  1422.  
  1423. function RoomUsers() {
  1424. if (CTS.ScriptInit) UserListElement.querySelector("#header>span>span").innerText = " : " + CTS.UserList.length;
  1425. }
  1426.  
  1427. function SpamPrevention() {
  1428. var LineBreaks = (arguments[0].match(/\n|\r/g) || []).length;
  1429. if (LineBreaks >= 14 && arguments[1] === false) return true;
  1430. return false;
  1431. }
  1432.  
  1433. function GamePrevention() {
  1434. if (!CTS.CanSeeGames && arguments[1] && arguments[0].match(/^\[(?:FISHING\sBOAT)\]/i)) return false;
  1435. return true;
  1436. }
  1437.  
  1438. function UpdateScroll() {
  1439. if (arguments[0] === 1 && (CTS.ChatScroll || arguments[1] === true)) ChatLogElement.querySelector("#chat").scrollTop = ChatLogElement.querySelector("#chat").scrollHeight;
  1440. if (arguments[0] === 2 && (CTS.NotificationScroll || arguments[1] === true) && CTS.NotificationToggle == 0) ChatLogElement.querySelector("#notification-content").scrollTop = ChatLogElement.querySelector("#notification-content").scrollHeight;
  1441. }
  1442.  
  1443. function DecodeTXT() {
  1444. var txt = document.createElement("textarea");
  1445. txt.innerHTML = arguments[0];
  1446. return txt.value;
  1447. }
  1448.  
  1449. function HTMLtoTXT() {
  1450. var p = document.createElement("p");
  1451. p.appendChild(document.createTextNode(arguments[0]));
  1452. return p.innerHTML.replace(/(?:(?:(?:https?|ftps?):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?/igm, "<a href=\"$&\" target=\"_blank\">$&</a>").replace(/[\u2680-\u2685]/g, "<span style=\"font-size:275%;\">$&</span>").replace(/\n|\r/g, "<br>");
  1453. }
  1454.  
  1455. function IgnoreText() {
  1456. if (arguments[0] !== "") {
  1457. if (arguments[0].match(/^(\r|\n|\s).*/)) return false;
  1458. return true;
  1459. }
  1460. }
  1461.  
  1462. function TimeToDate() {
  1463. if (arguments[1] === undefined) arguments[1] = new Date();
  1464. var match = arguments[0].trim().match(/(\d+):(\d+)\s?((am|AM|aM|Am)|(pm|PM|pM|Pm))/);
  1465. var t = {
  1466. hours: parseInt(match[1]),
  1467. minutes: parseInt(match[2]),
  1468. period: match[3].toLowerCase()
  1469. };
  1470. if (t.hours === 12) {
  1471. if (t.period === "am") arguments[1].setHours(t.hours - 12, t.minutes, 0);
  1472. if (t.period === "pm") arguments[1].setHours(t.hours, t.minutes, 0);
  1473. } else {
  1474. if (t.period === "am") arguments[1].setHours(t.hours, t.minutes, 0);
  1475. if (t.period === "pm") arguments[1].setHours(t.hours + 12, t.minutes, 0);
  1476. }
  1477. return arguments[1];
  1478. }
  1479.  
  1480. function PushPM() {
  1481. var list = (arguments[2] !== undefined) ? CTS.UserList[arguments[2]] : CTS.Me;
  1482.  
  1483. CTS.Message[arguments[0]].push({
  1484. "time": Time(),
  1485. "namecolor": list.namecolor,
  1486. "avatar": list.avatar,
  1487. "username": list.username,
  1488. "nick": list.nick,
  1489. "msg": CheckImgur(HTMLtoTXT(arguments[1])),
  1490. "mention": false
  1491. });
  1492.  
  1493. if (arguments[0] == GetActiveChat()) {
  1494. var msg = CTS.Message[arguments[0]][CTS.Message[arguments[0]].length - 1];
  1495. CreateMessage(msg.time, list.namecolor, list.avatar, list.username, list.nick, msg.msg, msg.mention, arguments[0]);
  1496. UpdateScroll(1, false);
  1497. }
  1498. }
  1499.  
  1500. function Time() {
  1501. return (new Date().toLocaleString("en-US", {
  1502. hour: "numeric",
  1503. minute: "numeric",
  1504. second: "numeric",
  1505. hour12: true
  1506. }));
  1507. }
  1508.  
  1509. function DateTime() {
  1510. return (new Date().toLocaleString("en-US", {
  1511. year: 'numeric',
  1512. month: 'numeric',
  1513. day: 'numeric',
  1514. hour: "numeric",
  1515. minute: "numeric",
  1516. second: "numeric",
  1517. hour12: true
  1518. }));
  1519. }
  1520. //FEATURES
  1521. function Download() {
  1522. var element = document.createElement('a');
  1523. element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(arguments[1]));
  1524. element.setAttribute('download', arguments[0]);
  1525. element.style.display = 'none';
  1526. document.body.appendChild(element);
  1527. element.click();
  1528. document.body.removeChild(element);
  1529. }
  1530.  
  1531. function StyleSet() {
  1532. var style = document.createElement('style');
  1533. style.setAttribute('id', CTS.ChatStyleCounter);
  1534. style.innerHTML = window.CTSChatCSS[CTS.ChatStyleCounter][0] + ":host, #videolist {background-color:unset;}";
  1535. ChatLogElement.appendChild(style);
  1536.  
  1537. style = document.createElement('style');
  1538. style.setAttribute('id', CTS.ChatStyleCounter);
  1539. style.innerHTML = window.CTSChatCSS[CTS.ChatStyleCounter][1] + ":host, #videolist {background-color:unset;}";
  1540. VideoListElement.appendChild(style);
  1541.  
  1542. style = document.createElement('style');
  1543. style.setAttribute('id', CTS.ChatStyleCounter);
  1544. style.innerHTML = window.CTSChatCSS[CTS.ChatStyleCounter][2] + ":host, #videolist {background-color:unset;}";
  1545. SideMenuElement.appendChild(style);
  1546. }
  1547.  
  1548. function ChatHeightToggled() {
  1549. CTS.OGStyle.HeightCounter++;
  1550. if (!CTS.ChatDisplay) {
  1551. CTS.ChatWidth += 5;
  1552. CTS.ChatDisplay = true;
  1553. }
  1554. CTS.ChatHeight -= 5;
  1555. CTS.UserListDisplay = true;
  1556. if (CTS.ChatHeight == 20) {
  1557. CTS.ChatHeight = 45;
  1558. CTS.UserListDisplay = false;
  1559. CTS.OGStyle.HeightCounter = 0;
  1560. }
  1561.  
  1562. ChatLogElement.querySelector("#chat-wrapper").style.cssText = "min-width:400px;width:calc(400px + " + CTS.ChatWidth + "%);max-width:calc(400px + " + CTS.ChatWidth + "%);" + (CTS.UserListDisplay ? "top:unset;min-height:calc(100% - " + CTS.ChatHeight + "% - 119px)!important;max-height:calc(100% - " + CTS.ChatHeight + "% - 119px)!important;" : "bottom:0;min-height:calc(100% - 120px)!important;max-height: calc(100% - 120px)!important;");
  1563. TitleElement.querySelector("#room-header").style.cssText = "min-width:400px;width:calc(400px + " + CTS.ChatWidth + "%);max-width:calc(400px + " + CTS.ChatWidth + "%)!important;top:" + (CTS.UserListDisplay ? "calc(" + CTS.ChatHeight + "% + 84px);" : "84px;");
  1564. VideoListElement.querySelector("#videos-footer-broadcast-wrapper").style.cssText = "bottom:unset;min-width:400px;width:calc(400px + " + CTS.ChatWidth + "%);max-width:calc(400px + " + CTS.ChatWidth + "%);top:" + (CTS.UserListDisplay ? "calc(" + CTS.ChatHeight + "% + 34px);" : "unset;top:34px;");
  1565. VideoListElement.querySelector("#videos-header").style.cssText = !CTS.UserListDisplay ? "top:0;right: 54px;" : "bottom:unset;top:" + CTS.ChatHeight + "%;";
  1566. SideMenuElement.querySelector("#sidemenu").style.cssText = !CTS.UserListDisplay ? "display:none" : "min-width:400px;width:calc(400px + " + CTS.ChatWidth + "%);max-width:calc(400px + " + CTS.ChatWidth + "%)!important;height:" + CTS.ChatHeight + "%!important;";
  1567. UserListElement.querySelector("#button-banlist").style.cssText = "top:calc(" + CTS.ChatHeight + "% + 89px);";
  1568. document.querySelector("#content").style.cssText = "width:calc(100% " + (CTS.ChatDisplay ? "- (400px + " + CTS.ChatWidth + "%)" : "") + ")";
  1569. VideoListElement.querySelector("#videos-footer").style.cssText = "display:block;top:" + (CTS.UserListDisplay ? "calc(" + CTS.ChatHeight + "% + 119px);" : "119px;") + "right:-70px;display:block;";
  1570. PerformanceModeInit(CTS.PerformanceMode);
  1571. UpdateScroll(1, true);
  1572. UpdateScroll(2, true);
  1573. Resize();
  1574. }
  1575.  
  1576. function ChatWidthToggled() {
  1577. CTS.OGStyle.WidthCounter++;
  1578. CTS.ChatWidth += 5;
  1579. CTS.ChatDisplay = true;
  1580. if (CTS.ChatWidth == 25) {
  1581. CTS.ChatWidth = -5;
  1582. CTS.ChatDisplay = false;
  1583. CTS.OGStyle.WidthCounter = 0;
  1584. }
  1585. ChatLogElement.querySelector("#chat-wrapper").style.cssText = (!CTS.ChatDisplay) ? "display:none" : "min-width:400px;width:calc(400px + " + CTS.ChatWidth + "%);max-width:calc(400px + " + CTS.ChatWidth + "%);" + ((CTS.UserListDisplay) ? "top:unset;min-height:calc(100% - " + CTS.ChatHeight + "% - 119px)!important;max-height:calc(100% - " + CTS.ChatHeight + "% - 119px)!important;" : "bottom:0;;min-height:calc(100% - 120px)!important;max-height: calc(100% - 120px)!important;");
  1586. TitleElement.querySelector("#room-header").style.cssText = (!CTS.ChatDisplay) ? "display:none" : "min-width:400px;width:calc(400px + " + CTS.ChatWidth + "%);max-width:calc(400px + " + CTS.ChatWidth + "%)!important;top:" + ((CTS.UserListDisplay) ? "calc(" + CTS.ChatHeight + "% + 84px);" : "84px;");
  1587. VideoListElement.querySelector("#videos-footer-broadcast-wrapper").style.cssText = (!CTS.ChatDisplay) ? "bottom:0;top:unset;width:100%;position:relative;" : "bottom:unset;min-width:400px;width:calc(400px + " + CTS.ChatWidth + "%);max-width:calc(400px + " + CTS.ChatWidth + "%);top:" + ((CTS.UserListDisplay) ? "calc(" + CTS.ChatHeight + "% + 34px);" : "34px;bottom:unset;");
  1588. VideoListElement.querySelector("#videos-header").style.cssText = (!CTS.ChatDisplay) ? "display:none" : ((CTS.UserListDisplay) ? "bottom:unset;top:" + CTS.ChatHeight + "%;" : "bottom:unset;top: 0;right: 54px;");
  1589. SideMenuElement.querySelector("#sidemenu").style.cssText = (!CTS.ChatDisplay || !CTS.UserListDisplay) ? "display:none" : "min-width:400px;width:calc(400px + " + CTS.ChatWidth + "%);max-width:calc(400px + " + CTS.ChatWidth + "%)!important;height:" + CTS.ChatHeight + "%!important;";
  1590. UserListElement.querySelector("#button-banlist").style.cssText = (!CTS.ChatDisplay) ? "display:none" : "top:calc(" + CTS.ChatHeight + "% + 89px);";
  1591. document.querySelector("#content").style.cssText = "width:calc(100% " + ((CTS.ChatDisplay) ? "- (400px + " + CTS.ChatWidth + "%)" : "") + ")";
  1592. VideoListElement.querySelector("#videos-footer").style.cssText = "display:block;top:" + ((CTS.UserListDisplay) ? "calc(" + CTS.ChatHeight + "% + 119px);" : "119px;") + "right:-70px;display:block;";
  1593. CTS.PerformanceMode = false;
  1594. PerformanceModeInit(CTS.PerformanceMode);
  1595. UpdateScroll(1, true);
  1596. UpdateScroll(2, true);
  1597. Resize();
  1598. }
  1599.  
  1600. function ChatHide() {
  1601. CTS.NormalStyle.ChatHide = !CTS.NormalStyle.ChatHide;
  1602. ChatLogElement.querySelector("#chat-wrapper").style.display = (CTS.NormalStyle.ChatHide ? "none" : "block");
  1603. UpdateScroll(1, true);
  1604. UpdateScroll(2, true);
  1605. Resize();
  1606. }
  1607.  
  1608. function SoundMeter() {
  1609. //MICROPHONE INDICATOR
  1610. if (CTS.SoundMeterToggle) {
  1611. setTimeout(function() {
  1612. var Camera = VideoListElement.querySelectorAll(".videos-items tc-video-item"),
  1613. Featured = VideoListElement.querySelectorAll(".videos-items:first-child tc-video-item"),
  1614. TCCameraList = window.TinychatApp.getInstance().defaultChatroom._videolist.items.length,
  1615. CameraLen = Camera.length,
  1616. users;
  1617. if (Featured.length > 0) {
  1618. for (var x = 0; x < TCCameraList; x++) {
  1619. if (CameraLen < 1) break;
  1620. for (users = 0; users < CameraLen; users++) {
  1621. if (Camera[users].shadowRoot.querySelector(".video > div > video").getAttribute("data-video-id") == window.TinychatApp.getInstance().defaultChatroom._videolist.items[x].userentity.path) {
  1622. Camera[users].shadowRoot.querySelector(".video > div > .overlay").setAttribute("data-mic-level", window.TinychatApp.getInstance().defaultChatroom._videolist.items[x].audiolevel);
  1623. Camera[users].shadowRoot.querySelector(".video > div > svg").setAttribute("data-mic-level", 0);
  1624. break;
  1625. }
  1626. }
  1627. }
  1628. } else {
  1629. for (users = 0; users < CameraLen; users++) {
  1630. Camera[users].shadowRoot.querySelector(".video > div > .overlay").setAttribute("data-mic-level", window.TinychatApp.getInstance().defaultChatroom._videolist.items[users].audiolevel);
  1631. Camera[users].shadowRoot.querySelector(".video > div > svg").setAttribute("data-mic-level", 0);
  1632. }
  1633. }
  1634. //REPEAT
  1635. SoundMeter();
  1636. }, 200);
  1637. }
  1638. }
  1639.  
  1640. function RTC() {
  1641. if (null != arguments[0].rtc) {
  1642. let a = arguments[0].rtc;
  1643. arguments[0].rtc = null;
  1644. MS(arguments[0], a);
  1645. }
  1646. }
  1647.  
  1648. function Vote() {
  1649. var ChecksOut = CTS.VoteSystem,
  1650. len = CTS.WaitToVoteList.length;
  1651. if (len > 0 && ChecksOut) {
  1652. for (var i = 0; i < len; i++) {
  1653. if (CTS.WaitToVoteList[i][0] === CTS.UserList[arguments[0]].username.toUpperCase()) {
  1654. Send("msg", "Please wait several minutes till you can cast your vote again!");
  1655. ChecksOut = false;
  1656. break;
  1657. }
  1658. }
  1659. }
  1660. if (ChecksOut) {
  1661. if (isSafeListed(CTS.UserList[arguments[0]].username.toUpperCase())) {
  1662. var targetname = arguments[1].match(/^!vote\s([a-z0-9]{1,16})$/i);
  1663. if (targetname !== null) {
  1664. var Target = UsernameToUser(targetname[1].toUpperCase());
  1665. if (Target !== -1) {
  1666. if (CTS.UserList[Target].broadcasting) {
  1667. if (CTS.Me.owner || !CTS.UserList[Target].mod) {
  1668. Send("msg", "Your vote has been cast, you may vote again shortly!");
  1669. CTS.WaitToVoteList.push([CTS.UserList[arguments[0]].username.toUpperCase(), new Date()]);
  1670. CTS.UserList[Target].vote += 1;
  1671. if (CTS.UserList[Target].vote === 3) {
  1672. CTS.UserList[Target].vote = 0;
  1673. Send("msg", CTS.UserList[Target].nick + "!\nYou've been voted off camera!");
  1674. Send("stream_moder_close", CTS.UserList[Target].handle);
  1675. }
  1676. } else {
  1677. Send("msg", "I cannot do that!");
  1678. }
  1679. }
  1680. } else {
  1681. Send("msg", "The user is not broadcasting...");
  1682. }
  1683. } else {
  1684. Send("msg", "The nickname or username does not exist!");
  1685. }
  1686. }
  1687. }
  1688. }
  1689.  
  1690. function MessagePopUp() {
  1691. if (CTS.Popups) {
  1692. var push = false;
  1693. if (arguments[0] != -1) {
  1694. if (ChatListElement.querySelector(".list-item .active")) {
  1695. if (ChatListElement.querySelector(".active").innerHTML.includes(CTS.UserList[arguments[0]].nick) && !ChatListElement.querySelector(".active").innerHTML.includes("(offline)")) {
  1696. if (arguments[2]) push = true;
  1697. } else {
  1698. push = true;
  1699. }
  1700. } else if (!arguments[2]) {
  1701. push = true;
  1702. }
  1703. }
  1704. if (arguments[3]) push = true;
  1705. if (push || !CTS.ChatDisplay) {
  1706. if (VideoListElement.querySelector(".PMOverlay .PMPopup:nth-child(5)")) {
  1707. Remove(VideoListElement, ".PMOverlay .PMPopup:first-child");
  1708. clearTimeout(CTS.NotificationTimeOut[0]);
  1709. CTS.NotificationTimeOut.shift();
  1710. }
  1711. VideoListElement.querySelector(".PMOverlay").insertAdjacentHTML("beforeend", "<div class=\"PMPopup\"><h2><div class=\"PMTime\">" + Time() + "</div><div class=\"PMName\">" + ((arguments[3]) ? "YouTube" : (CTS.UserList[arguments[0]].nick + " in " + ((arguments[2]) ? "Main" : "PM"))) + "</div></h2><div class=\"PMContent\"style=\"font-size:" + CTS.FontSize + "px\">" + arguments[1] + "</div></div>");
  1712. CTS.NotificationTimeOut.push(setTimeout(function() {
  1713. if (VideoListElement.querySelector(".PMOverlay .PMPopup")) {
  1714. Remove(VideoListElement, ".PMOverlay .PMPopup:first-child");
  1715. CTS.NotificationTimeOut.shift();
  1716. }
  1717. }, 11100));
  1718. }
  1719. }
  1720. }
  1721.  
  1722. function Reminder() {
  1723. var temp,
  1724. i,
  1725. len = CTS.ReminderServerInList.length;
  1726. for (i = 0; i < len; i++) clearTimeout(CTS.ReminderServerInList[i]);
  1727. CTS.ReminderServerInList = [];
  1728. if (CTS.Reminder === true) {
  1729. var OffsetTime;
  1730. len = CTS.ReminderList.length;
  1731. for (i = 0; i < len; i++) {
  1732. temp = TimeToDate(CTS.ReminderList[i][0]);
  1733. CTS.RecentTime = new Date();
  1734. if (temp < CTS.RecentTime) temp.setDate(temp.getDate() + 1);
  1735. OffsetTime = temp - CTS.RecentTime;
  1736. CTS.ReminderServerInList.push(setTimeout(AddReminder, OffsetTime, CTS.ReminderList[i][1]));
  1737. }
  1738. if (Addon.active("ReminderList")) {
  1739. len = Addon.get("ReminderList").length;
  1740. for (i = 0; i < len; i++) {
  1741. temp = TimeToDate(Addon.get("ReminderList")[i][0]);
  1742. CTS.RecentTime = new Date();
  1743. if (temp < CTS.RecentTime) temp.setDate(temp.getDate() + 1);
  1744. OffsetTime = temp - CTS.RecentTime;
  1745. CTS.ReminderServerInList.push(setTimeout(AddReminder, OffsetTime, Addon.get("ReminderList")[i][1]));
  1746. }
  1747. }
  1748. }
  1749. }
  1750.  
  1751. function AddReminder() {
  1752. Send("msg", "🕬 " + arguments[0]);
  1753. setTimeout(Reminder, 5000);
  1754. }
  1755.  
  1756. function NotificationDisplay() {
  1757. ChatLogElement.querySelector("#notification-content").style.cssText = "display:" + ((CTS.NotificationToggle == 0) ? "block" : "none") + ";";
  1758. ChatLogElement.querySelector(".notifbtn").style.cssText = "display:" + ((CTS.NotificationToggle == 0) ? "block" : "none") + ";";
  1759. if (CTS.NotificationToggle == 0) {
  1760. ChatLogElement.querySelector(".notifbtn").addEventListener("click", NotificationResize, {
  1761. passive: true
  1762. });
  1763. } else {
  1764. ChatLogElement.querySelector(".notifbtn").removeEventListener("click", NotificationResize, {
  1765. passive: true
  1766. });
  1767. }
  1768. UpdateScroll(1, true);
  1769. UpdateScroll(2, true);
  1770. }
  1771.  
  1772. function NotificationResize() {
  1773. ChatLogElement.querySelector("#notification-content").classList.toggle("large");
  1774. if (ChatLogElement.querySelector(".notifbtn").innerText === "▼") {
  1775. ChatLogElement.querySelector(".notifbtn").innerText = "▲";
  1776. ChatLogElement.querySelector("#chat").style.height = "50%%";
  1777. } else {
  1778. ChatLogElement.querySelector(".notifbtn").innerText = "▼";
  1779. ChatLogElement.querySelector("#chat").style.height = "100%";
  1780. }
  1781. UpdateScroll(1, false);
  1782. UpdateScroll(2, true);
  1783. }
  1784.  
  1785. function Dice() {
  1786. return String.fromCharCode("0x268" + Rand(0, 5));
  1787. }
  1788.  
  1789. function Rand() {
  1790. arguments[0] = Math.ceil(arguments[0]);
  1791. arguments[1] = Math.floor(arguments[1]);
  1792. return Math.floor(Math.random() * (arguments[1] - arguments[0] + 1)) + arguments[0];
  1793. }
  1794.  
  1795. function OpenMicrophone() {
  1796. MicrophoneElement.initMouseEvent("mousedown");
  1797. VideoListElement.querySelector("#videos-footer-push-to-talk").dispatchEvent(MicrophoneElement);
  1798. }
  1799.  
  1800. function Cameras() {
  1801. var Camera = VideoListElement.querySelectorAll(".videos-items tc-video-item"),
  1802. Len = Camera.length;
  1803. for (var user = 0; user < Len; user++) {
  1804. var isIgnored = HandleToUser(Camera[user].shadowRoot.querySelector(".video > div > video").getAttribute("data-video-id"));
  1805. Camera[user].shadowRoot.querySelector(".video").style.padding = (CTS.CameraBorderToggle) ? "5px" : "0";
  1806. if (!Camera[user].shadowRoot.querySelector(".video #fixed")) Camera[user].shadowRoot.querySelector(".video").insertAdjacentHTML("afterbegin", "<style id=\"fixed\">.video>div{border-radius:10px;}@media screen and (max-width: 1827px){.video.large{width:100%!important;}}.video.large{position: absolute;left:0;top: 0;z-index: 2;max-width: 1827px;}.video>div>.overlay[data-mic-level=\"1\"] {-webkit-box-shadow: inset 0 0 2px 3px #53b6ef;box-shadow: inset 0 0 2px 3px #53b6ef;}.video>div>.overlay[data-mic-level=\"2\"] {-webkit-box-shadow: inset 0 0 4px 3px #53b6ef;box-shadow: inset 0 0 4px 3px #53b6ef;}.video>div>.overlay[data-mic-level=\"3\"],.video>div>.overlay[data-mic-level=\"4\"], .video>div>.overlay[data-mic-level=\"5\"], .video>div>.overlay[data-mic-level=\"6\"], .video>div>.overlay[data-mic-level=\"7\"], .video>div>.overlay[data-mic-level=\"8\"], .video>div>.overlay[data-mic-level=\"9\"], .video>div>.overlay[data-mic-level=\"10\"] {-webkit-box-shadow: inset 0 0 6px 3px #53b6ef;box-shadow: inset 0 0 6px 3px #53b6ef;}.video:after{content:unset;}</style>");
  1807. }
  1808. Resize();
  1809. }
  1810.  
  1811. function FeaturedCameras() {
  1812. if (arguments[0] === true) {
  1813. if (VideoListElement.querySelector("#SmallFTYT")) {
  1814. Remove(VideoListElement, "#SmallFTYT");
  1815. }
  1816. } else {
  1817. var node = document.createElement("style");
  1818. node.appendChild(document.createTextNode(FeaturedCSS));
  1819. node.setAttribute("id", "SmallFTYT");
  1820. VideoListElement.appendChild(node);
  1821. }
  1822. }
  1823.  
  1824. function Resize() {
  1825. window.dispatchEvent(new Event("resize"));
  1826. }
  1827.  
  1828. function PerformanceModeInit() {
  1829. if (!CTS.ThemeChange) {
  1830. var value = ((arguments[0]) ? "100%" : "calc(400px + " + CTS.ChatWidth + "%)");
  1831. ChatLogElement.querySelector("#chat-wrapper").style.minWidth = value;
  1832. ChatLogElement.querySelector("#chat-wrapper").style.maxWidth = value;
  1833. ChatLogElement.querySelector("#chat-wrapper").style.width = value;
  1834. TitleElement.querySelector("#room-header").style.minWidth = value;
  1835. TitleElement.querySelector("#room-header").style.maxWidth = value;
  1836. TitleElement.querySelector("#room-header").style.width = value;
  1837. VideoListElement.querySelector("#videos-footer-broadcast-wrapper").style.minWidth = ((!CTS.ChatDisplay) ? "100%" : value);
  1838. VideoListElement.querySelector("#videos-footer-broadcast-wrapper").style.maxWidth = ((!CTS.ChatDisplay) ? "100%" : value);
  1839. VideoListElement.querySelector("#videos-footer-broadcast-wrapper").style.width = ((!CTS.ChatDisplay) ? "100%" : value);
  1840. VideoListElement.querySelector("#videos-header").style.minWidth = ((!CTS.UserListDisplay) ? "calc(" + value + " - 54px)" : value);
  1841. VideoListElement.querySelector("#videos-header").style.maxWidth = ((!CTS.UserListDisplay) ? "calc(" + value + " - 54px)" : value);
  1842. VideoListElement.querySelector("#videos-header").style.width = ((!CTS.UserListDisplay) ? "calc(" + value + " - 54px)" : value);
  1843. SideMenuElement.querySelector("#sidemenu").style.minWidth = value;
  1844. SideMenuElement.querySelector("#sidemenu").style.maxWidth = value;
  1845. SideMenuElement.querySelector("#sidemenu").style.width = value;
  1846. document.querySelector("#content").style.width = ((!arguments[0]) ? "calc(100% " + (CTS.ChatDisplay ? "- (400px + " + CTS.ChatWidth + "%)" : "") + ")" : "0%");
  1847. VideoListElement.querySelector("#videos").style.display = ((!arguments[0]) ? "block!important" : "none!important");
  1848.  
  1849. } else {
  1850. if (arguments[0]) {
  1851. VideoListElement.querySelector("#videos-content").style.display = "none";
  1852. ChatLogElement.querySelector("#chat-wrapper").style.width = "100%";
  1853. ChatLogElement.querySelector("#chat-wrapper").style.position = "fixed";
  1854. ChatLogElement.querySelector("#chat-wrapper").style.left = "0";
  1855. ChatLogElement.querySelector("#chat-wrapper").style.bottom = "0";
  1856. ChatLogElement.querySelector("#chat-wrapper").style.minHeight = "100%";
  1857. VideoListElement.querySelector("#videos-footer-broadcast-wrapper").style.display = "none";
  1858. VideoListElement.querySelector("#videos-header").style.display = "none";
  1859. VideoListElement.querySelector("#videos-footer").style.display = "none";
  1860. } else {
  1861. VideoListElement.querySelector("#videos-content").style.removeProperty("display");
  1862. ChatLogElement.querySelector("#chat-wrapper").style.removeProperty("width");
  1863. ChatLogElement.querySelector("#chat-wrapper").style.removeProperty("position");
  1864. ChatLogElement.querySelector("#chat-wrapper").style.removeProperty("left");
  1865. ChatLogElement.querySelector("#chat-wrapper").style.removeProperty("bottom");
  1866. ChatLogElement.querySelector("#chat-wrapper").style.removeProperty("min-height");
  1867. VideoListElement.querySelector("#videos-footer-broadcast-wrapper").style.removeProperty("display");
  1868. VideoListElement.querySelector("#videos-header").style.removeProperty("display");
  1869. VideoListElement.querySelector("#videos-footer").style.removeProperty("display");
  1870. }
  1871. }
  1872. UpdateScroll(1, true);
  1873. UpdateScroll(2, true);
  1874. Resize();
  1875. }
  1876.  
  1877. function OwnerCommand() {
  1878. //MESSAGE FROM OWNER
  1879. if (isCommand(arguments[1])) {
  1880. if (CTS.UserList[arguments[0]].owner) {
  1881. if (!CTS.Me.owner) {
  1882. //PROCEED WITH CAUTION (YOU SEND A SWARM OF USERS TO ANOTHER ROOM) - COME SAY HI
  1883. if (arguments[1].match(/^!raid\s/i)) {
  1884. // !raid https://tinychat.com/roomname
  1885. var raid = arguments[1].match(/^(?:!raid\s)(https?:\/\/tinychat\.com(?!\/#)\/(?!gifts|settings|coins|subscription|promote)(?:room\/)?(?:[a-z0-9]){1,32})$/i);
  1886. if (raid !== null) window.location.replace(raid[1]);
  1887. }
  1888. if (arguments[1].match(/^!version$/i)) Send("pvtmsg", "I am using " + CTS.Project.Name + "v" + Ver(), CTS.UserList[arguments[0]].handle);
  1889. } else {
  1890. if (arguments[1].match(/^!closeall$/i)) {
  1891. for (var a = 0; a < CTS.Camera.List.length; a++) {
  1892. if (CTS.Me.handle !== CTS.Camera.List[a]) Send("stream_moder_close", CTS.Camera.List[a]);
  1893. }
  1894. }
  1895. if (arguments[1].match(/^!kickall$/i)) {
  1896. for (var b = 0; b < CTS.UserList.length; b++) {
  1897. if (CTS.Me.handle !== CTS.UserList[b].handle) Send("kick", CTS.UserList[b].handle);
  1898. }
  1899. }
  1900. }
  1901. }
  1902. }
  1903. }
  1904.  
  1905. function Command() {
  1906. var UserCommand = arguments[0].match(/^!([a-z0-9]*)(?:\s?)(.*)/i);
  1907. if (UserCommand) {
  1908. if (typeof CommandList[UserCommand[1].toLowerCase()] == "function") {
  1909. debug("COMMAND::" + ((arguments[1]) ? "PM" : "MAIN"), UserCommand[1] + ":" + UserCommand[2]);
  1910. CommandList[UserCommand[1].toLowerCase()](UserCommand[2], arguments[1]);
  1911. }
  1912. }
  1913. }
  1914. //ALERT FUNCTIONS
  1915. function Settings() {
  1916. Alert(GetActiveChat(), ((arguments[0] !== undefined) ? arguments[0] : "") + "<center>CTS BOT CONFIGURATION:\nBot Mode: " + ((CTS.Bot) ? "ON" : "OFF") + "\nOperator Mode: " + ((CTS.UserYT) ? "ON" : "OFF") + "\nPublic Command Mode: " + ((CTS.PublicCommandToggle) ? "ON" : "OFF") + "\nGreen Room Mode:\n" + ((CTS.GreenRoomToggle) ? "AUTO ALLOW" : "MANUAL") + "\nReminder Mode: " + ((CTS.Reminder) ? "ON" : "OFF") + "\nGame View: " + ((CTS.CanSeeGames) ? "ON" : "OFF") + "\nGame Host: " + ((CTS.CanHostGames) ? "ON" : "OFF") + "\n\nAvatar Display: " + ((CTS.Avatar) ? "SHOW" : "HIDE") + "\nNotification Display: " + ((CTS.NotificationToggle != 2) ? "SHOW(" + CTS.NotificationToggle + ")" : "HIDE") + "\nPopup Display: " + ((CTS.Popups) ? "SHOW" : "HIDE") + "\nFont Size: " + CTS.FontSize + "PX\n\nFOR LIST OF COMMANDS:\n!CTS</center>");
  1917. }
  1918.  
  1919. function Alert() {
  1920. CTS.Message[arguments[0]].push({
  1921. "time": Time(),
  1922. "namecolor": (arguments[2] !== undefined) ? "#000000" : "#3f69c0",
  1923. "avatar": (arguments[2] !== undefined) ? ("") : ("https://i.imgur.com/S09irS7.png"),
  1924. "username": "",
  1925. "nick": (arguments[2] !== undefined) ? (arguments[2]) : ("CTS Version: " + Ver()),
  1926. "msg": ((arguments[2] !== undefined) ? ("<div id=\"system_user\">" + arguments[1] + "</div>") : arguments[1]),
  1927. "mention": true
  1928. });
  1929. var len = CTS.Message[arguments[0]].length - 1;
  1930. arguments[1] = CTS.Message[arguments[0]][len];
  1931. CreateMessage(arguments[1].time, arguments[1].namecolor, arguments[1].avatar, arguments[1].username, arguments[1].nick, arguments[1].msg, arguments[1].mention, arguments[0]);
  1932. }
  1933.  
  1934. function Ver() {
  1935. return window.CTSVersion.Major + "." + window.CTSVersion.Minor + "." + window.CTSVersion.Patch;
  1936. }
  1937.  
  1938. function AddUserNotification() {
  1939. if (CTS.FullLoad && CTS.ShowedSettings) {
  1940. var chat = ChatLogElement.querySelector("#notification-content"),
  1941. Notification;
  1942. CTS.NotificationScroll = (Math.floor(chat.scrollTop) + 5 >= (chat.scrollHeight - chat.offsetHeight)) ? true : false;
  1943. if (arguments[0] == 1) {
  1944. Notification = arguments[3] + ((arguments[4]) ? " is " : " has stopped ") + "broadcasting!";
  1945. } else if (arguments[0] == 2) {
  1946. Notification = arguments[3] + " has " + ((!arguments[4]) ? "joined!" : "left.");
  1947. } else if (arguments[0] == 3) {
  1948. Notification = arguments[2] + "has mentioned you!";
  1949. if (CTS.NotificationToggle == 0) ChatLogElement.querySelector("#notification-content").insertAdjacentHTML("beforeend", "<div class=\"list-item\"><div class=\"notification\"><span style=\"background:" + arguments[1] + "\" class=\"nickname\">" + arguments[2] + "</span>" + ((CTS.TimeStampToggle) ? "<span class=\"time\"> " + Time() + " </span>" : "") + "<br/> has mentioned you.</div></div>");
  1950. UpdateScroll(2, true);
  1951. } else if (arguments[0] == 4) {
  1952. Notification = "with the account name " + arguments[3] + " changed their name to " + arguments[5];
  1953. }
  1954. if (arguments[0] != 3 && CTS.NotificationToggle == 0) ChatLogElement.querySelector("#notification-content").insertAdjacentHTML("beforeend", "<div class=\"list-item\"><div class=\"notification\"><span class=\"nickname\" style=\"background:" + arguments[1] + ";\">" + arguments[2] + "</span>" + ((CTS.TimeStampToggle) ? "<span class=\"time\"> " + Time() + " </span>" : "") + "<br/>" + Notification + "</div></div>");
  1955. if (CTS.NotificationToggle == 1) Alert(0, Notification, arguments[2]);
  1956. if (CTS.TTS.synth !== undefined && (CTS.TTSList.includes(arguments[3]) || CTS.TTSList.includes("-ALL") || CTS.TTSList.includes("-EVENT"))) TTS(arguments[2] + ((arguments[0] == 4) ? " " : "as ") + Notification);
  1957. UpdateScroll(2, false);
  1958. var Notifications = ChatLogElement.querySelectorAll(".notification");
  1959. if (Notifications.length > CTS.NotificationLimit + 25) {
  1960. for (var NotificationIndex = 0; NotificationIndex < Notifications.length - CTS.NotificationLimit; NotificationIndex++) Notifications[NotificationIndex].parentNode.removeChild(Notifications[NotificationIndex]);
  1961. }
  1962. }
  1963. }
  1964.  
  1965. function AddSystemNotification() {
  1966. if (CTS.FullLoad && CTS.ShowedSettings) {
  1967. if (CTS.NotificationToggle == 0) {
  1968. ChatLogElement.querySelector("#notification-content").insertAdjacentHTML("beforeend", "<div class=\"list-item\"><span class=\"nickname\"style=\"background:#F00\">SYSTEM</span>" + ((CTS.TimeStampToggle) ? "<span class=\"time\"> " + Time() + " </span>" : "") + "<br/>" + arguments[0] + "</div>");
  1969. } else if (CTS.NotificationToggle == 1) {
  1970. Alert(0, arguments[0], "SYSTEM");
  1971. }
  1972. if (CTS.TTS.synth !== undefined && (CTS.TTSList.includes("-ALL") || CTS.TTSList.includes("-EVENT"))) TTS(arguments[0]);
  1973. UpdateScroll(2, false);
  1974. }
  1975. }
  1976. //USER FUNCTION
  1977. function AddUser() {
  1978. CTS.UserList.push({
  1979. "handle": arguments[0],
  1980. "username": arguments[5],
  1981. "nick": arguments[4],
  1982. "owner": arguments[7],
  1983. "mod": arguments[1],
  1984. "namecolor": arguments[2],
  1985. "avatar": arguments[3],
  1986. "canGame": arguments[6],
  1987. "broadcasting": false,
  1988. "vote": 0
  1989. });
  1990. if (CTS.ScriptInit) AddUserNotification(2, arguments[2], arguments[4], arguments[5], false);
  1991. }
  1992.  
  1993. function HandleToUser() {
  1994. for (var user = 0; user < CTS.UserList.length; user++) {
  1995. if (CTS.UserList[user].handle == arguments[0]) return user;
  1996. }
  1997. return -1;
  1998. }
  1999.  
  2000. function UsernameToHandle() {
  2001. for (var user = 0; user < CTS.UserList.length; user++) {
  2002. if (CTS.UserList[user].username.toUpperCase() == arguments[0]) return CTS.UserList[user].handle;
  2003. }
  2004. return -1;
  2005. }
  2006.  
  2007. function UsernameToUser() {
  2008. for (var user = 0; user < CTS.UserList.length; user++) {
  2009. if (CTS.UserList[user].username.toUpperCase() == arguments[0]) return user;
  2010. }
  2011. return -1;
  2012. }
  2013.  
  2014. function NicknameToHandle() {
  2015. for (var user = 0; user < CTS.UserList.length; user++) {
  2016. if (CTS.UserList[user].nick.toUpperCase() == arguments[0]) return CTS.UserList[user].handle;
  2017. }
  2018. return -1;
  2019. }
  2020.  
  2021. function NicknameToUser() {
  2022. for (var user = 0; user < CTS.UserList.length; user++) {
  2023. if (CTS.UserList[user].nick.toUpperCase() == arguments[0]) return user;
  2024. }
  2025. return -1;
  2026. }
  2027.  
  2028. function CheckUserListSafe() {
  2029. var len = CTS.UserList.length;
  2030. var temp = [];
  2031. if (Addon.active("AKB")) temp = Addon.get("AKB");
  2032. for (var user = 0; user < len; user++) {
  2033. if (!CTS.UserList[user].mod && !isSafeListed(CTS.UserList[user].username)) {
  2034. CTS.KBQueue.push(CTS.UserList[user].handle);
  2035. }
  2036. }
  2037. len = CTS.KBQueue.length;
  2038. for (var kb = 0; kb < len; kb++) {
  2039. Send(arguments[0], CTS.KBQueue[kb]);
  2040. }
  2041. CTS.KBQueue = [];
  2042. }
  2043.  
  2044. function isSafeListed() {
  2045. var temp = [];
  2046. if (Addon.active("AKB")) temp = Addon.get("AKB");
  2047. return (CTS.SafeList.includes(arguments[0]) || temp.includes(arguments[0]));
  2048. }
  2049.  
  2050. function CheckUserTempIgnore() {
  2051. if (CTS.TempIgnoreList.includes(CTS.UserList[arguments[0]].username)) return true;
  2052. return false;
  2053. }
  2054.  
  2055. function CheckUserIgnore() {
  2056. if (CTS.IgnoreList.includes(CTS.UserList[arguments[0]].username)) return true;
  2057. return false;
  2058. }
  2059.  
  2060. function CheckUserTouchScreen() {
  2061. if (/Mobi|Android/i.test(navigator.userAgent) || 'ontouchstart' in document.documentElement) {
  2062. CTS.Project.isTouchScreen = true;
  2063. CTS.ThemeChange = true;
  2064. }
  2065. }
  2066.  
  2067. function CheckUserAbuse() {
  2068. var action = false;
  2069. if (CTS.Me.mod) {
  2070. if (CTS.UserKickList.includes(arguments[1]) || CTS.NickKickList.includes(arguments[2].toUpperCase())) {
  2071. CTS.NoGreet = true;
  2072. Send("kick", arguments[0]);
  2073. action = true;
  2074. }
  2075. if (!action) {
  2076. if (CTS.UserBanList.includes(arguments[1]) || CTS.NickBanList.includes(arguments[2].toUpperCase())) {
  2077. CTS.NoGreet = true;
  2078. Send("ban", arguments[0]);
  2079. }
  2080. }
  2081. }
  2082. }
  2083.  
  2084. function CheckUserWordAbuse() {
  2085. if (CTS.UserList[arguments[0]].handle != CTS.Me.handle && !CTS.UserList[arguments[0]].mod) {
  2086. var action = false; //LETS NOT REPEAT/KICK
  2087. var len = CTS.KickKeywordList.length;
  2088. for (var i = 0; i < len; i++) {
  2089. if (arguments[1].includes(CTS.KickKeywordList[i])) {
  2090. Send("kick", CTS.UserList[arguments[0]].handle);
  2091. action = true;
  2092. break;
  2093. }
  2094. }
  2095. if (!action) {
  2096. len = CTS.BanKeywordList.length;
  2097. for (i = 0; i < len; i++) {
  2098. if (arguments[1].includes(CTS.BanKeywordList[i])) {
  2099. Send("ban", CTS.UserList[arguments[0]].handle);
  2100. break;
  2101. }
  2102. }
  2103. }
  2104. }
  2105. }
  2106.  
  2107. function RemoveUserCamera() {
  2108. var len = CTS.Camera.List.length;
  2109. if (len > 0) {
  2110. for (var i = 0; i < len; i++) {
  2111. if (CTS.Camera.List[i] === arguments[0]) {
  2112. CTS.Camera.List.splice(i, 1);
  2113. clearTimeout(CTS.Camera.clearRandom);
  2114. break;
  2115. }
  2116. }
  2117. }
  2118. }
  2119.  
  2120. function CheckUserStream() {
  2121. if (CTS.Me.mod) {
  2122. var user = HandleToUser(arguments[0]);
  2123. if (user != -1) {
  2124. if (arguments[1]) {
  2125. //PUSH UPDATE
  2126. CTS.Camera.List.push(CTS.UserList[user].handle);
  2127. CTS.UserList[user].broadcasting = true;
  2128. var len = CTS.Camera.List.length;
  2129. if (CTS.UserList[user].username !== "GUEST" && !CTS.GreenRoomList.includes(CTS.UserList[user].username)) {
  2130. CTS.GreenRoomList.push(CTS.UserList[user].username);
  2131. Save("GreenRoomList", JSON.stringify(CTS.GreenRoomList));
  2132. }
  2133. //CLEAR TIMERS
  2134. clearTimeout(CTS.Camera.clearRandom);
  2135. //CAMERA SWEEP FUNCTION
  2136. if (len >= 12 && CTS.Me.handle === CTS.Host && CTS.Camera.Sweep) {
  2137. CTS.Camera.clearRandom = setTimeout(function() {
  2138. var rand = Rand(0, len - 1);
  2139. if (CTS.Camera.List[rand] !== CTS.Me.handle && CTS.Camera.Sweep) {
  2140. var target = HandleToUser(CTS.Camera.List[rand]);
  2141. if (CTS.Me.owner || !CTS.UserList[target].mod) {
  2142. Send("msg", "[Camera Clear]\n" + CTS.UserList[target].nick + "!\nYou've been randomly selected. You win, a cam close!");
  2143. Send("stream_moder_close", CTS.Camera.List[rand]);
  2144. CTS.Camera.List.splice(rand, 1);
  2145. }
  2146. }
  2147. }, CTS.Camera.SweepTimer * 60000);
  2148. }
  2149. } else {
  2150. clearTimeout(CTS.Camera.clearRandom);
  2151. RemoveUserCamera(CTS.UserList[user].handle);
  2152. CTS.UserList[user].broadcasting = false;
  2153. }
  2154. CTS.UserList[user].broadcasting = arguments[1];
  2155. if (CTS.ScriptInit) AddUserNotification(1, CTS.UserList[user].namecolor, CTS.UserList[user].nick, CTS.UserList[user].username, arguments[1]);
  2156. }
  2157. }
  2158. }
  2159.  
  2160. function CheckUserName() {
  2161. return arguments[0].match(/^(-all|[a-z0-9_]{1,32})$/i);
  2162. }
  2163.  
  2164. function CheckUserNameStrict() {
  2165. return arguments[0].match(/^([a-z0-9_]{1,32})$/i);
  2166. }
  2167.  
  2168. function MSR() {
  2169. if (arguments[0]) {
  2170. arguments[1].videolist.RemoveVideoRemote(arguments[1].handle);
  2171. } else {
  2172. arguments[1].mediaStream.stop();
  2173. arguments[1].mediaStream = null;
  2174. }
  2175. }
  2176.  
  2177. function MS() {
  2178. if (arguments[0].mediaStream !== null) {
  2179. if (arguments[0].mediaStream.active && arguments[1].signalingState !== "closed" && typeof arguments[1].removeStream === "function" && arguments[1].removeStream(arguments[0].mediaStream)) MSR(false, arguments[0]);
  2180. } else {
  2181. MSR(true, arguments[0]);
  2182. }
  2183. if (arguments[1].signalingState !== "closed" && arguments[1].close());
  2184. }
  2185. //LOAD/SAVE FUNCTION
  2186. function Load() {
  2187. var val = localStorage.getItem(CTS.Project.Storage + arguments[0]);
  2188. if (null === val && "undefined" != typeof arguments[1]) {
  2189. Save(arguments[0], arguments[1]);
  2190. return arguments[1];
  2191. }
  2192. return val;
  2193. }
  2194.  
  2195. function Save() {
  2196. localStorage.setItem(CTS.Project.Storage + arguments[0], arguments[1]);
  2197. }
  2198. //SOCKET FUNCTION
  2199. function CTSWebSocket() {
  2200. if (window.Proxy === undefined) return;
  2201. var handler = {
  2202. set: function(Target, prop, value) {
  2203. if (prop == "onmessage") {
  2204. var oldMessage = value;
  2205. value = function(event) {
  2206. ServerMsg(JSON.parse(event.data), Target);
  2207. oldMessage(event);
  2208. };
  2209. }
  2210. return (Target[prop] = value);
  2211. },
  2212. get: function(Target, prop) {
  2213. var value = Target[prop];
  2214. if (prop == "send") {
  2215. value = function(event) {
  2216. ClientMsg(JSON.parse(event), Target);
  2217. Target.send(event);
  2218. };
  2219. } else if (typeof value == 'function') {
  2220. value = value.bind(Target);
  2221. }
  2222. return value;
  2223. }
  2224. };
  2225. var WebSocketProxy = new window.Proxy(window.WebSocket, {
  2226. construct: function(Target, args) {
  2227. CTS.SocketTarget = new Target(args[0]);
  2228. debug("SOCKET::CONNECTING", args[0]);
  2229. return new window.Proxy(CTS.SocketTarget, handler);
  2230. }
  2231. });
  2232. window.WebSocket = WebSocketProxy;
  2233. }
  2234.  
  2235. function ModCommand() {
  2236. var name = arguments[1].match(/!(?:userkick|nickkick|userban|nickban|userclose|nickclose)\s(guest-[0-9]{1,26}|[a-z0-9_]{1,32})$/i);
  2237. if (name !== null) {
  2238. var target = ((arguments[2]) ? UsernameToUser(name[1].toUpperCase()) : NicknameToUser(name[1].toUpperCase()));
  2239. if (target != -1) { // USER ONLINE
  2240. if (CTS.UserList[target].handle !== CTS.Me.handle && !CTS.BotModList.includes(CTS.UserList[target].username) && !CTS.UserList[target].mod) {
  2241. //IF USER IS NOT HOST/MODERATOR/JR.MODERATOR
  2242. if (arguments[0] === "stream_moder_close") {
  2243. if (CTS.UserList[target].broadcasting) Send(arguments[0], CTS.UserList[target].handle);
  2244. } else {
  2245. Send(arguments[0], CTS.UserList[target].handle);
  2246. }
  2247. } else {
  2248. Send("msg", "This users authorization is similar or above yours!");
  2249. }
  2250. }
  2251. }
  2252. }
  2253.  
  2254. function BotCommand() {
  2255. var len = CTS.YouTube.MessageQueueList.length;
  2256. if (len <= 0) {
  2257. // Moderator Control
  2258. if (CTS.UserList[arguments[1]].mod) {
  2259. if (arguments[0] == 2) {
  2260. if (CTS.YouTube.CurrentTrack.ID !== undefined) {
  2261. CTS.YouTube.Clear = true;
  2262. YouTubePlayList();
  2263. }
  2264. }
  2265. if (arguments[0] == 5) SetBot(true);
  2266. }
  2267. // User and Moderator Control
  2268. if ((CTS.UserYT && isSafeListed(CTS.UserList[arguments[1]].username) && (CTS.BotOPList.includes(CTS.UserList[arguments[1]].username) || CTS.BotOPList.includes("-ALL"))) || CTS.UserList[arguments[1]].mod || CTS.BotModList.includes(CTS.UserList[arguments[1]].username)) {
  2269. if (arguments[0] == 1) CheckYouTube(arguments[2], true, undefined, CTS.UserList[arguments[1]].mod);
  2270. if (arguments[0] == 4) YouTubePlayList(true);
  2271. if (arguments[0] == 6) {
  2272. if (CTS.UserList[arguments[1]].mod || CTS.BotModList.includes(CTS.UserList[arguments[1]].username)) {
  2273. var videoid = arguments[2].match(/http(?:s)?(?:\:\/\/)(?:w{1,3}\.)?(?:youtu(?:\.be|be\.com))(?:\/v\/|\/)?(?:watch\?|embed\/|user\/|v\/|\/)(?:v\=)?([a-z0-9\-\_]{1,11})/i);
  2274. if (videoid !== null) {
  2275. CTS.SocketTarget.send(JSON.stringify({
  2276. "tc": "yut_play",
  2277. "item": {
  2278. "id": videoid[1],
  2279. "duration": 7200,
  2280. "offset": 0,
  2281. "title": "YOUTUBE IS BYPASSED - MODS ONLY"
  2282. }
  2283. }));
  2284. debug("YOUTUBE::LINK BYPASS", videoid[1]);
  2285. }
  2286. } else {
  2287. Send("msg", "Ask a moderator to play your request.");
  2288. }
  2289. }
  2290. if (arguments[0] == 3) {
  2291. if (CTS.YouTube.CurrentTrack.ID !== undefined) {
  2292. Send("yut_stop", [CTS.YouTube.CurrentTrack.ID, CTS.YouTube.CurrentTrack.duration, CTS.YouTube.CurrentTrack.title, CTS.YouTube.CurrentTrack.thumbnail, 0]);
  2293. Send("msg", "🎵" + CTS.YouTube.CurrentTrack.title + " has been skipped!🎵");
  2294. }
  2295. }
  2296. }
  2297. } else {
  2298. if (CTS.YouTube.ListBuilt === false) {
  2299. Send("msg", "🎵 Playlist search is happening, please wait! 🎵\n" + CTS.YouTube.MessageQueueList.length + " tracks found.");
  2300. } else {
  2301. Send("msg", "🎵 Playlist items are being added,a please wait! 🎵\n" + CTS.YouTube.MessageQueueList.length + " tracks remaining.");
  2302. }
  2303. }
  2304. }
  2305.  
  2306. function ServerMsg() {
  2307. if (typeof ServerInList[arguments[0].tc] == "function") {
  2308. debug(("SERVER::" + arguments[0].tc.toUpperCase()), arguments[0]);
  2309. ServerInList[arguments[0].tc](arguments[0]);
  2310. }
  2311. }
  2312.  
  2313. function ClientMsg() {
  2314. if (typeof ServerOutList[arguments[0].tc] == "function") {
  2315. debug(("CLIENT::" + arguments[0].tc.toUpperCase()), arguments[0]);
  2316. ServerOutList[arguments[0].tc](arguments[0]);
  2317. }
  2318. }
  2319.  
  2320. function Send() {
  2321. ServerSendList[arguments[0]](arguments[0], arguments[1], arguments[2]);
  2322. if (arguments[1] === undefined) arguments[1] = "Open Request";
  2323. debug(("CLIENT::SEND::" + arguments[0].toUpperCase()), arguments[1]);
  2324. }
  2325. //GAME FUNCTION
  2326. //FISHING BOAT
  2327. function FishUpgradeStatus(playerExist, type) {
  2328. var msg = "[FISHING BOAT]\n";
  2329. if (type != 7) msg += playerExist.Nickname + ":\n";
  2330. if (type == 0 || type == 1) msg += "[NET]Lv. " + playerExist.Upgrades.Net + "\n" + ((playerExist.Upgrades.Net >= 10) ? "[MAXED]" : "[COSTS $" + Fish.pricelist(playerExist, 0) + " to UPGRADE]\n\n");
  2331. if (type == 0 || type == 2) msg += "[RADAR]Lv. " + playerExist.Upgrades.Radar + "\n" + ((playerExist.Upgrades.Radar >= 20) ? "[MAXED]" : "[COSTS $" + Fish.pricelist(playerExist, 1) + " to UPGRADE]") + "\n\n";
  2332. if (type == 0 || type == 3) msg += "[INSURANCE]\n" + ((playerExist.Upgrades.Insurance) ? "[OWNED]" : "[COSTS $" + Fish.pricelist(playerExist, 3) + " per ROUND]") + "\n\n";
  2333. if (type == 0 || type == 4) msg += "[SHOP]Lv. " + playerExist.Upgrades.Store + "\n" + ((playerExist.Upgrades.Store >= 6) ? "[MAXED]" : "[COSTS $" + Fish.pricelist(playerExist, 2) + " to UPGRADE]") + "\n\n";
  2334. if (type == 6) msg += "HELP:\n!fish\n!fishbank\n!fishsplit user|nick\n!fishgamble\n[COSTS $" + Fish.pricelist(playerExist, 6) + "]\n!fishrob user|nick\n[COSTS $" + Fish.pricelist(playerExist, 4) + "]\n!fishslap user|nick\n[COSTS $" + Fish.pricelist(playerExist, 5) + "]\n!fishupgrade\n!fishupgrade\n[Net|Radar|Insurance|Shop]\n\n";
  2335. Send("msg", msg);
  2336. }
  2337.  
  2338. function FishTimerCheck(playerExist) {
  2339. if (new Date() - playerExist.LastCheck >= 5000) {
  2340. playerExist.LastCheck = new Date();
  2341. return true;
  2342. }
  2343. return false;
  2344. }
  2345.  
  2346. function FishCommandCheck() {
  2347. var command,
  2348. playerExist = Fish.getPlayer(CTS.UserList[arguments[0]].handle, false, true),
  2349. FishCommand = arguments[1].match(/^!(fish(?:rob|slap|split|help|upgrade)?)\s?(?:([a-z0-9_]*)|net|shop|radar|insurance)?$/i);
  2350. if (FishCommand) {
  2351. if (FishCommand[1] === "fishslap" || FishCommand[1] === "fishrob" || FishCommand[1] === "fishsplit") {
  2352. if (FishCommand[2] !== undefined) {
  2353. if (typeof FishList[FishCommand[1].toLowerCase()] == "function") FishList[FishCommand[1].toLowerCase()](playerExist, FishCommand[2]);
  2354. }
  2355. } else {
  2356. command = ((FishCommand[2] !== undefined) ? FishCommand[1] + FishCommand[2] : FishCommand[1]);
  2357. if (typeof FishList[command.toLowerCase()] == "function") FishList[command.toLowerCase()](playerExist, CTS.UserList[arguments[0]]);
  2358. }
  2359. }
  2360. }
  2361.  
  2362. function FishTransfer(playerExist, target, cost, deduct, rob) {
  2363. if (target !== undefined && target !== -1) {
  2364. if (playerExist.Points > cost) {
  2365. if (rob) {
  2366. playerExist.Points -= cost;
  2367. if (target.Points <= deduct) {
  2368. deduct = target.Points;
  2369. target.Points -= deduct;
  2370. playerExist.Points += deduct;
  2371. Send("msg", "[FISHING BOAT]\n" + playerExist.Nickname + " destroyed " + target.Nickname + "\nMoney made $" + deduct + "!");
  2372. Fish.getPlayer(target.Handle, true);
  2373. } else {
  2374. target.Points -= deduct;
  2375. playerExist.Points += deduct;
  2376. Send("msg", "[FISHING BOAT]\n" + playerExist.Nickname + " robbed " + target.Nickname + " for $" + deduct + "!");
  2377. }
  2378. } else {
  2379. playerExist.Points = deduct;
  2380. target.Points += deduct;
  2381. Send("msg", "[FISHING BOAT]\n" + playerExist.Nickname + " split their money with " + target.Nickname + "!");
  2382. }
  2383. } else {
  2384. Send("msg", "[FISHING BOAT]\n" + playerExist.Nickname + " are you kidding me?\nTalk to me when you have money!");
  2385. }
  2386. }
  2387. }
  2388.  
  2389. function FishTransaction(playerExist, cost, status) {
  2390. if (playerExist.Points > cost) {
  2391. playerExist.Points -= cost;
  2392. return true;
  2393. } else {
  2394. Send("msg", "[FISHING BOAT]\n" + playerExist.Nickname + ", are you kidding me?\nTalk to me when you have money!");
  2395. return false;
  2396. }
  2397. }
  2398. //SERVER/CLIENT LIST FUNCTION
  2399. var CommandList = {
  2400. cts: function() {
  2401. Alert(GetActiveChat(), "<b style=\"color:#ee3636;\">Owner Commands:</b>\n!raid <b style=\"color:#ffff00;\">tc link</b>\n!closeall\n!kickall\n!version\n\n<b style=\"color:#ee3636;\">Moderator Commands:</b>\n!whoisbot\n!bot\n!bottoggle\n!greenroomtoggle\n!publiccommandtoggle\n!camsweep\n!votetoggle\n!autokick (be careful!)\n!autoban (be careful!)\n\n!ytbypass <b style=\"color:#ffff00;\">link (no playlists)</b>\n!yt <b style=\"color:#ffff00;\">link | keyword</b>\n!ytclear\n\n!userbanlist\n!userbanlistclear\n!userbanadd <b style=\"color:#ffff00;\">user</b>\n!userbanremove <b style=\"color:#ffff00;\">#</b>\n\n!nickbanlist\n!nickbanlistclear\n!nickbanadd <b style=\"color:#ffff00;\">nick</b>\n!nickbanremove <b style=\"color:#ffff00;\">#</b>\n\n!bankeywordlist\n!bankeywordlistclear\n!bankeywordadd <b style=\"color:#ffff00;\">keyword | phrase</b>\n!bankeywordremove <b style=\"color:#ffff00;\">#</b>\n\n!userkicklist\n!userkicklistclear\n!userkickadd <b style=\"color:#ffff00;\">user</b>\n!userkickremove <b style=\"color:#ffff00;\">#</b>\n\n!nickkicklist\n!nickkicklistclear\n!nickkickadd <b style=\"color:#ffff00;\">nick</b>\n!nickkickremove <b style=\"color:#ffff00;\">#</b>\n\n!kickkeywordlist\n!kickkeywordlistclear\n!kickkeywordadd <b style=\"color:#ffff00;\">keyword | phrase</b>\n!kickkeywordremove <b style=\"color:#ffff00;\">#</b>\n\n!oplist\n!oplistclear\n!opadd <b style=\"color:#ffff00;\">user | -all</b>\n!opremove <b style=\"color:#ffff00;\">#</b>\n!optoggle\n\n<b style=\"color:#ee3636;\">Jr. Moderator Commands:</b>\n!userban <b style=\"color:#ffff00;\">user</b>\n!nickban <b style=\"color:#ffff00;\">nick</b>\n!userkick <b style=\"color:#ffff00;\">user</b>\n!nickkick <b style=\"color:#ffff00;\">nick</b>\n!userclose <b style=\"color:#ffff00;\">user</b>\n!nickclose <b style=\"color:#ffff00;\">nick</b>\n\n<b style=\"color:#ee3636;\">User Commands:</b>\n!yt <b style=\"color:#ffff00;\">link | keyword</b>\n!ytskip\n!ytqueue\n\n!mentionlist\n!mentionlistclear\n!mentionadd <b style=\"color:#ffff00;\">keyword</b>\n!mentionremove <b style=\"color:#ffff00;\">#</b>\n\n!ignorelist\n!ignorelistclear\n!ignoreadd <b style=\"color:#ffff00;\">user</b>\n!ignoreremove <b style=\"color:#ffff00;\">#</b>\n\n!greetlist\n!greetlistclear\n!greetadd <b style=\"color:#ffff00;\">user | -all</b>\n!greetremove <b style=\"color:#ffff00;\">#</b>\n\n!ttslist\n!ttslistclear\n!ttsadd <b style=\"color:#ffff00;\">user | -all | -event</b>\n!ttsremove <b style=\"color:#ffff00;\">#</b>\n\n!highlightlist\n!highlightlistclear\n!highlightadd <b style=\"color:#ffff00;\">user</b>\n!highlightremove <b style=\"color:#ffff00;\">#</b>\n\n!reminderlist\n!reminderlistclear\n!reminderadd <b style=\"color:#ffff00;\">user</b>\n!reminderremove <b style=\"color:#ffff00;\">#</b>\n!remindertoggle\n\n!safelist\n!safelistclear\n!safeadd <b style=\"color:#ffff00;\">user</b>\n!saferemove <b style=\"color:#ffff00;\">#</b>\n\n!greenroomlist\n!greenroomlistclear\n!greenroomadd <b style=\"color:#ffff00;\">user</b>\n!greenroomremove <b style=\"color:#ffff00;\">#</b>\n\n!greenroomignorelist\n!greenroomignorelistclear\n!greenroomignoreadd <b style=\"color:#ffff00;\">user</b>\n!greenroomignoreremove <b style=\"color:#ffff00;\">#</b>\n\n!userlist\n\n!lists\n!listsclear\n\n!greetmode\n!imgurtoggle\n!avatartoggle\n!notificationtoggle <b style=\"color:#ffff00;\"></b>\n!popuptoggle\n!soundmetertoggle\n!timestamptoggle\n\n!coin\n!advice\n!8ball <b style=\"color:#ffff00;\">question</b>\n!roll <b style=\"color:#ffff00;\">#</b>\n!chuck\n!dad\n\n!vote <b style=\"color:#ffff00;\">user</b>\n\n!clr\n!settings\n!share\n\n<b style=\"color:#ee3636;\">Game Commands:</b>\n!gamehost\n!gameview\n!fish");
  2402. },
  2403. help: function() {
  2404. this.cts();
  2405. },
  2406. userlist: function() {
  2407. Alert(GetActiveChat(), SettingsList.UserList());
  2408. },
  2409. mentionadd: function() {
  2410. if (arguments[0] === "") {
  2411. Alert(GetActiveChat(), "X Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  2412. } else {
  2413. if (CheckUserNameStrict(arguments[0])) {
  2414. CTS.MentionList.push(arguments[0].toUpperCase());
  2415. Save("MentionList", JSON.stringify(CTS.MentionList));
  2416. Alert(GetActiveChat(), "✓ Command Accepted!");
  2417. } else {
  2418. Alert(GetActiveChat(), "X Command Rejected!\nArgument passed didn't match criteria!");
  2419. }
  2420. }
  2421. },
  2422. mentionremove: function() {
  2423. if (arguments[0] === "" || isNaN(arguments[0])) {
  2424. Alert(GetActiveChat(), "X Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  2425. } else {
  2426. if (CTS.MentionList[arguments[0]] !== undefined) {
  2427. CTS.MentionList.splice(arguments[0], 1);
  2428. Save("MentionList", JSON.stringify(CTS.MentionList));
  2429. Alert(GetActiveChat(), "✓ Command Accepted!");
  2430. } else {
  2431. Alert(GetActiveChat(), "X Command Rejected!\nID was not found!");
  2432. }
  2433. }
  2434. },
  2435. mentionlistclear: function() {
  2436. CTS.MentionList = [];
  2437. Save("MentionList", JSON.stringify(CTS.MentionList));
  2438. Alert(GetActiveChat(), "✓ Command Accepted!");
  2439. },
  2440. mentionlist: function() {
  2441. Alert(GetActiveChat(), SettingsList.MentionList());
  2442. },
  2443. ignoreadd: function() {
  2444. if (arguments[0] === "") {
  2445. Alert(GetActiveChat(), "X Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  2446. } else {
  2447. if (CheckUserNameStrict(arguments[0])) {
  2448. CTS.IgnoreList.push(arguments[0].toUpperCase());
  2449. Cameras();
  2450. Save("IgnoreList", JSON.stringify(CTS.IgnoreList));
  2451. Alert(GetActiveChat(), "✓ Command Accepted!");
  2452. } else {
  2453. Alert(GetActiveChat(), "X Command Rejected!\nArgument passed didn't match criteria!");
  2454. }
  2455. }
  2456. },
  2457. ignoreremove: function() {
  2458. if (arguments[0] === "" || isNaN(arguments[0])) {
  2459. Alert(GetActiveChat(), "X Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  2460. } else {
  2461. if (CTS.IgnoreList[arguments[0]] !== undefined) {
  2462. CTS.IgnoreList.splice(arguments[0], 1);
  2463. Save("IgnoreList", JSON.stringify(CTS.IgnoreList));
  2464. Alert(GetActiveChat(), "✓ Command Accepted!");
  2465. } else {
  2466. Alert(GetActiveChat(), "X Command Rejected!\nID was not found!");
  2467. }
  2468. }
  2469. },
  2470. ignorelistclear: function() {
  2471. CTS.IgnoreList = [];
  2472. Save("IgnoreList", JSON.stringify(CTS.IgnoreList));
  2473. Alert(GetActiveChat(), "✓ Command Accepted!");
  2474. },
  2475. ignorelist: function() {
  2476. Alert(GetActiveChat(), SettingsList.IgnoreList());
  2477. },
  2478. userbanadd: function() {
  2479. if (arguments[0] === "") {
  2480. Alert(GetActiveChat(), "X Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  2481. } else {
  2482. if (CheckUserNameStrict(arguments[0])) {
  2483. CTS.UserBanList.push(arguments[0].toUpperCase());
  2484. Save("UserBanList", JSON.stringify(CTS.UserBanList));
  2485. Alert(GetActiveChat(), "✓ Command Accepted!");
  2486. var check = UsernameToHandle(arguments[0].toUpperCase());
  2487. if (check != -1 && CTS.Me.mod) Send("ban", check);
  2488. } else {
  2489. Alert(GetActiveChat(), "X Command Rejected!\nArgument passed didn't match criteria!");
  2490. }
  2491. }
  2492. },
  2493. userbanremove: function() {
  2494. if (arguments[0] === "" || isNaN(arguments[0])) {
  2495. Alert(GetActiveChat(), "X Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  2496. } else {
  2497. if (CTS.UserBanList[arguments[0]] !== undefined) {
  2498. CTS.UserBanList.splice(arguments[0], 1);
  2499. Save("UserBanList", JSON.stringify(CTS.UserBanList));
  2500. Alert(GetActiveChat(), "✓ Command Accepted!");
  2501. } else {
  2502. Alert(GetActiveChat(), "X Command Rejected!\nID was not found!");
  2503. }
  2504. }
  2505. },
  2506. userbanlistclear: function() {
  2507. CTS.UserBanList = [];
  2508. Save("UserBanList", JSON.stringify(CTS.UserBanList));
  2509. Alert(GetActiveChat(), "✓ Command Accepted!");
  2510. },
  2511. userbanlist: function() {
  2512. Alert(GetActiveChat(), SettingsList.UserBanList());
  2513. },
  2514. nickbanadd: function() {
  2515. if (arguments[0] === "") {
  2516. Alert(GetActiveChat(), "X Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  2517. } else {
  2518. if (CheckUserNameStrict(arguments[0])) {
  2519. CTS.NickBanList.push(arguments[0].toUpperCase());
  2520. Save("NickBanList", JSON.stringify(CTS.NickBanList));
  2521. Alert(GetActiveChat(), "✓ Command Accepted!");
  2522. var check = NicknameToHandle(arguments[0].toUpperCase());
  2523. if (check != -1 && CTS.Me.mod) Send("ban", check);
  2524. } else {
  2525. Alert(GetActiveChat(), "X Command Rejected!\nArgument passed didn't match criteria!");
  2526. }
  2527. }
  2528. },
  2529. nickbanremove: function() {
  2530. if (arguments[0] === "" || isNaN(arguments[0])) {
  2531. Alert(GetActiveChat(), "X Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  2532. } else {
  2533. if (CTS.NickBanList[arguments[0]] !== undefined) {
  2534. CTS.NickBanList.splice(arguments[0], 1);
  2535. Save("NickBanList", JSON.stringify(CTS.NickBanList));
  2536. Alert(GetActiveChat(), "✓ Command Accepted!");
  2537. } else {
  2538. Alert(GetActiveChat(), "X Command Rejected!\nID was not found!");
  2539. }
  2540. }
  2541. },
  2542. nickbanlistclear: function() {
  2543. CTS.NickBanList = [];
  2544. Save("NickBanList", JSON.stringify(CTS.NickBanList));
  2545. Alert(GetActiveChat(), "✓ Command Accepted!");
  2546. },
  2547. nickbanlist: function() {
  2548. Alert(GetActiveChat(), SettingsList.NickBanList());
  2549. },
  2550. userkickadd: function() {
  2551. if (arguments[0] === "") {
  2552. Alert(GetActiveChat(), "X Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  2553. } else {
  2554. if (CheckUserNameStrict(arguments[0])) {
  2555. CTS.UserKickList.push(arguments[0].toUpperCase());
  2556. Save("UserKickList", JSON.stringify(CTS.UserKickList));
  2557. Alert(GetActiveChat(), "✓ Command Accepted!");
  2558. var check = UsernameToHandle(arguments[0].toUpperCase());
  2559. if (check != -1 && CTS.Me.mod) Send("kick", check);
  2560. } else {
  2561. Alert(GetActiveChat(), "X Command Rejected!\nArgument passed didn't match criteria!");
  2562. }
  2563. }
  2564. },
  2565. userkickremove: function() {
  2566. if (arguments[0] === "" || isNaN(arguments[0])) {
  2567. Alert(GetActiveChat(), "X Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  2568. } else {
  2569. if (CTS.UserKickList[arguments[0]] !== undefined) {
  2570. CTS.UserKickList.splice(arguments[0], 1);
  2571. Save("UserKickList", JSON.stringify(CTS.UserKickList));
  2572. Alert(GetActiveChat(), "✓ Command Accepted!");
  2573. } else {
  2574. Alert(GetActiveChat(), "X Command Rejected!\nID was not found!");
  2575. }
  2576. }
  2577. },
  2578. userkicklistclear: function() {
  2579. CTS.UserKickList = [];
  2580. Save("UserKickList", JSON.stringify(CTS.UserKickList));
  2581. Alert(GetActiveChat(), "✓ Command Accepted!");
  2582. },
  2583. userkicklist: function() {
  2584. Alert(GetActiveChat(), SettingsList.UserKickList());
  2585. },
  2586. nickkickadd: function() {
  2587. if (arguments[0] === "") {
  2588. Alert(GetActiveChat(), "X Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  2589. } else {
  2590. if (CheckUserNameStrict(arguments[0])) {
  2591. CTS.NickKickList.push(arguments[0].toUpperCase());
  2592. Save("NickKickList", JSON.stringify(CTS.NickKickList));
  2593. Alert(GetActiveChat(), "✓ Command Accepted!");
  2594. var check = NicknameToHandle(arguments[0].toUpperCase());
  2595. if (check != -1 && CTS.Me.mod) Send("kick", check);
  2596. } else {
  2597. Alert(GetActiveChat(), "X Command Rejected!\nArgument passed didn't match criteria!");
  2598. }
  2599. }
  2600. },
  2601. nickkickremove: function() {
  2602. if (arguments[0] === "" || isNaN(arguments[0])) {
  2603. Alert(GetActiveChat(), "X Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  2604. } else {
  2605. if (CTS.NickKickList[arguments[0]] !== undefined) {
  2606. CTS.NickKickList.splice(arguments[0], 1);
  2607. Save("NickKickList", JSON.stringify(CTS.NickKickList));
  2608. Alert(GetActiveChat(), "✓ Command Accepted!");
  2609. } else {
  2610. Alert(GetActiveChat(), "X Command Rejected!\nID was not found!");
  2611. }
  2612. }
  2613. },
  2614. nickkicklistclear: function() {
  2615. CTS.NickKickList = [];
  2616. Save("NickKickList", JSON.stringify(CTS.NickKickList));
  2617. Alert(GetActiveChat(), "✓ Command Accepted!");
  2618. },
  2619. nickkicklist: function() {
  2620. Alert(GetActiveChat(), SettingsList.NickKickList());
  2621. },
  2622. bankeywordadd: function() {
  2623. if (arguments[0] === "") {
  2624. Alert(GetActiveChat(), "X Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  2625. } else {
  2626. CTS.BanKeywordList.push(arguments[0]);
  2627. Save("BanKeywordList", JSON.stringify(CTS.BanKeywordList));
  2628. Alert(GetActiveChat(), "✓ Command Accepted!");
  2629. }
  2630. },
  2631. bankeywordremove: function() {
  2632. if (arguments[0] === "" || isNaN(arguments[0])) {
  2633. Alert(GetActiveChat(), "X Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  2634. } else {
  2635. if (CTS.BanKeywordList[arguments[0]] !== undefined) {
  2636. CTS.BanKeywordList.splice(arguments[0], 1);
  2637. Save("BanKeywordList", JSON.stringify(CTS.BanKeywordList));
  2638. Alert(GetActiveChat(), "✓ Command Accepted!");
  2639. } else {
  2640. Alert(GetActiveChat(), "X Command Rejected!\nID was not found!");
  2641. }
  2642. }
  2643. },
  2644. bankeywordlistclear: function() {
  2645. CTS.BanKeywordList = [];
  2646. Save("BanKeywordList", JSON.stringify(CTS.BanKeywordList));
  2647. Alert(GetActiveChat(), "✓ Command Accepted!");
  2648. },
  2649. bankeywordlist: function() {
  2650. Alert(GetActiveChat(), SettingsList.BanKeywordList());
  2651. },
  2652. kickkeywordadd: function() {
  2653. if (arguments[0] === "") {
  2654. Alert(GetActiveChat(), "X Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  2655. } else {
  2656. CTS.KickKeywordList.push(arguments[0]);
  2657. Save("KickKeywordList", JSON.stringify(CTS.KickKeywordList));
  2658. Alert(GetActiveChat(), "✓ Command Accepted!");
  2659. }
  2660. },
  2661. kickkeywordremove: function() {
  2662. if (arguments[0] === "" || isNaN(arguments[0])) {
  2663. Alert(GetActiveChat(), "X Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  2664. } else {
  2665. if (CTS.KickKeywordList[arguments[0]] !== undefined) {
  2666. CTS.KickKeywordList.splice(arguments[0], 1);
  2667. Save("KickKeywordList", JSON.stringify(CTS.KickKeywordList));
  2668. Alert(GetActiveChat(), "✓ Command Accepted!");
  2669. } else {
  2670. Alert(GetActiveChat(), "X Command Rejected!\nID was not found!");
  2671. }
  2672. }
  2673. },
  2674. kickkeywordlistclear: function() {
  2675. CTS.KickKeywordList = [];
  2676. Save("KickKeywordList", JSON.stringify(CTS.KickKeywordList));
  2677. Alert(GetActiveChat(), "✓ Command Accepted!");
  2678. },
  2679. kickkeywordlist: function() {
  2680. Alert(GetActiveChat(), SettingsList.KickKeywordList());
  2681. },
  2682. greetadd: function() {
  2683. if (arguments[0] === "") {
  2684. Alert(GetActiveChat(), "X Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  2685. } else {
  2686. if (CheckUserName(arguments[0])) {
  2687. CTS.GreetList.push(arguments[0].toUpperCase());
  2688. Save("GreetList", JSON.stringify(CTS.GreetList));
  2689. Alert(GetActiveChat(), "✓ Command Accepted!");
  2690. } else {
  2691. Alert(GetActiveChat(), "X Command Rejected!\nArgument passed didn't match criteria!");
  2692. }
  2693. }
  2694. },
  2695. greetremove: function() {
  2696. if (arguments[0] === "" || isNaN(arguments[0])) {
  2697. Alert(GetActiveChat(), "X Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  2698. } else {
  2699. if (CTS.GreetList[arguments[0]] !== undefined) {
  2700. CTS.GreetList.splice(arguments[0], 1);
  2701. Save("GreetList", JSON.stringify(CTS.GreetList));
  2702. Alert(GetActiveChat(), "✓ Command Accepted!");
  2703. } else {
  2704. Alert(GetActiveChat(), "X Command Rejected!\nID was not found!");
  2705. }
  2706. }
  2707. },
  2708. greetlistclear: function() {
  2709. CTS.GreetList = [];
  2710. Save("GreetList", JSON.stringify(CTS.GreetList));
  2711. Alert(GetActiveChat(), "✓ Command Accepted!");
  2712. },
  2713. greetlist: function() {
  2714. Alert(GetActiveChat(), SettingsList.GreetList());
  2715. },
  2716. highlightadd: function() {
  2717. if (arguments[0] === "") {
  2718. Alert(GetActiveChat(), "X Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  2719. } else {
  2720. if (CheckUserNameStrict(arguments[0])) {
  2721. CTS.HighlightList.push(arguments[0].toUpperCase());
  2722. Save("HighlightList", JSON.stringify(CTS.HighlightList));
  2723. Alert(GetActiveChat(), "✓ Command Accepted!");
  2724. } else {
  2725. Alert(GetActiveChat(), "X Command Rejected!\nArgument passed didn't match criteria!");
  2726. }
  2727. }
  2728. },
  2729. highlightremove: function() {
  2730. if (arguments[0] === "" || isNaN(arguments[0])) {
  2731. Alert(GetActiveChat(), "X Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  2732. } else {
  2733. if (CTS.HighlightList[arguments[0]] !== undefined) {
  2734. CTS.HighlightList.splice(arguments[0], 1);
  2735. Save("HighlightList", JSON.stringify(CTS.HighlightList));
  2736. Alert(GetActiveChat(), "✓ Command Accepted!");
  2737. } else {
  2738. Alert(GetActiveChat(), "X Command Rejected!\nID was not found!");
  2739. }
  2740. }
  2741. },
  2742. highlightlistclear: function() {
  2743. CTS.HighlightList = [];
  2744. Save("HighlightList", JSON.stringify(CTS.HighlightList));
  2745. Alert(GetActiveChat(), "✓ Command Accepted!");
  2746. },
  2747. highlightlist: function() {
  2748. Alert(GetActiveChat(), SettingsList.HighlightList());
  2749. },
  2750. opadd: function() {
  2751. if (arguments[0] === "") {
  2752. Alert(GetActiveChat(), "X Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  2753. } else {
  2754. if (CheckUserName(arguments[0])) {
  2755. CTS.BotOPList.push(arguments[0].toUpperCase());
  2756. Save("BotOPList", JSON.stringify(CTS.BotOPList));
  2757. Alert(GetActiveChat(), "✓ Command Accepted!");
  2758. } else {
  2759. Alert(GetActiveChat(), "X Command Rejected!\nArgument passed didn't match criteria!");
  2760. }
  2761. }
  2762. },
  2763. opremove: function() {
  2764. if (arguments[0] === "" || isNaN(arguments[0])) {
  2765. Alert(GetActiveChat(), "X Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  2766. } else {
  2767. if (CTS.BotOPList[arguments[0]] !== undefined) {
  2768. CTS.BotOPList.splice(arguments[0], 1);
  2769. Save("BotOPList", JSON.stringify(CTS.BotOPList));
  2770. Alert(GetActiveChat(), "✓ Command Accepted!");
  2771. } else {
  2772. Alert(GetActiveChat(), "X Command Rejected!\nID was not found!");
  2773. }
  2774. }
  2775. },
  2776. oplistclear: function() {
  2777. CTS.BotOPList = [];
  2778. Save("BotOPList", JSON.stringify(CTS.BotOPList));
  2779. Alert(GetActiveChat(), "✓ Command Accepted!");
  2780. },
  2781. oplist: function() {
  2782. Alert(GetActiveChat(), SettingsList.BotOPList());
  2783. },
  2784. modadd: function() {
  2785. if (arguments[0] === "") {
  2786. Alert(GetActiveChat(), "X Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  2787. } else {
  2788. if (CheckUserNameStrict(arguments[0])) {
  2789. CTS.BotModList.push(arguments[0].toUpperCase());
  2790. Save("BotModList", JSON.stringify(CTS.BotModList));
  2791. Alert(GetActiveChat(), "✓ Command Accepted!");
  2792. } else {
  2793. Alert(GetActiveChat(), "X Command Rejected!\nArgument passed didn't match criteria!");
  2794. }
  2795. }
  2796. },
  2797. modremove: function() {
  2798. if (arguments[0] === "" || isNaN(arguments[0])) {
  2799. Alert(GetActiveChat(), "X Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  2800. } else {
  2801. if (CTS.BotModList[arguments[0]] !== undefined) {
  2802. CTS.BotModList.splice(arguments[0], 1);
  2803. Save("BotModList", JSON.stringify(CTS.BotModList));
  2804. Alert(GetActiveChat(), "✓ Command Accepted!");
  2805. } else {
  2806. Alert(GetActiveChat(), "X Command Rejected!\nID was not found!");
  2807. }
  2808. }
  2809. },
  2810. modlistclear: function() {
  2811. CTS.BotModList = [];
  2812. Save("BotModList", JSON.stringify(CTS.BotModList));
  2813. Alert(GetActiveChat(), "✓ Command Accepted!");
  2814. },
  2815. modlist: function() {
  2816. Alert(GetActiveChat(), SettingsList.BotModList());
  2817. },
  2818. ttsadd: function() {
  2819. if (arguments[0] === "") {
  2820. Alert(GetActiveChat(), "X Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  2821. } else {
  2822. if (arguments[0].match(/^(-all|-event|[a-z0-9_]){1,32}$/i)) {
  2823. CTS.TTSList.push(arguments[0].toUpperCase());
  2824. Save("TTSList", JSON.stringify(CTS.TTSList));
  2825. Alert(GetActiveChat(), "✓ Command Accepted!");
  2826. } else {
  2827. Alert(GetActiveChat(), "X Command Rejected!\nArgument passed didn't match criteria!");
  2828. }
  2829. }
  2830. },
  2831. ttsremove: function() {
  2832. if (arguments[0] === "" || isNaN(arguments[0])) {
  2833. Alert(GetActiveChat(), "X Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  2834. } else {
  2835. if (CTS.TTSList[arguments[0]] !== undefined) {
  2836. CTS.TTSList.splice(arguments[0], 1);
  2837. Save("TTSList", JSON.stringify(CTS.TTSList));
  2838. Alert(GetActiveChat(), "✓ Command Accepted!");
  2839. } else {
  2840. Alert(GetActiveChat(), "X Command Rejected!\nID was not found!");
  2841. }
  2842. }
  2843. },
  2844. ttslistclear: function() {
  2845. CTS.TTSList = [];
  2846. Save("TTSList", JSON.stringify(CTS.TTSList));
  2847. Alert(GetActiveChat(), "✓ Command Accepted!");
  2848. },
  2849. ttslist: function() {
  2850. Alert(GetActiveChat(), SettingsList.TTSList());
  2851. },
  2852. reminderadd: function() {
  2853. if (arguments[0] === "") {
  2854. Alert(GetActiveChat(), "X Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  2855. } else {
  2856. var reminder = arguments[0].match(/^((?:1[0-2]|0?[1-9]):(?:[0-5][0-9])\s?(?:[AaPp][Mm]))\s(.*)/);
  2857. if (reminder === null) {
  2858. Alert(GetActiveChat(), "X Command Rejected!\n!reminderadd 4:18 PM This is an example you can try!");
  2859. } else {
  2860. CTS.ReminderList.push([reminder[1], reminder[2]]);
  2861. Save("ReminderList", JSON.stringify(CTS.ReminderList));
  2862. Alert(GetActiveChat(), "✓ Command Accepted!");
  2863. Reminder();
  2864. }
  2865. }
  2866. },
  2867. reminderremove: function() {
  2868. if (arguments[0] === "" || isNaN(arguments[0])) {
  2869. Alert(GetActiveChat(), "X Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  2870. } else {
  2871. if (CTS.ReminderList[arguments[0]] !== undefined) {
  2872. CTS.ReminderList.splice(arguments[0], 1);
  2873. Save("ReminderList", JSON.stringify(CTS.ReminderList));
  2874. Reminder();
  2875. Alert(GetActiveChat(), "✓ Command Accepted!");
  2876. } else {
  2877. Alert(GetActiveChat(), "X Command Rejected!\nID was not found!");
  2878. }
  2879. }
  2880. },
  2881. reminderlistclear: function() {
  2882. CTS.ReminderList = [];
  2883. Save("ReminderList", JSON.stringify(CTS.ReminderList));
  2884. Alert(GetActiveChat(), "✓ Command Accepted!");
  2885. },
  2886. reminderlist: function() {
  2887. Alert(GetActiveChat(), SettingsList.ReminderList());
  2888. },
  2889. remindertoggle: function() {
  2890. CTS.Reminder = !CTS.Reminder;
  2891. Save("Reminder", JSON.stringify(CTS.Reminder));
  2892. Reminder();
  2893. Settings();
  2894. Alert(GetActiveChat(), "✓ Command Accepted!\n" + ((CTS.Reminder) ? "Reminders are now on!\n" : "Reminders are now off!\n "));
  2895. },
  2896. soundmetertoggle: function() {
  2897. CTS.SoundMeterToggle = !CTS.SoundMeterToggle;
  2898. Save("SoundMeterToggle", JSON.stringify(CTS.SoundMeterToggle));
  2899. SoundMeter();
  2900. Alert(GetActiveChat(), "✓ Command Accepted!\n" + ((CTS.SoundMeterToggle) ? "Sound meter is now on!\n" : "Sound meter is now off!\n "));
  2901. },
  2902. timestamptoggle: function() {
  2903. CTS.TimeStampToggle = !CTS.TimeStampToggle;
  2904. Save("TimeStampToggle", JSON.stringify(CTS.TimeStampToggle));
  2905. Alert(GetActiveChat(), "✓ Command Accepted!\n" + ((CTS.TimeStampToggle) ? "Timestamps are now on!\n" : "Timestamps are now off\n "));
  2906. },
  2907. safeadd: function() {
  2908. if (arguments[0] === "" || arguments[0].toUpperCase() === "GUEST") { // Can't protect guests;
  2909. Alert(GetActiveChat(), "X Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  2910. } else {
  2911. if (CheckUserNameStrict(arguments[0])) {
  2912. if (!CTS.SafeList.includes(arguments[0].toUpperCase())) {
  2913. CTS.SafeList.push(arguments[0].toUpperCase());
  2914. Save("AKB", JSON.stringify(CTS.SafeList));
  2915. Alert(GetActiveChat(), "✓ Command Accepted!");
  2916. } else {
  2917. Alert(GetActiveChat(), "X Name already exists!");
  2918. }
  2919. } else {
  2920. Alert(GetActiveChat(), "X Command Rejected!\nArgument passed didn't match criteria!");
  2921. }
  2922. }
  2923. },
  2924. saferemove: function() {
  2925. if (arguments[0] === "" || isNaN(arguments[0])) {
  2926. Alert(GetActiveChat(), "X Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  2927. } else {
  2928. if (CTS.SafeList[arguments[0]] !== undefined) {
  2929. CTS.SafeList.splice(arguments[0], 1);
  2930. Save("AKB", JSON.stringify(CTS.SafeList));
  2931. Alert(GetActiveChat(), "✓ Command Accepted!");
  2932. } else {
  2933. Alert(GetActiveChat(), "X Command Rejected!\nID was not found!");
  2934. }
  2935. }
  2936. },
  2937. safelistclear: function() {
  2938. CTS.SafeList = [];
  2939. Save("AKB", JSON.stringify(CTS.SafeList));
  2940. Alert(GetActiveChat(), "✓ Command Accepted!");
  2941. },
  2942. safelist: function() {
  2943. Alert(GetActiveChat(), SettingsList.SafeList());
  2944. },
  2945. greenroomadd: function() {
  2946. if (arguments[0] === "" || arguments[0].toUpperCase() === "GUEST") { // Can't protect guests;
  2947. Alert(GetActiveChat(), "X Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  2948. } else {
  2949. if (CheckUserNameStrict(arguments[0])) {
  2950. if (!CTS.GreenRoomList.includes(arguments[0].toUpperCase())) {
  2951. CTS.GreenRoomList.push(arguments[0].toUpperCase());
  2952. Save("GreenRoomList", JSON.stringify(CTS.GreenRoomList));
  2953. Alert(GetActiveChat(), "✓ Command Accepted!");
  2954. } else {
  2955. Alert(GetActiveChat(), "X Name already exists!");
  2956. }
  2957. } else {
  2958. Alert(GetActiveChat(), "X Command Rejected!\nArgument passed didn't match criteria!");
  2959. }
  2960. }
  2961. },
  2962. greenroomremove: function() {
  2963. if (arguments[0] === "" || isNaN(arguments[0])) {
  2964. Alert(GetActiveChat(), "X Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  2965. } else {
  2966. if (CTS.GreenRoomList[arguments[0]] !== undefined) {
  2967. CTS.GreenRoomList.splice(arguments[0], 1);
  2968. Save("GreenRoomList", JSON.stringify(CTS.GreenRoomList));
  2969. Alert(GetActiveChat(), "✓ Command Accepted!");
  2970. } else {
  2971. Alert(GetActiveChat(), "X Command Rejected!\nID was not found!");
  2972. }
  2973. }
  2974. },
  2975. greenroomlistclear: function() {
  2976. CTS.GreenRoomList = [];
  2977. Save("GreenRoomList", JSON.stringify(CTS.GreenRoomList));
  2978. Alert(GetActiveChat(), "✓ Command Accepted!");
  2979. },
  2980. greenroomlist: function() {
  2981. Alert(GetActiveChat(), SettingsList.GreenRoomList());
  2982. },
  2983. greenroomignoreadd: function() {
  2984. if (arguments[0] === "" || arguments[0].toUpperCase() === "GUEST") { // Can't protect guests;
  2985. Alert(GetActiveChat(), "X Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  2986. } else {
  2987. if (CheckUserNameStrict(arguments[0])) {
  2988. if (!CTS.GreenRoomIgnoreList.includes(arguments[0].toUpperCase())) {
  2989. CTS.GreenRoomIgnoreList.push(arguments[0].toUpperCase());
  2990. Save("GreenRoomIgnoreList", JSON.stringify(CTS.GreenRoomIgnoreList));
  2991. Alert(GetActiveChat(), "✓ Command Accepted!");
  2992. } else {
  2993. Alert(GetActiveChat(), "X Name already exists!");
  2994. }
  2995. } else {
  2996. Alert(GetActiveChat(), "X Command Rejected!\nArgument passed didn't match criteria!");
  2997. }
  2998. }
  2999. },
  3000. greenroomignoreremove: function() {
  3001. if (arguments[0] === "" || isNaN(arguments[0])) {
  3002. Alert(GetActiveChat(), "X Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  3003. } else {
  3004. if (CTS.GreenRoomIgnoreList[arguments[0]] !== undefined) {
  3005. CTS.GreenRoomIgnoreList.splice(arguments[0], 1);
  3006. Save("GreenRoomIgnoreList", JSON.stringify(CTS.GreenRoomIgnoreList));
  3007. Alert(GetActiveChat(), "✓ Command Accepted!");
  3008. } else {
  3009. Alert(GetActiveChat(), "X Command Rejected!\nID was not found!");
  3010. }
  3011. }
  3012. },
  3013. greenroomignorelistclear: function() {
  3014. CTS.GreenRoomIgnoreList = [];
  3015. Save("GreenRoomIgnoreList", JSON.stringify(CTS.GreenRoomIgnoreList));
  3016. Alert(GetActiveChat(), "✓ Command Accepted!");
  3017. },
  3018. greenroomignorelist: function() {
  3019. Alert(GetActiveChat(), SettingsList.GreenRoomIgnoreList());
  3020. },
  3021. optoggle: function() {
  3022. CTS.UserYT = !CTS.UserYT;
  3023. Save("UserYT", JSON.stringify(CTS.UserYT));
  3024. Settings();
  3025. Alert(GetActiveChat(), "✓ Command Accepted!\n" + ((CTS.UserYT) ? "Operators can now use YouTube.\n" : "Operators cannot use YouTube.\n"));
  3026. },
  3027. avatartoggle: function() {
  3028. CTS.Avatar = !CTS.Avatar;
  3029. Save("Avatar", JSON.stringify(CTS.Avatar));
  3030. Settings();
  3031. Alert(GetActiveChat(), "✓ Command Accepted!\n" + ((CTS.Avatar) ? "Avatars from now on will be visible!\n " : "Avatars from now on will hidden!\n"));
  3032. },
  3033. popuptoggle: function() {
  3034. CTS.Popups = !CTS.Popups;
  3035. Save("Popups", JSON.stringify(CTS.Popups));
  3036. Settings();
  3037. Alert(GetActiveChat(), "✓ Command Accepted!\n" + ((CTS.Popups) ? "Popups from now on will be visible!\n " : "Popups from now on will hidden!\n"));
  3038. },
  3039. notificationtoggle: function() {
  3040. CTS.NotificationToggle++;
  3041. if (CTS.NotificationToggle >= 3) CTS.NotificationToggle = 0;
  3042. Save("NotificationToggle", JSON.stringify(CTS.NotificationToggle));
  3043. NotificationDisplay();
  3044. Settings();
  3045. Alert(GetActiveChat(), "✓ Command Accepted!\nNotifications " + ((CTS.NotificationToggle == 0) ? "above chat enabled" : (CTS.NotificationToggle == 1) ? "in chat enabled" : "disabled") + ".");
  3046. },
  3047. greetmode: function() {
  3048. CTS.GreetMode = !CTS.GreetMode;
  3049. Save("GreetMode", JSON.stringify(CTS.GreetMode));
  3050. Alert(GetActiveChat(), "✓ Command Accepted!\n" + ((CTS.GreetMode) ? "Server like greet is enabled." : "Server like greet is disabled."));
  3051. },
  3052. imgurtoggle: function() {
  3053. CTS.imgur = !CTS.imgur;
  3054. Save("imgur", JSON.stringify(CTS.imgur));
  3055. Alert(GetActiveChat(), "✓ Command Accepted!\n" + ((CTS.imgur) ? "Imgur preview is enabled." : "Imgur preview is disabled."));
  3056. },
  3057. publiccommandtoggle: function() {
  3058. CTS.PublicCommandToggle = !CTS.PublicCommandToggle;
  3059. Save("PublicCommandToggle", JSON.stringify(CTS.PublicCommandToggle));
  3060. Settings();
  3061. Alert(GetActiveChat(), "✓ Command Accepted!\n" + ((CTS.PublicCommandToggle) ? "Public commands (8Ball, Advice, Chuck, Coin, Dad, Urb) are enabled." : "Public commands (8Ball, Advice, Chuck, Coin, Dad, Urb) are disabled."));
  3062. },
  3063. greenroomtoggle: function() {
  3064. CTS.GreenRoomToggle = !CTS.GreenRoomToggle;
  3065. Save("GreenRoomToggle", JSON.stringify(CTS.GreenRoomToggle));
  3066. Settings();
  3067. Alert(GetActiveChat(), "✓ Command Accepted!\n" + ((CTS.GreenRoomToggle) ? "Green Room Auto Allow ON!" : "Green Room Auto Allow OFF!"));
  3068. },
  3069. clr: function() {
  3070. CTS.MessageCallback = [];
  3071. CTS.Message = [];
  3072. CTS.Message[0] = [];
  3073. window.TinychatApp.getInstance().defaultChatroom._chatlog.items = [];
  3074. ChatLogElement.querySelector("#cts-chat-content").innerHTML = "";
  3075. },
  3076. autokick: function() {
  3077. if (arguments[1] === false && CTS.Me.mod) {
  3078. CTS.AutoKick = !CTS.AutoKick;
  3079. CTS.AutoBan = false;
  3080. Alert(GetActiveChat(), "✓ Command Accepted!\n" + ((CTS.AutoKick) ? "AUTO KICK IS NOW ON!" : "AUTO KICK IS NOW OFF!"));
  3081. if (CTS.AutoKick === true) CheckUserListSafe("kick");
  3082. }
  3083. },
  3084. autoban: function() {
  3085. if (arguments[1] === false && CTS.Me.mod) {
  3086. CTS.AutoBan = !CTS.AutoBan;
  3087. CTS.AutoKick = false;
  3088. Alert(GetActiveChat(), "✓ Command Accepted!\n" + ((CTS.AutoBan) ? "AUTO BAN IS NOW ON!" : "AUTO BAN IS NOW OFF!"));
  3089. if (CTS.AutoBan === true) CheckUserListSafe("ban");
  3090. }
  3091. },
  3092. camsweep: function() {
  3093. if (CTS.Me.mod && CTS.Host === CTS.Me.handle) {
  3094. CTS.Camera.SweepTimer = arguments[0] === "" || isNaN(arguments[0]) ? 5 : (arguments[0] > 30) ? 30 : (arguments[0] < 1) ? 1 : parseInt(arguments[0]);
  3095. CTS.Camera.Sweep = !CTS.Camera.Sweep;
  3096. clearTimeout(CTS.Camera.clearRandom);
  3097. Settings();
  3098. Alert(GetActiveChat(), "✓ Command Accepted!\n" + ((CTS.Camera.Sweep) ? "Camera sweep is now on!\nTime set: " + CTS.Camera.SweepTimer + "min(s)" : "Camera sweep is now off!"));
  3099. }
  3100. },
  3101. bottoggle: function() {
  3102. CTS.Bot = !CTS.Bot;
  3103. Save("Bot", JSON.stringify(CTS.Bot));
  3104. Settings();
  3105. Alert(GetActiveChat(), "✓ Command Accepted!\n" + ((CTS.Bot) ? "You'll now ask !bot bypass on load." : "You'll not !bot bypass on load."));
  3106. },
  3107. votetoggle: function() {
  3108. if (CTS.Me.mod) {
  3109. CTS.VoteSystem = !CTS.VoteSystem;
  3110. CTS.WaitToVoteList = [];
  3111. var len = CTS.UserList.length;
  3112. if (len > 0) {
  3113. for (var i = 0; i < len; i++) CTS.UserList[i].vote = 0;
  3114. }
  3115. Alert(GetActiveChat(), "✓ Command Accepted!\n" + ((CTS.VoteSystem) ? "VOTING IS NOW ON!" : "VOTING IS NOW OFF!"));
  3116. }
  3117. },
  3118. bot: function() {
  3119. if (arguments[1] === false && CTS.Me.mod) Alert(0, "✓ Command Accepted!\nBot bypass was called!");
  3120. },
  3121. share: function() {
  3122. var msg = "CosmosisT's TinyChat Script:\nInstall...\n1. (Tamper Monkey Link)\nhttps://www.tampermonkey.net/\n2. (CTS Link)\nhttps://greasyfork.org/en/scripts/392086\nCTS Discord:\nhttps://discord.gg/cHEf8z7";
  3123. if (GetActiveChat() !== 0) {
  3124. Send("pvtmsg", msg, GetActiveChat());
  3125. PushPM(GetActiveChat(), msg);
  3126. } else {
  3127. Send("msg", msg);
  3128. }
  3129. },
  3130. gameview: function() {
  3131. CTS.CanSeeGames = !CTS.CanSeeGames;
  3132. Save("CanSeeGames", JSON.stringify(CTS.CanSeeGames));
  3133. Settings();
  3134. Alert(GetActiveChat(), "✓ Command Accepted!\n" + ((CTS.CanSeeGames) ? "GAME VIEW IS NOW ON!" : "GAME VIEW IS NOW OFF!"));
  3135. },
  3136. gamehost: function() {
  3137. CTS.CanHostGames = !CTS.CanHostGames;
  3138. Save("CanHostGames", JSON.stringify(CTS.CanHostGames));
  3139. Fish.reset(true, true);
  3140. Settings();
  3141. Alert(GetActiveChat(), "✓ Command Accepted!\n" + ((CTS.CanHostGames) ? "GAME HOSTING IS NOW ON!" : "GAME HOSTING IS NOW OFF!"));
  3142. },
  3143. version: function() {
  3144. if (!CTS.Me.owner) {
  3145. var msg = "I am using " + CTS.Project.Name + "v" + Ver();
  3146. if (GetActiveChat() !== 0) {
  3147. Send("pvtmsg", msg, GetActiveChat());
  3148. PushPM(GetActiveChat(), msg);
  3149. } else {
  3150. Send("msg", msg);
  3151. }
  3152. }
  3153. },
  3154. roll: function() {
  3155. var dice,
  3156. msg = "";
  3157. dice = (arguments[0] === "" || isNaN(arguments[0])) ? 1 : (arguments[0] < 12) ? arguments[0] : 12;
  3158. for (var i = 0; i < dice; i++) msg += Dice();
  3159. if (GetActiveChat() !== 0) {
  3160. Send("pvtmsg", msg, GetActiveChat());
  3161. PushPM(GetActiveChat(), msg);
  3162. } else {
  3163. Send("msg", msg);
  3164. }
  3165. },
  3166. coin: function() {
  3167. if (CTS.Host == 0 || GetActiveChat() !== 0) {
  3168. var msg = "The coin landed on " + ((Rand(0, 1) == 1) ? "heads" : "tails") + "!";
  3169. if (GetActiveChat() !== 0) {
  3170. Send("pvtmsg", msg, GetActiveChat());
  3171. } else {
  3172. Send("msg", msg);
  3173. }
  3174. }
  3175. },
  3176. settings: function() {
  3177. Settings();
  3178. },
  3179. lists: function() {
  3180. Alert(GetActiveChat(), SettingsList.UserList() + SettingsList.UserBanList() + SettingsList.NickBanList() + SettingsList.BanKeywordList() + SettingsList.UserKickList() + SettingsList.NickKickList() + SettingsList.KickKeywordList() + SettingsList.BotOPList() + SettingsList.BotModList() + SettingsList.MentionList() + SettingsList.IgnoreList() + SettingsList.GreetList() + SettingsList.TTSList() + SettingsList.HighlightList() + SettingsList.ReminderList());
  3181. },
  3182. listsclear: function() {
  3183. CTS.MentionList = [];
  3184. CTS.IgnoreList = [];
  3185. CTS.UserBanList = [];
  3186. CTS.UserKickList = [];
  3187. CTS.NickBanList = [];
  3188. CTS.NickKickList = [];
  3189. CTS.BanKeywordList = [];
  3190. CTS.KickKeywordList = [];
  3191. CTS.GreetList = [];
  3192. CTS.HighlightList = [];
  3193. CTS.ReminderList = [];
  3194. CTS.TTSList = [];
  3195. CTS.BotOPList = [];
  3196. CTS.BotModList = [];
  3197. Save("MentionList", JSON.stringify(CTS.MentionList));
  3198. Save("IgnoreList", JSON.stringify(CTS.IgnoreList));
  3199. Save("UserBanList", JSON.stringify(CTS.UserBanList));
  3200. Save("UserKickList", JSON.stringify(CTS.UserKickList));
  3201. Save("NickBanList", JSON.stringify(CTS.NickBanList));
  3202. Save("NickKickList", JSON.stringify(CTS.NickKickList));
  3203. Save("BanKeywordList", JSON.stringify(CTS.BanKeywordList));
  3204. Save("KickKeywordList", JSON.stringify(CTS.KickKeywordList));
  3205. Save("GreetList", JSON.stringify(CTS.GreetList));
  3206. Save("HighlightList", JSON.stringify(CTS.HighlightList));
  3207. Save("ReminderList", JSON.stringify(CTS.ReminderList));
  3208. Save("TTSList", JSON.stringify(CTS.TTSList));
  3209. Save("BotModList", JSON.stringify(CTS.BotModList));
  3210. Save("BotOPList", JSON.stringify(CTS.BotOPList));
  3211. Alert(GetActiveChat(), "✓ Command Accepted!\nItems Mentionlist, igore");
  3212. },
  3213. ytqueue: function() {},
  3214. ytclear: function() {},
  3215. ytskip: function() {},
  3216. yt: function() {},
  3217. ytbypass: function() {}
  3218. };
  3219. var SettingsList = {
  3220. UserList: function() {
  3221. var index,
  3222. msg,
  3223. len = CTS.UserList.length;
  3224. msg = "<b style=\"color:#ee3636;\"><u>User list:</u></b>\n" + ((!len) ? "empty\n" : "");
  3225. for (index = 0; index < len; index++) msg += index + " : " + CTS.UserList[index].username + "\n(" + CTS.UserList[index].nick + ")\n";
  3226. return msg;
  3227. },
  3228. UserBanList: function() {
  3229. var index,
  3230. msg,
  3231. len = CTS.UserBanList.length;
  3232. msg = "<b style=\"color:#ee3636;\"><u>User Ban list:</u></b>\n" + ((!len) ? "empty\n" : "");
  3233. for (index = 0; index < len; index++) msg += index + " : " + CTS.UserBanList[index] + "\n";
  3234. return msg;
  3235. },
  3236. NickBanList: function() {
  3237. var index,
  3238. msg,
  3239. len = CTS.NickBanList.length;
  3240. msg = "<b style=\"color:#ee3636;\"><u>Nick Ban list:</u></b>\n" + ((!len) ? "empty\n" : "");
  3241. for (index = 0; index < len; index++) msg += index + " : " + CTS.NickBanList[index] + "\n";
  3242. return msg;
  3243. },
  3244. BanKeywordList: function() {
  3245. var index,
  3246. msg,
  3247. len = CTS.BanKeywordList.length;
  3248. msg = "<b style=\"color:#ee3636;\"><u>Ban Keyword list:</u></b>\n" + ((!len) ? "empty\n" : "");
  3249. for (index = 0; index < len; index++) msg += index + " : " + HTMLtoTXT(CTS.BanKeywordList[index]) + "\n";
  3250. return msg;
  3251. },
  3252. UserKickList: function() {
  3253. var index,
  3254. msg,
  3255. len = CTS.UserKickList.length;
  3256. msg = "<b style=\"color:#ee3636;\"><u>User Kick list:</u></b>\n" + ((!len) ? "empty\n" : "");
  3257. for (index = 0; index < len; index++) msg += index + " : " + CTS.UserKickList[index] + "\n";
  3258. return msg;
  3259. },
  3260. NickKickList: function() {
  3261. var index,
  3262. msg,
  3263. len = CTS.NickKickList.length;
  3264. msg = "<b style=\"color:#ee3636;\"><u>Nick Kick list:</u></b>\n" + ((!len) ? "empty\n" : "");
  3265. for (index = 0; index < len; index++) msg += index + " : " + CTS.NickKickList[index] + "\n";
  3266. return msg;
  3267. },
  3268. KickKeywordList: function() {
  3269. var index,
  3270. msg,
  3271. len = CTS.KickKeywordList.length;
  3272. msg = "<b style=\"color:#ee3636;\"><u>Kick Keyword list:</u></b>\n" + ((!len) ? "empty\n" : "");
  3273. for (index = 0; index < len; index++) msg += index + " : " + HTMLtoTXT(CTS.KickKeywordList[index]) + "\n";
  3274. return msg;
  3275. },
  3276. BotOPList: function() {
  3277. var index,
  3278. msg,
  3279. len = CTS.BotOPList.length;
  3280. msg = "<b style=\"color:#ee3636;\"><u>Bot OP list:</u></b>\n" + ((!len) ? "empty\n" : "");
  3281. for (index = 0; index < len; index++) msg += index + " : " + CTS.BotOPList[index] + "\n";
  3282. return msg;
  3283. },
  3284. BotModList: function() {
  3285. var index,
  3286. msg,
  3287. len = CTS.BotModList.length;
  3288. msg = "<b style=\"color:#ee3636;\"><u>Bot Mod list:</u></b>\n" + ((!len) ? "empty\n" : "");
  3289. for (index = 0; index < len; index++) msg += index + " : " + CTS.BotModList[index] + "\n";
  3290. return msg;
  3291. },
  3292. MentionList: function() {
  3293. var index,
  3294. msg,
  3295. len = CTS.MentionList.length;
  3296. msg = "<b style=\"color:#ee3636;\"><u>Mention list:</u></b>\n" + ((!len) ? "empty\n" : "");
  3297. for (index = 0; index < len; index++) msg += index + " : " + HTMLtoTXT(CTS.MentionList[index]) + "\n";
  3298. return msg;
  3299. },
  3300. IgnoreList: function() {
  3301. var index,
  3302. msg,
  3303. len = CTS.IgnoreList.length;
  3304. msg = "<b style=\"color:#ee3636;\"><u>Ignore list:</u></b>\n" + ((!len) ? "empty\n" : "");
  3305. for (index = 0; index < len; index++) msg += index + " : " + CTS.IgnoreList[index] + "\n";
  3306. return msg;
  3307. },
  3308. GreetList: function() {
  3309. var index,
  3310. msg,
  3311. len = CTS.GreetList.length;
  3312. msg = "<b style=\"color:#ee3636;\"><u>Greet list:</u></b>\n" + ((!len) ? "empty\n" : "");
  3313. for (index = 0; index < len; index++) msg += index + " : " + CTS.GreetList[index] + "\n";
  3314. return msg;
  3315. },
  3316. TTSList: function() {
  3317. var index,
  3318. msg,
  3319. len = CTS.TTSList.length;
  3320. msg = "<b style=\"color:#ee3636;\"><u>TTS list:</u></b>\n" + ((!len) ? "empty\n" : "");
  3321. for (index = 0; index < len; index++) msg += index + " : " + CTS.TTSList[index] + "\n";
  3322. return msg;
  3323. },
  3324. HighlightList: function() {
  3325. var index,
  3326. msg,
  3327. len = CTS.HighlightList.length;
  3328. msg = "<b style=\"color:#ee3636;\"><u>Highlight list:</u></b>\n" + ((!len) ? "empty\n" : "");
  3329. for (index = 0; index < len; index++) msg += index + " : " + CTS.HighlightList[index] + "\n";
  3330. return msg;
  3331. },
  3332. ReminderList: function() {
  3333. var index,
  3334. msg,
  3335. len = CTS.ReminderList.length;
  3336. msg = "<b style=\"color:#ee3636;\"><u>Reminder list:</u></b>\n" + ((!len) ? "empty\n" : "");
  3337. for (index = 0; index < len; index++) msg += index + ": [" + CTS.ReminderList[index][0] + "] " + HTMLtoTXT(CTS.ReminderList[index][1]) + "\n";
  3338. return msg;
  3339. },
  3340. SafeList: function() {
  3341. var index,
  3342. msg,
  3343. len = CTS.SafeList.length;
  3344. msg = "<b style=\"color:#ee3636;\"><u>Safe list:</u></b>\n" + ((!len) ? "empty\n" : "");
  3345. for (index = 0; index < len; index++) msg += index + ": " + CTS.SafeList[index] + "\n";
  3346. return msg;
  3347. },
  3348. GreenRoomList: function() {
  3349. var index,
  3350. msg,
  3351. len = CTS.GreenRoomList.length;
  3352. msg = "<b style=\"color:#ee3636;\"><u>Green Room list:</u></b>\n" + ((!len) ? "empty\n" : "");
  3353. for (index = 0; index < len; index++) msg += index + ": " + CTS.GreenRoomList[index] + "\n";
  3354. return msg;
  3355. },
  3356. GreenRoomIgnoreList: function() {
  3357. var index,
  3358. msg,
  3359. len = CTS.GreenRoomIgnoreList.length;
  3360. msg = "<b style=\"color:#ee3636;\"><u>Green Room Ignore list:</u></b>\n" + ((!len) ? "empty\n" : "");
  3361. for (index = 0; index < len; index++) msg += index + ": " + CTS.GreenRoomIgnoreList[index] + "\n";
  3362. return msg;
  3363. }
  3364. };
  3365. var MessageQueueList = {
  3366. add: function() {
  3367. CTS.SendQueue.push(arguments[0]);
  3368. MessageQueueList.run();
  3369. },
  3370. run: function() {
  3371. if (CTS.SendQueue !== undefined && CTS.SendQueue.length > 0) {
  3372. setTimeout(function() {
  3373. var temp = new Date();
  3374. var OffsetTime = temp - CTS.LastMessage;
  3375. if (OffsetTime >= 1500) {
  3376. CTS.LastMessage = new Date();
  3377. CTS.SocketTarget.send(CTS.SendQueue[0]);
  3378. CTS.SendQueue.shift();
  3379. }
  3380. MessageQueueList.run();
  3381. }, 1600, CTS.LastMessage);
  3382. }
  3383. }
  3384. };
  3385. var ServerSendList = {
  3386. msg: function() {
  3387. var obj = {
  3388. "tc": arguments[0]
  3389. };
  3390. if (arguments[2] !== undefined) {
  3391. obj.handle = arguments[1];
  3392. CTS.SocketTarget.send(JSON.stringify(obj));
  3393. } else {
  3394. if (arguments[1] !== undefined) {
  3395. obj.text = arguments[1];
  3396. MessageQueueList.add(JSON.stringify(obj));
  3397. } else {
  3398. CTS.SocketTarget.send(JSON.stringify(obj));
  3399. }
  3400. }
  3401. },
  3402. pvtmsg: function() {
  3403. var obj = {
  3404. "tc": arguments[0],
  3405. "text": arguments[1],
  3406. "handle": Number(arguments[2])
  3407. };
  3408. MessageQueueList.add(JSON.stringify(obj));
  3409. },
  3410. kick: function() {
  3411. CheckSafeList(arguments[1], true);
  3412. ServerSendList.msg(arguments[0], arguments[1], "kick");
  3413. },
  3414. ban: function() {
  3415. CheckSafeList(arguments[1], true);
  3416. ServerSendList.msg(arguments[0], arguments[1], "ban");
  3417. },
  3418. nick: function() {
  3419. var obj = {
  3420. "tc": "nick",
  3421. "nick": arguments[1]
  3422. };
  3423. CTS.SocketTarget.send(JSON.stringify(obj));
  3424. },
  3425. stream_moder_close: function() {
  3426. CheckSafeList(arguments[1], true);
  3427. ServerSendList.msg(arguments[0], arguments[1], "stream_moder_close");
  3428. },
  3429. stream_moder_allow: function() {
  3430. ServerSendList.msg(arguments[0], arguments[1], "stream_moder_allow");
  3431. },
  3432. yut_playlist_add: function() {
  3433. var obj = {
  3434. "tc": arguments[0],
  3435. "item": {
  3436. "id": arguments[1][0],
  3437. "duration": arguments[1][1] + 10,
  3438. "title": arguments[1][2],
  3439. "image": arguments[1][3]
  3440. }
  3441. };
  3442. if (arguments[1][4] !== undefined) obj.item.offset = arguments[1][4];
  3443. CTS.SocketTarget.send(JSON.stringify(obj));
  3444. },
  3445. yut_playlist_remove: function() {
  3446. ServerSendList.yut_playlist_add(arguments[0], arguments[1]);
  3447. },
  3448. yut_stop: function() {
  3449. ServerSendList.yut_playlist_add(arguments[0], arguments[1]);
  3450. },
  3451. yut_play: function() {
  3452. ServerSendList.yut_playlist_add(arguments[0], arguments[1]);
  3453. },
  3454. yut_playlist: function() {
  3455. ServerSendList.msg("yut_playlist");
  3456. },
  3457. yut_playlist_clear: function() {
  3458. ServerSendList.msg("yut_playlist_clear");
  3459. }
  3460. };
  3461. var ServerInList = {
  3462. joined: function() {
  3463. Reset();
  3464. CTS.Me = {
  3465. "handle": arguments[0].self.handle,
  3466. "username": (arguments[0].self.username === "") ? "GUEST" : arguments[0].self.username.toUpperCase(),
  3467. "nick": arguments[0].self.nick,
  3468. "owner": arguments[0].self.owner,
  3469. "mod": arguments[0].self.mod,
  3470. "namecolor": window.CTSNameColor[Rand(0, window.CTSNameColor.length - 1)],
  3471. "avatar": arguments[0].self.avatar
  3472. };
  3473. if (CTS.Me.nick.match(/^guest(?:\-[0-9]{1,10})?/i) && CTS.Me.username !== "GUEST") Send("nick", CTS.Me.username); //AUTO CORRECT NAME
  3474. if (CTS.Me.mod && CTS.Bot && CTS.ScriptInit && CTS.SocketConnected) CheckHost();
  3475. CTS.Room = {
  3476. "Avatar": arguments[0].room.avatar,
  3477. "Bio": arguments[0].room.biography,
  3478. "Name": arguments[0].room.name,
  3479. "PTT": arguments[0].room.pushtotalk,
  3480. "Website": arguments[0].room.website,
  3481. "YT_ON": arguments[0].room.youtube_enabled,
  3482. "Recent_Gifts": arguments[0].room.recent_gifts
  3483. };
  3484. CTS.SocketConnected = true;
  3485. },
  3486. userlist: function() {
  3487. var len = arguments[0].users.length;
  3488. for (var user = 0; user < len; user++) {
  3489. AKBS(arguments[0].users[user]);
  3490. var username = (arguments[0].users[user].username === "") ? "GUEST" : arguments[0].users[user].username.toUpperCase();
  3491. CheckUserAbuse(arguments[0].users[user].handle, username, arguments[0].users[user].nick);
  3492. CTS.UserList.push({
  3493. "handle": arguments[0].users[user].handle,
  3494. "username": username,
  3495. "nick": arguments[0].users[user].nick,
  3496. "owner": arguments[0].users[user].owner,
  3497. "mod": arguments[0].users[user].mod,
  3498. "namecolor": window.CTSNameColor[Rand(0, window.CTSNameColor.length - 1)],
  3499. "avatar": (arguments[0].users[user].avatar === "") ? "https://avatars.tinychat.com/standart/small/eyePink.png" : arguments[0].users[user].avatar,
  3500. "canGame": (arguments[0].users[user].username !== "GUEST") ? true : false,
  3501. "broadcasting": false,
  3502. "vote": 0
  3503. });
  3504. }
  3505. RoomUsers();
  3506. debug();
  3507. },
  3508. join: function() {
  3509. AKBS(arguments[0]);
  3510. var user = (arguments[0].username === "") ? "GUEST" : arguments[0].username.toUpperCase();
  3511. CheckUserAbuse(arguments[0].handle, user, arguments[0].nick);
  3512. if (CTS.HighlightList.includes(user) && CTS.enableSound === true) window.CTSSound.HIGHLIGHT.play();
  3513. if (user === "COSMOSIST" && CTS.Room.Name.toUpperCase() !== "STONERCIRCLE" && !CTS.hasGreetedWC) { // Meet your creator
  3514. CTS.hasGreetedWC = true;
  3515. if (CTS.enableSound === true) window.CTSSound.C.play();
  3516. Send("msg", "HI! " + arguments[0].nick.toUpperCase() + "!");
  3517. } else {
  3518. if ((CTS.GreetList.includes(user) || (CTS.Host == CTS.Me.handle && CTS.GreetList.includes("-ALL"))) && CTS.NoGreet === false) {
  3519. Send("msg", (window.CTSWelcomes[Rand(0, window.CTSWelcomes.length - 1)] + arguments[0].nick.toUpperCase()) + ((CTS.GreetMode) ? ".\n" + (((user != "GUEST") ? "You are signed in as " + user : "You are not signed in") + ".\nWelcome to the room!") : "!"));
  3520. if (CTS.enableSound === true) window.CTSSound.GREET.play();
  3521. }
  3522. }
  3523. CTS.NoGreet = false;
  3524. AddUser(arguments[0].handle, arguments[0].mod, window.CTSNameColor[Rand(0, window.CTSNameColor.length - 1)], (arguments[0].avatar === "") ? "https://avatars.tinychat.com/standart/small/eyePink.png" : arguments[0].avatar, arguments[0].nick, user, ((user !== "GUEST") ? true : false), arguments[0].owner);
  3525. RoomUsers();
  3526. debug();
  3527. },
  3528. sysmsg: function() {
  3529. if (CTS.Me.mod) {
  3530. var action = arguments[0].text.match(/^([a-z0-9_]{1,32}):?\s(closed|banned|kicked)\s([a-z0-9_]{1,32})$/i);
  3531. if (action !== null) {
  3532. var user;
  3533. if (action[2] == "closed" || action[2] == "banned" || action[2] == "kicked") {
  3534. user = NicknameToUser(action[3].toUpperCase());
  3535. if (user != -1) {
  3536. var a = CTS.GreenRoomList.indexOf(CTS.UserList[user].username);
  3537. if (a !== -1) {
  3538. //REMOVE
  3539. debug("GREENROOMLIST::", "REMOVE USER " + CTS.UserList[user].username + " FROM GREENROOMLIST");
  3540. Alert(GetActiveChat(), "✓ Removing " + CTS.UserList[user].username + " from greenroomlist!");
  3541. CommandList.greenroomremove(a);
  3542. }
  3543. }
  3544. }
  3545. }
  3546. }
  3547. AddSystemNotification(HTMLtoTXT(arguments[0].text));
  3548. debug();
  3549. },
  3550. nick: function() {
  3551. var user = HandleToUser(arguments[0].handle);
  3552. if (user != -1) {
  3553. AddUserNotification(4, CTS.UserList[user].namecolor, CTS.UserList[user].nick, CTS.UserList[user].username, true, arguments[0].nick);
  3554. if ((CTS.GreetList.includes(CTS.UserList[user].username) || (CTS.Host == CTS.Me.handle && CTS.GreetList.includes("-ALL"))) && CTS.NoGreet === false) Send("msg", CTS.UserList[user].nick + "\nwith the account name " + CTS.UserList[user].username + " changed their name to " + arguments[0].nick);
  3555. CTS.UserList[user].nick = arguments[0].nick;
  3556. if (CTS.Me.handle == arguments[0].handle) CTS.Me.nick = arguments[0].nick;
  3557. CheckUserAbuse(arguments[0].handle, CTS.UserList[user].username, arguments[0].nick);
  3558. }
  3559. debug();
  3560. },
  3561. stream_connected: function() {
  3562. if (CTS.Host === CTS.Me.handle && CTS.GreenRoomToggle && arguments[0].publish == false && CTS.Me.handle !== arguments[0].handle && !CTS.Camera.List.includes(arguments[0].handle)) {
  3563. //USER IS NOT ON CAMERA START AUTO ACCEPT PROCESS
  3564. var user = HandleToUser(arguments[0].handle);
  3565. if (user != -1) {
  3566. debug("CAMERA::WAITING", "nickname:" + CTS.UserList[user].nick);
  3567. if (!CTS.GreenRoomIgnoreList.includes(CTS.UserList[user].username) && CTS.GreenRoomList.includes(CTS.UserList[user].username)) Send("stream_moder_allow", CTS.UserList[user].handle);
  3568. }
  3569. }
  3570. debug();
  3571. },
  3572. stream_closed: function() {
  3573. debug();
  3574. },
  3575. publish: function() { //ADD GLOBAL CAMERA
  3576. CheckUserStream(arguments[0].handle, true);
  3577. debug();
  3578. },
  3579. unpublish: function() { //REMOVE GLOBAL CAMERA
  3580. CheckUserStream(arguments[0].handle, false);
  3581. debug();
  3582. },
  3583. ping: function() {
  3584. if (CTS.ScriptInit) {
  3585. var verify;
  3586. if (CTS.WatchList.length > 0) {
  3587. verify = new Date() - CTS.WatchList[0][2];
  3588. debug("WATCHLIST::LIST", CTS.WatchList);
  3589. debug("WATCHLIST::VERIFYING", CTS.WatchList[0][0] + " " + verify + "/700000");
  3590. if (CTS.SafeList.indexOf(CTS.WatchList[0][0]) === -1) { //LET'S NOT ADD TWICE
  3591. if (verify > 700000) {
  3592. debug("WATCHLIST::VERIFIED", CTS.WatchList[0][0] + " " + verify + "/700000");
  3593. CTS.SafeList.push(CTS.WatchList[0][0]);
  3594. CTS.WatchList.shift();
  3595. }
  3596. } else {
  3597. CTS.WatchList.shift();
  3598. }
  3599. }
  3600. if (CTS.WaitToVoteList.length > 0) {
  3601. verify = new Date() - CTS.WaitToVoteList[0][1];
  3602. debug("VOTE::LIST", CTS.WaitToVoteList);
  3603. debug("VOTE::WAIT", CTS.WaitToVoteList[0][0] + " " + verify + "/300000");
  3604. if (verify > 300000) {
  3605. debug("VOTE::READY", CTS.WaitToVoteList[0][0] + " " + verify + "/300000");
  3606. CTS.WaitToVoteList.shift();
  3607. }
  3608. }
  3609. }
  3610. //DISPOSE OF ITEMS
  3611. window.TinychatApp.getInstance().defaultChatroom._chatlog.items = [];
  3612. window.TinychatApp.getInstance().defaultChatroom.packetWorker.queue = {};
  3613. debug();
  3614. },
  3615. quit: function() {
  3616. if (CTS.ScriptInit) {
  3617. if (CTS.WatchList.length > 0) {
  3618. var len = CTS.WatchList.length;
  3619. for (var i = 0; i < len; i++) {
  3620. if (CTS.WatchList[i][1] == arguments[0].handle) {
  3621. CTS.WatchList.splice(i, 1);
  3622. break;
  3623. }
  3624. }
  3625. }
  3626. if (CTS.Me.mod) RemoveUserCamera(arguments[0].handle);
  3627. var user = HandleToUser(arguments[0].handle);
  3628. if (user != -1) {
  3629. if (CTS.Me.handle === CTS.Host && Fish.getPlayer(arguments[0].handle, true, false)) Send("msg", CTS.Game.Fish.UserQuitLast + ", has slipped off the boat; I don't think we should look back.");
  3630. //SEND THEM OUT
  3631. AddUserNotification(2, CTS.UserList[user].namecolor, CTS.UserList[user].nick, CTS.UserList[user].username, true);
  3632. CTS.UserList.splice(user, 1);
  3633. }
  3634. RoomUsers();
  3635. if (CTS.Host == arguments[0].handle) {
  3636. CTS.Host = 0;
  3637. CTS.Camera.Sweep = false;
  3638. if (CTS.Me.mod && CTS.Bot) {
  3639. setTimeout(function() {
  3640. if (CTS.Host == 0) SetBot(false);
  3641. }, (Rand(10, 30) * 1000));
  3642. }
  3643. }
  3644. }
  3645. debug();
  3646. },
  3647. msg: function() {
  3648. if (CTS.ScriptInit) {
  3649. var user = HandleToUser(arguments[0].handle);
  3650. if (user != -1) {
  3651. if (!SpamPrevention(arguments[0].text, CTS.UserList[user].mod)) {
  3652. if (GamePrevention(arguments[0].text, CTS.UserList[user].mod)) {
  3653. var text = HTMLtoTXT(arguments[0].text);
  3654. //ALL USERS REPORT
  3655. OwnerCommand(user, arguments[0].text);
  3656. BotCheck(user, text, arguments[0]);
  3657. //MODERATORS
  3658. if (CTS.Me.mod) {
  3659. if (CTS.Host == CTS.Me.handle) BotCommandCheck(user, text);
  3660. CheckUserWordAbuse(user, arguments[0].text);
  3661. }
  3662.  
  3663. if (!CheckUserIgnore(user) && !CheckUserTempIgnore(user) && IgnoreText(text)) {
  3664. //PUSH MESSAGE
  3665. text = CheckImgur(text);
  3666. CTS.Message[0].push({
  3667. "time": Time(),
  3668. "namecolor": CTS.UserList[user].namecolor,
  3669. "avatar": CTS.UserList[user].avatar,
  3670. "username": CTS.UserList[user].username,
  3671. "nick": CTS.UserList[user].nick,
  3672. "msg": text,
  3673. "mention": false
  3674. });
  3675. var msg = CTS.Message[0][CTS.Message[0].length - 1];
  3676. if (CTS.Me.handle !== arguments[0].handle) {
  3677. if (CTS.UserList[user].mod && (text.match(/^!autokick$/i) || text.match(/^!autoban$/i))) {
  3678. Alert(GetActiveChat(), "✓ AntiSpam Watch List CLEARED!\nAnother user has initiated autokick/autoban.");
  3679. CTS.AutoKick = false;
  3680. CTS.AutoBan = false;
  3681. }
  3682. if (CTS.enableSound === true) {
  3683. if (CTS.UserList.length <= 14) window.CTSSound.MSG.play();
  3684. if (CTS.TTS.synth !== undefined && (CTS.TTSList.includes(CTS.UserList[user].username) || CTS.TTSList.includes("-ALL"))) TTS(CTS.UserList[user].nick + ((!text.match(/(?:^!)|(?:https?|www|\uD83C\uDFB5)/gim)) ? " said, " + text : "is box banging!"));
  3685. }
  3686. var len = CTS.MentionList.length;
  3687. for (var i = 0; i < len; i++) {
  3688. if (text.toUpperCase().includes(CTS.MentionList[i])) {
  3689. if (CTS.enableSound === true) window.CTSSound.MENTION.play();
  3690. msg.mention = true;
  3691. AddUserNotification(3, CTS.UserList[user].namecolor, CTS.UserList[user].nick, CTS.UserList[user].username, true);
  3692. }
  3693. }
  3694. }
  3695. if (GetActiveChat() === 0) CreateMessage(msg.time, msg.namecolor, msg.avatar, msg.username, msg.nick, msg.msg, msg.mention, 0);
  3696. MessagePopUp(user, text, true, false);
  3697. }
  3698. }
  3699. } else {
  3700. if (CTS.Me.mod) Send("kick", arguments[0].handle);
  3701. }
  3702. }
  3703. }
  3704. debug();
  3705. },
  3706. pvtmsg: function() {
  3707. if (CTS.ScriptInit) {
  3708. if (CTS.enablePMs === true) {
  3709. if (arguments[0].handle != CTS.Me.handle) {
  3710. var user = HandleToUser(arguments[0].handle);
  3711. if (user != -1) {
  3712. if (!SpamPrevention(arguments[0].text, CTS.UserList[user].mod)) {
  3713. if (GamePrevention(arguments[0].text, CTS.UserList[user].mod)) {
  3714. var text = arguments[0].text;
  3715. if (CTS.Me.mod) CheckUserWordAbuse(user, arguments[0].text);
  3716. if (!CheckUserIgnore(user) && !CheckUserTempIgnore(user) && IgnoreText(text)) {
  3717. if (!CTS.Message[arguments[0].handle]) CTS.Message[arguments[0].handle] = [];
  3718. PushPM(arguments[0].handle, text, user);
  3719. if (CTS.enableSound === true) {
  3720. window.CTSSound.PVTMSG.play();
  3721. if (CTS.TTS.synth !== undefined && (CTS.TTSList.includes(CTS.UserList[user].username) || CTS.TTSList.includes("-ALL"))) TTS(CTS.UserList[user].nick + ((!text.match(/(?:^!)|(?:https?|www)/gim)) ? " said, " + text : "is box banging!"));
  3722. }
  3723. MessagePopUp(user, CheckImgur(HTMLtoTXT(text)), false, false);
  3724. }
  3725. }
  3726. } else {
  3727. if (CTS.Me.mod) Send("kick", arguments[0].handle);
  3728. }
  3729. }
  3730. }
  3731. }
  3732. }
  3733. debug();
  3734. },
  3735. gift: function() {
  3736. window.CreateGift(arguments[0]);
  3737. debug();
  3738. },
  3739. yut_playlist_add: function() {
  3740. if (CTS.ScriptInit) {
  3741. if (!CTS.YouTube.Playing) {
  3742. if (CTS.PlayListStart === true) CTS.PlayListStart = false;
  3743. if (CTS.Host != CTS.Me.handle) {
  3744. Send("msg", "!play");
  3745. } else {
  3746. YouTubePlayList();
  3747. }
  3748. }
  3749. }
  3750. debug();
  3751. },
  3752. yut_playlist: function() {
  3753. if (CTS.ScriptInit) {
  3754. if (CTS.Me.mod && CTS.Me.handle == CTS.Host) {
  3755. if (CTS.YouTube.Clear === true) {
  3756. if (arguments[0].items !== null) Send("yut_playlist_clear");
  3757. CTS.YouTube.MessageQueueList = [];
  3758. Send("msg", "🎵YouTube cleared!🎵");
  3759. CTS.YouTube.Clear = false;
  3760. } else {
  3761. if (arguments[0].items === null) {
  3762. CTS.PlayListStart = true;
  3763. } else {
  3764. CTS.YouTube.PlayListCount = arguments[0].items.length;
  3765. CTS.PlayListStart = false;
  3766. if (CTS.YouTube.ShowQueue === true) {
  3767. var msg = "🎵" + CTS.YouTube.PlayListCount + " track(s) in queue!🎵";
  3768. for (var i = 0; i < 3; i++) {
  3769. if (arguments[0].items[i] === undefined) break;
  3770. msg = msg + "\n" + (i + 1) + ": " + arguments[0].items[i].title + "\n[" + Math.floor(arguments[0].items[i].duration / 60) + "M" + (arguments[0].items[i].duration % 60) + "S]";
  3771. }
  3772. Send("msg", msg);
  3773. }
  3774. }
  3775. if (arguments[0].items !== null && CTS.Host == CTS.Me.handle && CTS.YouTube.Playing === false) CheckYouTube("https://www.youtube.com/watch?v=" + arguments[0].items[0].id, false);
  3776. }
  3777. CTS.YouTube.ShowQueue = false;
  3778. }
  3779. }
  3780. debug();
  3781. },
  3782. yut_play: function() {
  3783. if (CTS.ScriptInit) {
  3784. if (CTS.YouTube.CurrentTrack.ID != arguments[0].item.id) {
  3785. CTS.YouTube.CurrentTrack.ID = arguments[0].item.id;
  3786. CTS.YouTube.CurrentTrack.duration = arguments[0].item.duration;
  3787. CTS.YouTube.CurrentTrack.title = arguments[0].item.title;
  3788. CTS.YouTube.CurrentTrack.thumbnail = arguments[0].item.image;
  3789. MessagePopUp(-1, CTS.YouTube.CurrentTrack.title + " is now playing!", true, true);
  3790. }
  3791. CTS.YouTube.Playing = true;
  3792. YouTubePlayList();
  3793. }
  3794. debug();
  3795. },
  3796. yut_stop: function() {
  3797. if (CTS.ScriptInit) {
  3798. CTS.YouTube.CurrentTrack.ID = undefined;
  3799. CTS.YouTube.CurrentTrack.duration = undefined;
  3800. CTS.YouTube.CurrentTrack.title = undefined;
  3801. CTS.YouTube.CurrentTrack.thumbnail = undefined;
  3802. CTS.YouTube.Playing = false;
  3803. YouTubePlayList();
  3804. }
  3805. debug();
  3806. }
  3807. };
  3808. var ServerOutList = {
  3809. pvtmsg: function() {
  3810. if (CTS.ScriptInit) {
  3811. Command(arguments[0].text, true);
  3812. var text = arguments[0].text;
  3813. if (!CTS.Message[arguments[0].handle]) CTS.Message[arguments[0].handle] = [];
  3814. PushPM(arguments[0].handle, text);
  3815. }
  3816. debug();
  3817. },
  3818. msg: function() {
  3819. if (CTS.ScriptInit) {
  3820. CTS.LastMessage = new Date();
  3821. Command(arguments[0].text, false);
  3822. }
  3823. debug();
  3824. },
  3825. ban: function() {
  3826. CheckSafeList(arguments[0].handle, true);
  3827. debug();
  3828. },
  3829. kick: function() {
  3830. CheckSafeList(arguments[0].handle, true);
  3831. debug();
  3832. },
  3833. stream_moder_close: function() {
  3834. CheckSafeList(arguments[0].handle, true);
  3835. debug();
  3836. }
  3837. };
  3838. //ADDON
  3839. var Addon = {
  3840. active: function() {
  3841. if (window.CTSAddon !== undefined) {
  3842. if (window.CTSAddon[arguments[0]] !== undefined) {
  3843. return true;
  3844. }
  3845. }
  3846. return false;
  3847. },
  3848. get: function() {
  3849. return window.CTSAddon[arguments[0]];
  3850. }
  3851. };
  3852. //XMLHttpRequest
  3853. CTS.YouTube.XHR.onload = function() {
  3854. var response = JSON.parse(CTS.YouTube.XHR.responseText);
  3855. if (response.error) {
  3856. Send("msg", "⛔" + ((response.error.errors[0].reason) ? response.error.errors[0].reason : "Track could not be added!") + "⛔");
  3857. } else {
  3858. if (response.kind == "youtube#playlistItemListResponse" && response.nextPageToken === undefined && response.items.length === 0) {
  3859. CTS.YouTube.ListBuilt = true;
  3860. Send("msg", "🎵Found " + CTS.YouTube.MessageQueueList.length + " tracks!\nThis may take a few moments to add, requests can be made shortly.🎵");
  3861. CTS.YouTube.DataReady = true;
  3862. CTS.YouTube.Busy = false;
  3863. YouTubeTrackAdd();
  3864. }
  3865. CTS.YouTube.DataReady = false;
  3866. if (response.items[0]) {
  3867. CTS.YouTube.Busy = true;
  3868. if (response.items[0].id) {
  3869. if (response.kind == "youtube#playlistItemListResponse") {
  3870. YouTubePlayListItems(response.items);
  3871. } else {
  3872. CTS.YouTube.VideoID = response.items[0].id.videoId;
  3873. CTS.YouTube.XHR.open("GET", "https://www.googleapis.com/youtube/v3/videos?id=" + CTS.YouTube.VideoID + "&type=video&eventType=completed&part=contentDetails,snippet&fields=items/snippet/title,items/snippet/thumbnails/medium,items/contentDetails/duration&eventType=completed&key=" + CTS.YouTube.API_KEY);
  3874. CTS.YouTube.XHR.send();
  3875. }
  3876. } else if (response.items[0].contentDetails.duration) {
  3877. CTS.YouTube.DataReady = true;
  3878. }
  3879. if (CTS.YouTube.DataReady === false) {
  3880. CTS.YouTube.Busy = false;
  3881. if (response.kind == "youtube#searchListResponse") CTS.YouTube.XHR.videoid = response.items[0].id.videoId;
  3882. if (response.kind == "youtube#playlistItemListResponse") {
  3883. CTS.YouTube.ListBuilt = true;
  3884. Send("msg", "🎵Adding " + CTS.YouTube.MessageQueueList.length + " track(s) to queue!🎵\nEnjoy!");
  3885. CTS.YouTube.Busy = false;
  3886. }
  3887. } else {
  3888. CTS.YouTube.VideoID = (CTS.YouTube.XHR.videoid) ? CTS.YouTube.XHR.videoid : CTS.YouTube.MessageQueueList[0].snippet.resourceId.videoId;
  3889. if (CTS.YouTube.Playing === true) {
  3890. MessagePopUp(-1, "Added " + ((response.items[0] === undefined) ? response.items.snippet.title : response.items[0].snippet.title), true, true);
  3891. Send("yut_playlist_add", [CTS.YouTube.VideoID, YouTubeTimeConvert(response.items[0].contentDetails.duration), ((response.items[0] === undefined) ? response.items.snippet.title : response.items[0].snippet.title), (response.items[0] === undefined) ? response.items.snippet.thumbnails.medium.url : response.items[0].snippet.thumbnails.medium.url]);
  3892. CTS.YouTube.Busy = false;
  3893. } else {
  3894. if (response.items[0].snippet.title !== undefined) {
  3895. Send("yut_play", [CTS.YouTube.VideoID, YouTubeTimeConvert(response.items[0].contentDetails.duration), response.items[0].snippet.title, response.items[0].snippet.thumbnails.medium.url, 0]);
  3896. Send("yut_playlist_remove", [CTS.YouTube.XHR.videoid, YouTubeTimeConvert(response.items[0].contentDetails.duration), response.items[0].snippet.title, response.items[0].snippet.thumbnails.medium.url]);
  3897. CTS.YouTube.Playing = true;
  3898. }
  3899. CTS.YouTube.Busy = false;
  3900. }
  3901. }
  3902. }
  3903. if (CTS.YouTube.SearchReturn === true || (CTS.YouTube.SearchReturn === false && CTS.YouTube.VideoReturn === true && CTS.YouTube.XHR.type === true)) {
  3904. var title = "";
  3905. CTS.YouTube.SearchReturn = false;
  3906. CTS.YouTube.VideoReturn = false;
  3907. if (response.items[0] !== undefined) {
  3908. if (response.items[0].length > 0) title = response.items[0].snippet.title;
  3909. }
  3910. if (response.items !== undefined) {
  3911. if (response.items.length > 0) title = response.items[0].snippet.title;
  3912. }
  3913. Send("msg", ((title === "") ? "⛔Track could not be added!⛔" : "🎵Added " + DecodeTXT(title) + " to queue!🎵"));
  3914. }
  3915. if (CTS.YouTube.MessageQueueList.length > 0) YouTubeTrackAdd();
  3916. }
  3917. };
  3918. //Chuck Norris Jokes API (https://api.chucknorris.io/)
  3919. CTS.Chuck.XHR.onload = function() {
  3920. var resp = JSON.parse(CTS.Chuck.XHR.responseText),
  3921. msg = "[CHUCK NORRIS]\n" + resp.value;
  3922. if (resp !== null) Send("msg", msg.substr(0, 499));
  3923. };
  3924. //https://api.Urb.com/
  3925. CTS.Urb.XHR.onload = function() {
  3926. var resp = JSON.parse(CTS.Urb.XHR.responseText),
  3927. msg = "[URBAN DICTIONARY]\n" + ((resp.list[0] !== undefined) ? resp.list[0].word + "\n" + resp.list[0].definition : "Nothing was found!");
  3928. if (resp !== null) Send("msg", msg.substr(0, 499));
  3929. };
  3930. //icanhazdadjoke API (https://icanhazdadjoke.com/)
  3931. CTS.Dad.XHR.onload = function() {
  3932. var resp = JSON.parse(CTS.Dad.XHR.responseText),
  3933. msg = "[DAD JOKE]\n" + resp.joke;
  3934. if (resp !== null) Send("msg", msg.substr(0, 499));
  3935. };
  3936. //adviceslip API (https://api.adviceslip.com/advice)
  3937. CTS.Advice.XHR.onload = function() {
  3938. var resp = JSON.parse(CTS.Advice.XHR.responseText),
  3939. msg = "[ADVICE]\n" + resp.slip.advice;
  3940. if (resp !== null) Send("msg", msg.substr(0, 499));
  3941. };
  3942. //GAME LIST FUNCTION
  3943. var Fish = {
  3944. //INIT
  3945. init: function() {
  3946. if (CTS.Me.handle == CTS.Host && CTS.CanHostGames === true) {
  3947. Send("msg", "[FISH]\n!fish at any time and upgrade your way up!\n\n!gameview to show/hide game.\n\nRemember there's a five second delay for all commands, don't spam!\nFor commands type !fishhelp!");
  3948. CTS.Game.Fish.StartTimeout = setTimeout(function(g) {
  3949. g.cast();
  3950. }, 5000, this);
  3951. }
  3952. },
  3953. //PLAYERS
  3954. addPlayer: function(handle, username, nickname) {
  3955. if (!this.getPlayer(handle, false, false) && CTS.CanHostGames === true) {
  3956. if (isSafeListed(username)) {
  3957. CTS.Game.Fish.Player.push({
  3958. Handle: handle,
  3959. Username: username,
  3960. Nickname: nickname,
  3961. LastCheck: new Date() - 5000,
  3962. Points: 5000,
  3963. Upgrades: {
  3964. Net: 1,
  3965. Store: 1,
  3966. Radar: 1,
  3967. Insurance: false
  3968. },
  3969. });
  3970. Send("msg", "[FISHING BOAT]\n" + nickname.substr(0, 16) + "...\n has jumped aboard.\nType !fishhelp for commands if you don't already know!");
  3971. if (this.getPlayer() == 0) this.init();
  3972. }
  3973. }
  3974. },
  3975.  
  3976. getPlayer: function(handle, del, exists) {
  3977. var len = CTS.Game.Fish.Player.length;
  3978. if (handle !== undefined) {
  3979. for (var player = 0; player < len; player++) {
  3980. if (CTS.Game.Fish.Player[player].Handle == handle) {
  3981. if (exists) return CTS.Game.Fish.Player[player];
  3982. if (del) {
  3983. CTS.Game.Fish.UserQuitLast = CTS.Game.Fish.Player[player].Nickname;
  3984. CTS.Game.Fish.Player.splice(player, 1);
  3985. }
  3986. if (!exists) return true;
  3987. }
  3988. }
  3989. if (!exists) {
  3990. return false;
  3991. } else {
  3992. return -1;
  3993. }
  3994. } else {
  3995. return len - 1;
  3996. }
  3997. },
  3998.  
  3999. listPlayers: function() {
  4000. var msg = "[FISHING BOAT]\nTOP 5 PLAYERS:\n",
  4001. place = 0;
  4002. for (var u = arguments[0]; u >= 0; u--) {
  4003. place++;
  4004. if (u < 5) {
  4005. msg += place + ":" + CTS.Game.Fish.Player[u].Nickname + "[$" + CTS.Game.Fish.Player[u].Points + "]\n";
  4006. }
  4007. CTS.Game.Fish.Player[u].Upgrades.Insurance = false;
  4008. CTS.Game.Fish.Player[u].Points += 10000;
  4009. }
  4010. Send("msg", msg);
  4011. },
  4012.  
  4013. winner: function() {
  4014. CTS.Game.Fish.Player.sort(function(a, b) {
  4015. return a.Points - b.Points;
  4016. });
  4017. if (CTS.Game.Fish.HighScore[1] < CTS.Game.Fish.Player[0].Points) {
  4018. Send("msg", "[FISHING HIGH SCORE]\nNEW HIGH SCORE,\nKeep going " + CTS.Game.Fish.Player[0].Nickname + "!");
  4019. CTS.Game.Fish.HighScore = [CTS.Game.Fish.Player[0].Nickname, CTS.Game.Fish.Player[0].Points];
  4020. Save("FishHighScore", JSON.stringify(CTS.Game.Fish.HighScore));
  4021. }
  4022. var len = CTS.Game.Fish.Player.length - 1;
  4023. Send("msg", "[FISHING BOAT HIGH SCORE]\nHIGH SCORE:\n" + CTS.Game.Fish.HighScore[0] + " : $" + CTS.Game.Fish.HighScore[1] + "\n\nROUND WINNER:\n" + CTS.Game.Fish.Player[len].Nickname + " : $" + CTS.Game.Fish.Player[len].Points + "!\n\nNext round will start in thirty seconds!");
  4024. this.listPlayers(len);
  4025. CTS.Game.Fish.RestockTimeout = setTimeout(function(g) {
  4026. g.reset(false, true);
  4027. }, 30000, this);
  4028. },
  4029. //PRICELIST
  4030. pricelist: function(playerExist, item) {
  4031. if (item == 0) { // net
  4032. return (1000 * playerExist.Upgrades.Net * playerExist.Upgrades.Net * playerExist.Upgrades.Net);
  4033. } else if (item == 1) { // radar
  4034. return (1000 * playerExist.Upgrades.Radar * 2) + 3500;
  4035. } else if (item == 2) { // shop
  4036. return (playerExist.Upgrades.Store * playerExist.Upgrades.Store * 25000);
  4037. } else if (item == 3) { // insurance
  4038. return (20000);
  4039. } else if (item == 4) { // rob
  4040. return (10000);
  4041. } else if (item == 5) { // slap
  4042. return (50000);
  4043. } else if (item == 6) { // split (min$) / gamble
  4044. return (1000);
  4045. }
  4046. },
  4047. //GAMEPLAY
  4048. cast: function() {
  4049. clearTimeout(CTS.Game.Fish.StartTimeout);
  4050. if (CTS.Host === CTS.Me.handle) {
  4051. if (this.getPlayer() >= 0) {
  4052. if (CTS.Game.Fish.Round < 10) {
  4053. CTS.Game.Fish.Round++;
  4054. var playerlen,
  4055. fishlen = CTS.Game.Fish.TypesOfFish.length - 1,
  4056. id,
  4057. type,
  4058. handle,
  4059. eliminate = false,
  4060. msgeliminate,
  4061. value,
  4062. msg = "[FISHING BOAT]\n";
  4063. for (var cast = 0; cast <= 2; cast++) {
  4064. playerlen = this.getPlayer();
  4065. id = Rand(0, playerlen);
  4066. type = Rand(CTS.Game.Fish.Player[id].Upgrades.Radar, fishlen);
  4067. if (Rand(0, 100) <= Rand(10, 70)) {
  4068. var net = Rand(1, CTS.Game.Fish.Player[id].Upgrades.Net);
  4069. value = (net * CTS.Game.Fish.TypesOfFish[type][1] * 40 * CTS.Game.Fish.Player[id].Upgrades.Store);
  4070. if (CTS.Game.Fish.TypesOfFish[type][2] === true) {
  4071. CTS.Game.Fish.Player[id].Points += value;
  4072. msg += (CTS.Game.Fish.Player[id].Nickname.substr(0, 16) + "...[$" + CTS.Game.Fish.Player[id].Points + "]:\n✓ " + net + " x " + CTS.Game.Fish.TypesOfFish[type][0] + " +$" + value + "\n");
  4073. } else {
  4074. if (!CTS.Game.Fish.Player[id].Upgrades.Insurance) {
  4075. CTS.Game.Fish.Player[id].Points -= value;
  4076. msg += (CTS.Game.Fish.Player[id].Nickname.substr(0, 16) + "..." + ((CTS.Game.Fish.Player[id].Points < 0) ? "[broke]" : "[$" + CTS.Game.Fish.Player[id].Points + "]") + ":\nX " + CTS.Game.Fish.TypesOfFish[type][0] + " -$" + value + "\n");
  4077. } else {
  4078. msg += (CTS.Game.Fish.Player[id].Nickname.substr(0, 16) + "...[$" + CTS.Game.Fish.Player[id].Points + "]:\n✓ " + net + " x " + CTS.Game.Fish.TypesOfFish[type][0] + " -$0\n");
  4079. }
  4080. }
  4081. } else {
  4082. cast--;
  4083. }
  4084. if (this.getPlayer() == -1) break;
  4085. if (CTS.Game.Fish.Player[id].Points < 0) {
  4086. eliminate = true;
  4087. handle = CTS.Game.Fish.Player[id].Handle;
  4088. msgeliminate = "[FISHING BOAT]\n" + (CTS.Game.Fish.Player[id].Nickname.substr(0, 16) + "...\nCan walk the plank for costing me my moneys!");
  4089. CTS.Game.Fish.Player.splice(id, 1);
  4090. break;
  4091. }
  4092. }
  4093. if (msg !== "[FISHING BOAT]\n") Send("msg", msg);
  4094. if (eliminate) {
  4095. eliminate = false;
  4096. Send("msg", msgeliminate);
  4097. }
  4098. CTS.Game.Fish.ReCastTimeout = setTimeout(function(g) {
  4099. g.cast();
  4100. }, Rand(90000, 120000), this);
  4101. } else {
  4102. this.winner();
  4103. }
  4104. } else {
  4105. //RESTART
  4106. Fish.stop();
  4107. }
  4108. }
  4109. },
  4110. //STOPPERS
  4111. reset: function(stop, bypass) {
  4112. var get = this.getPlayer();
  4113. if (get !== undefined) {
  4114. if (get >= 0 && !CTS.Game.NoReset || bypass !== undefined) {
  4115. CTS.Game.Fish.Round = 0;
  4116. clearTimeout(CTS.Game.Fish.StartTimeout);
  4117. clearTimeout(CTS.Game.Fish.RestockTimeout);
  4118. clearTimeout(CTS.Game.Fish.ReCastTimeout);
  4119. clearTimeout(CTS.Game.Fish.NotEnoughTimeout);
  4120. if (!stop) {
  4121. this.init();
  4122. } else {
  4123. if (CTS.Game.Fish.Player.length > 0) Send("msg", "[FISHING BOAT]\nWelp... Boat sank! I'm not refunding anyone!");
  4124. CTS.Game.Fish.Player = [];
  4125. }
  4126. }
  4127. }
  4128. },
  4129.  
  4130. stop: function() {
  4131. CTS.Game.NoReset = false;
  4132. this.reset(true, true);
  4133. }
  4134. };
  4135. var FishList = {
  4136. fish: function(playerExist, user) {
  4137. Fish.addPlayer(user.handle, user.username, user.nick);
  4138. },
  4139.  
  4140. fishbank: function(playerExist) {
  4141. if (playerExist !== -1 && FishTimerCheck(playerExist)) Send("msg", "[FISHING BOAT]\n" + playerExist.Nickname.substr(0, 16) + ", you have $" + playerExist.Points + ".");
  4142. },
  4143.  
  4144. fishrob: function(playerExist, target) {
  4145. if (playerExist !== -1 && FishTimerCheck(playerExist)) {
  4146. var CanEliminate = Fish.getPlayer(UsernameToHandle(target.toUpperCase()), false, true);
  4147. FishTransfer(playerExist, CanEliminate, Fish.pricelist(playerExist, 4), Rand(5000, 20000), true);
  4148. }
  4149. },
  4150. fishgamble: function(playerExist) {
  4151. if (playerExist !== -1 && FishTimerCheck(playerExist)) {
  4152. if (FishTransaction(playerExist, Fish.pricelist(playerExist, 6))) {
  4153. var winnings;
  4154. if (Rand(1, 10) === 7) { // 10% chance
  4155. winnings = Rand(1000, 25000);
  4156. playerExist.Points += winnings;
  4157. Send("msg", "[FISHING BOAT]\n" + playerExist.Nickname + " you've won $" + winnings);
  4158. } else {
  4159. if (Rand(1, 7) === 4) { // 15%
  4160. winnings = Rand(1000, 5000);
  4161. playerExist.Points += winnings;
  4162. Send("msg", "[FISHING BOAT]\n" + playerExist.Nickname + " you've won $" + winnings);
  4163. } else {
  4164. Send("msg", "[FISHING BOAT]\n" + playerExist.Nickname + " tough luck, you lost $1000!");
  4165. }
  4166. }
  4167. }
  4168. }
  4169. },
  4170. fishslap: function(playerExist, target) {
  4171. if (playerExist !== -1 && FishTimerCheck(playerExist)) {
  4172. var user = UsernameToUser(target.toUpperCase());
  4173. if (user !== -1) {
  4174. if (CTS.UserList[user].broadcasting && CTS.UserList[user].handle !== CTS.Me.handle) {
  4175. if (CTS.Me.owner || !CTS.UserList[user].mod) {
  4176. if (FishTransaction(playerExist, Fish.pricelist(playerExist, 5))) {
  4177. Send("stream_moder_close", CTS.UserList[user].handle);
  4178. Send("msg", playerExist.Nickname + " has paid to close your camera " + CTS.UserList[user].nick + "!");
  4179. }
  4180. } else {
  4181. Send("msg", "Cannot close moderator!");
  4182. }
  4183. } else {
  4184. Send("msg", "Cannot close user!");
  4185. }
  4186. }
  4187. }
  4188. },
  4189.  
  4190. fishsplit: function(playerExist, target) {
  4191. if (playerExist !== -1 && FishTimerCheck(playerExist)) {
  4192. var CanEliminate = Fish.getPlayer(UsernameToHandle(target.toUpperCase()), false, true);
  4193. FishTransfer(playerExist, CanEliminate, Fish.pricelist(playerExist, 6), Math.round(playerExist.Points / 2), false);
  4194. }
  4195. },
  4196.  
  4197. fishupgrade: function(playerExist) {
  4198. if (playerExist !== -1 && FishTimerCheck(playerExist)) FishUpgradeStatus(playerExist, 0);
  4199. },
  4200.  
  4201. fishhelp: function(playerExist) {
  4202. if (playerExist !== -1 && FishTimerCheck(playerExist)) FishUpgradeStatus(playerExist, 6);
  4203. },
  4204.  
  4205. fishupgradenet: function(playerExist) {
  4206. if (playerExist !== -1 && FishTimerCheck(playerExist)) {
  4207. if (playerExist.Upgrades.Net >= 10) {
  4208. Send("msg", playerExist.Nickname + ", you own all upgrades.");
  4209. } else {
  4210. if (FishTransaction(playerExist, Fish.pricelist(playerExist, 0))) {
  4211. playerExist.Upgrades.Net += 1;
  4212. FishUpgradeStatus(playerExist, 1);
  4213. }
  4214. }
  4215. }
  4216. },
  4217.  
  4218. fishupgradeshop: function(playerExist) {
  4219. if (playerExist !== -1 && FishTimerCheck(playerExist)) {
  4220. if (playerExist.Upgrades.Store >= 6) {
  4221. Send("msg", playerExist.Nickname + ", you own them all already!");
  4222. } else {
  4223. if (FishTransaction(playerExist, Fish.pricelist(playerExist, 2))) {
  4224. playerExist.Upgrades.Store += 1;
  4225. FishUpgradeStatus(playerExist, 4);
  4226. }
  4227. }
  4228. }
  4229. },
  4230.  
  4231. fishupgraderadar: function(playerExist) {
  4232. if (playerExist !== -1 && FishTimerCheck(playerExist)) {
  4233. if (playerExist.Upgrades.Radar >= 20) {
  4234. Send("msg", playerExist.Nickname + ", you own all upgrades.");
  4235. } else {
  4236. if (FishTransaction(playerExist, Fish.pricelist(playerExist, 1))) {
  4237. playerExist.Upgrades.Radar += 5;
  4238. FishUpgradeStatus(playerExist, 2);
  4239. }
  4240. }
  4241. }
  4242. },
  4243.  
  4244. fishupgradeinsurance: function(playerExist) {
  4245. if (playerExist !== -1 && FishTimerCheck(playerExist)) {
  4246. if (playerExist.Upgrades.Insurance === true) {
  4247. Send("msg", playerExist.Nickname + ", you already have insurance!");
  4248. } else {
  4249. if (FishTransaction(playerExist, Fish.pricelist(playerExist, 3))) {
  4250. playerExist.Upgrades.Insurance = true;
  4251. FishUpgradeStatus(playerExist, 3);
  4252. }
  4253. }
  4254. }
  4255. }
  4256. };
  4257. //MISC FUNCTION
  4258. function debug() {
  4259. if (window.DebugClear === false) {
  4260. if (arguments[0] !== undefined) {
  4261. var msg = "CTS::" + arguments[0];
  4262. if (arguments[1]) msg = msg + "\n" + JSON.stringify(arguments[1]);
  4263. console.log(msg);
  4264. }
  4265. } else {
  4266. console.clear();
  4267. console.log(" ( \n ( * ))\ ) \n )\ \` ) /(()/( \n (((_) ( )(_)/(_)) \n )\___(_(_()(_)) \n((/ __|_ _/ __| \n | (__ | | \__ \ /\n \___| |_| |___/ \nCosmosisT's TinyChat Script\nCREATOR: COSMOSIST\nVERSION: " + Ver() + "\nCONSOLE DEBUG: FALSE\n\nJoin the discord today!\nhttps://discord.gg/cHEf8z7");
  4268. }
  4269. }
  4270.  
  4271. function Reset() {
  4272. CTS.UserList = [];
  4273. CTS.Me = [];
  4274. CTS.Room = [];
  4275. CTS.SendQueue = [];
  4276. CTS.Camera.List = [];
  4277. CTS.Camera.List = [];
  4278. CTS.WaitToVoteList = [];
  4279. CTS.WatchList = [];
  4280. CTS.Host = 0;
  4281. CTS.HostAttempt = 0;
  4282. CTS.HostWaiting = false;
  4283. CTS.TempIgnoreList = [];
  4284. // Fish Reset
  4285. Fish.stop();
  4286. }
  4287.  
  4288. function Remove() {
  4289. return (arguments[1] !== undefined) ? arguments[0].querySelector(arguments[1]).parentNode.removeChild(arguments[0].querySelector(arguments[1])) : arguments[0].parentNode.removeChild(arguments[0]);
  4290. }
  4291. })();