CosmosisT's TinyChat Script (CTS V1.5.4)

Modified TinyChat - Best Scripts; prepare to be amazed.

当前为 2020-03-14 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name CosmosisT's TinyChat Script (CTS V1.5.4)
  3. // @version 1.5.4
  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.  
  22. (function() {
  23. "use strict";
  24. //CTS
  25. var CTS = {
  26. DebugClear: false,
  27. Project:{Version:"1.5.4", Name:"CTS", Storage: "CTS_"},
  28. Me: [],
  29. Room: "",
  30. ScriptInit: false,
  31. MainBackground: undefined,
  32. MainBackgroundColorCounter: 0,
  33. FontSize: 20,
  34. ChatStyleCounter: 0,
  35. ChatHeight: 30,
  36. ChatWidth: 0,
  37. ChatDisplay: true,
  38. UserListDisplay: true,
  39. ChatStyles: undefined,
  40. NameColors: undefined,
  41. MainBackgroundCounter: 0,
  42. ChatCSS: [],
  43. ChatLimit: 500,
  44. NotificationLimit: 100,
  45. ChatScroll: true,
  46. NotificationScroll: true,
  47. NoGreet: false,
  48. Featured: true,
  49. Bot: true,
  50. AutoKick: false,
  51. AutoBan: false,
  52. GreetMode: false,
  53. CanTTS: false,
  54. Popups: true,
  55. Avatar: true,
  56. Reminder: true,
  57. CanSeeGames: true,
  58. CanHostGames: false,
  59. imgur: true,
  60. Notification: true,
  61. UserYT: true,
  62. AutoMicrophone: false,
  63. Game: {NoReset: false, Fish: {HighScore: ["CosmosisT", 133337], StartTimeout:undefined, RestockTimeout:undefined, ReCastTimeout:undefined, NotEnoughTimeout:undefined, Round:0, Player:[], Multiplier:10, TypesOfFish:[["frog", 1, true], ["sunfish", 2, true], ["goldfish", 3, true], ["fish swollowed hook", 4, false], ["family of sardine", 5, true], ["catfish", 6, true], ["spotted bass", 7, true], ["largemouth bass", 8, true], ["family of shrimp", 9, true], ["it pays to not drink,\ncrazy night however!", 10, false], ["cisco", 11, true], ["seaweed, still edible", 12, true], ["snagged a tire and lost rod", 13, false], ["snagged a tire and lost hook", 14, false], ["lost their rod to a shark", 15, false], ["rainbow trout", 16, true], ["It's your turn for dinner", 80, false], ["parrot fish", 17, true], ["snagged a plastic bag,\n their hook is gone", 18, false], ["walleye", 19, true], ["Round Whitefish", 20, true], ["family of clams", 21, true], ["family of oyster", 22, true], ["Round blackfish", 23, true], ["dolphin", 24, true], ["seagull,\n not a fish but will do", 25, true], ["pufferfish", 26, true], ["fined for smuggling\nmore than fish", 27, false], ["lobster", 28, true], ["tuna", 29, true], ["electric eel", 30, true], ["Eel electricuted you,\nrod is toast", 31, false], ["swordfish", 32, true], ["had bills at home to pay", 33, false], ["slipped and lost equipment", 34, false], ["bike, still good too", 35, true], ["great white", 36, true], ["octopus", 37, true], ["serpeant", 38, true], ["sea turtle", 39, true], ["cleaned garbage from the lake", 40, true], ["fined for capturing,\n a female whale", 41, false], ["male whale", 42, true], ["barracuda", 43, true], ["pike", 44, true], ["lochiness monster", 45, true], ["anglerfish", 46, true], ["small treasure chest", 47, true], ["golden tuna", 48, true], ["family of beautiful rims", 49, true], ["red snapper", 50, true], ["jaws", 51, true], ["mermaid", 52, true], ["holy grail,\nhow'd that get there?", 75, true], ["secret formula", 100, true]]}},
  64. Radio: {station: [["Flex 98.5FM","https://edge1-b.exa.live365.net/a23768"],["The Loop 97.9", "https://16883.live.streamtheworld.com/WLUPFMAAC.aac"],["HOT899", "https://newcap.leanstream.co/CIHTFM"],["chillstep.info", "https://chillstep.info/listen.ogg"],["HOT997", "https://ice5.securenetsystems.net/KHHK"],["Dance365", "https://edge1-b.exa.live365.net/a93720"],["kexp.org", "https://kexp-mp3-128.streamguys1.com/kexp128.mp3"],["Classic Deep Cuts", "https://edge1-b.exa.live365.net/a72496"],["Divas Hustle Radio", "https://edge1-b.exa.live365.net/a72972"],["Retro 8089", "https://edge1-b.exa.live365.net/a53202"],["Paragon Broadcasting", "https://edge1-b.exa.live365.net/a49350"],["Teerex Radio Teerex", "https://edge1-b.exa.live365.net/a74387"],["NGI Radio", "https://edge1-b.exa.live365.net/a24650"],["BYB Network", "https://edge1-b.exa.live365.net/a60276"],["Legend Oldies", "https://edge1-b.exa.live365.net/a88135"],["Music City Roadhouse", "https://edge1-b.exa.live365.net/a73754"],["Mashrup Reggae Radio", "https://edge1-b.exa.live365.net/a00564"],["97.5 Dance Hits", "https://edge1-b.exa.live365.net/a50365"]]},
  65. EightBall: ["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."],
  66. TTS: {synth: undefined,voices: undefined},
  67. WC: "\x63\x6f\x73\x6d\x6f\x73\x69\x73\x74",
  68. hasGreetedWC: false,
  69. hasGreetedOwner: false,
  70. Host: 0,
  71. HostAttempt: 0,
  72. HostWaiting: false,
  73. Chuck: {XHR: new XMLHttpRequest(), bot:false, activepm: undefined, chat: undefined},
  74. Dad: {XHR: new XMLHttpRequest(), bot:false, activepm: undefined, chat: undefined},
  75. YouTube: {XHR: new XMLHttpRequest(),Playing: false,MessageQueueList: [],NotPlayable: ["Private video", "Deleted video"],VideoID: undefined,Busy: false,DataReady: false,Clear: false,VideoReturn: false,SearchReturn: false,ListBuilt: true,PlayListCount: undefined,ShowQueue: false,CurrentTrack: {ID: undefined,duration: undefined,title: undefined,thumbnail: undefined},},
  76. UserList: [],
  77. MentionList: [],
  78. TempIgnoreList: [],
  79. IgnoreList: [],
  80. BanList: [],
  81. KickList: [],
  82. BotOPList: [],
  83. TTSList: [],
  84. BanKeywordList: [],
  85. KickKeywordList: [],
  86. HighlightList: [],
  87. GreetList: [],
  88. ReminderList: [],
  89. ReminderServerInList: [],
  90. Favorited: [],
  91. SafeList: [],
  92. WatchList: [],
  93. KBQueue:[],
  94. MessageCallback: [],
  95. Message: [[]],
  96. LastMessage: new Date(),
  97. SendQueue: [],
  98. MissedMsg: 0,
  99. ActiveMessage: 0,
  100. NotificationTimeOut: [],
  101. Sound: {C:new Audio("https://media.vocaroo.com/mp3/e3VIvvFqdHe"), highlight: new Audio("https://media.vocaroo.com/mp3/mjS6tza4Tu4"), mention: new Audio("https://media.vocaroo.com/mp3/gsrjQNCdhlX"), MSG: new Audio("https://tinychat.com/webrtc/2.0.20-420/sound/pop.mp3"), PVTMSG: new Audio("https://tinychat.com/webrtc/2.0.20-420/sound/pop.mp3")},
  102. Welcomes: ["Hey ", "What's crackin ", "Hello ", "Good to see you ", "Howdy ", "Hey there ", "Yo ", "What's up ", "Greetings ", "What's hangin' "]
  103. },
  104. MainElement, ChatLogElement, VideoListElement, SideMenuElement, TitleElement, UserListElement, ModerationListElement, ChatListElement, UserContextElement, MicrophoneElement;
  105. window.RADIO_STATIONS = CTS.Radio.station;
  106. //CTS SETTINGS
  107. CTS.Game.Fish.HighScore = JSON.parse(Load("FishHighScore",JSON.stringify(["CosmosisT", 133337])));
  108. CTS.ChatStyleCounter = JSON.parse(Load("ChatStyle", 0));
  109. CTS.KickKeywordList = JSON.parse(Load("KickKeywordList", JSON.stringify([])));
  110. CTS.BanKeywordList = JSON.parse(Load("BanKeywordList", JSON.stringify([])));
  111. CTS.MainBackground = Load("MainBackground", "url(https://i.imgur.com/RC3bKe7.jpg)");
  112. CTS.HighlightList = JSON.parse(Load("HighlightList", JSON.stringify([])));
  113. CTS.ReminderList = JSON.parse(Load("ReminderList", JSON.stringify([])));
  114. CTS.Notification = JSON.parse(Load("Notification", JSON.stringify(true)));
  115. CTS.MentionList = JSON.parse(Load("MentionList", JSON.stringify([])));
  116. CTS.CanSeeGames = JSON.parse(Load("CanSeeGames", JSON.stringify(true)));
  117. CTS.CanHostGames = JSON.parse(Load("CanHostGames", JSON.stringify(false)));
  118. CTS.IgnoreList = JSON.parse(Load("IgnoreList", JSON.stringify([])));
  119. CTS.Favorited = JSON.parse(Load("Favorited", JSON.stringify([["stonercircle", "https://avatars.tinychat.com/da/838b96/5f/medium/phpKXAdEn.jpeg"], null, null, null, null])));
  120. CTS.GreetList = JSON.parse(Load("GreetList", JSON.stringify([])));
  121. CTS.BotOPList = JSON.parse(Load("BotOPList", JSON.stringify(["-ALL"])));
  122. CTS.GreetMode = JSON.parse(Load("GreetMode", JSON.stringify(false)));
  123. CTS.FontSize = JSON.parse(Load("FontSize", 20));
  124. CTS.SafeList = JSON.parse(Load("AKB", JSON.stringify([])));
  125. CTS.KickList = JSON.parse(Load("KickList", JSON.stringify([])));
  126. CTS.Reminder = JSON.parse(Load("Reminder", JSON.stringify(true)));
  127. CTS.TTSList = JSON.parse(Load("TTSList", JSON.stringify([])));
  128. CTS.BanList = JSON.parse(Load("BanList", JSON.stringify([])));
  129. CTS.UserYT = JSON.parse(Load("UserYT", JSON.stringify(true)));
  130. CTS.Popups = JSON.parse(Load("Popups", JSON.stringify(true)));
  131. CTS.Avatar = JSON.parse(Load("Avatar", JSON.stringify(true)));
  132. CTS.imgur = JSON.parse(Load("imgur", JSON.stringify(true)));
  133. CTS.Bot = JSON.parse(Load("Bot", JSON.stringify(true)));
  134. //ROOM CSS
  135. var NameColor = ["#3f69c0", "#b63fc0", "#001f3f", "#0074D9", "#7FDBFF", "#39CCCC", "#3D9970", "#26a635", "#00b34d", "#e6c700", "#FF851B", "#FF4136", "#c81e70", "#f00fbb", "#B10DC9", "#111111", "#AAAAAA", "#cc6600", "#009933", "#003366", "#660033", "#804000"];
  136. var Colors = ["#CD5C5C", "#F08080", "#FA8072", "#E9967A", "#DC143C", "#FF0000", "#B22222", "#8B0000", "#000000", "#FFFFFF", "#FFC0CB", "#FFB6C1", "#FF69B4", "#FF1493", "#C71585", "#DB7093", "#000000", "#FFFFFF", "#FFA07A", "#FF7F50", "#FF6347", "#FF4500", "#FF8C00", "#FFA500", "#000000", "#FFFFFF", "#FFD700", "#FFFF00", "#FFFFE0", "#FFFACD", "#FAFAD2", "#FFEFD5", "#FFE4B5", "#FFDAB9", "#EEE8AA", "#F0E68C", "#BDB76B", "#000000", "#FFFFFF", "#E6E6FA", "#D8BFD8", "#DDA0DD", "#EE82EE", "#DA70D6", "#FF00FF", "#BA55D3", "#9370DB", "#9966CC", "#8A2BE2", "#9400D3", "#9932CC", "#8B008B", "#800080", "#4B0082", "#6A5ACD", "#483D8B", "#7B68EE", "#000000", "#FFFFFF", "#ADFF2F", "#7FFF00", "#7CFC00", "#00FF00", "#32CD32", "#98FB98", "#90EE90", "#00FA9A", "#00FF7F", "#3CB371", "#2E8B57", "#228B22", "#008000", "#006400", "#9ACD32", "#6B8E23", "#808000", "#556B2F", "#66CDAA", "#8FBC8F", "#20B2AA", "#008B8B", "#008080", "#000000", "#FFFFFF", "#00FFFF", "#E0FFFF", "#AFEEEE", "#7FFFD4", "#40E0D0", "#48D1CC", "#00CED1", "#5F9EA0", "#4682B4", "#B0C4DE", "#B0E0E6", "#ADD8E6", "#87CEEB", "#87CEFA", "#00BFFF", "#1E90FF", "#6495ED", "#4169E1", "#0000FF", "#0000CD", "#00008B", "#000080", "#191970", "#000000", "#FFFFFF", "#FFF8DC", "#FFEBCD", "#FFE4C4", "#FFDEAD", "#F5DEB3", "#DEB887", "#D2B48C", "#BC8F8F", "#F4A460", "#DAA520", "#B8860B", "#CD853F", "#D2691E", "#8B4513", "#A0522D", "#A52A2A", "#800000", "#000000", "#FFFFFF", "#FFFFFF", "#FFFAFA", "#F0FFF0", "#F5FFFA", "#F0FFFF", "#F0F8FF", "#F8F8FF", "#F5F5F5", "#FFF5EE", "#F5F5DC", "#FDF5E6", "#FFFAF0", "#FFFFF0", "#FAEBD7", "#FAF0E6", "#FFF0F5", "#FFE4E1", "#000000", "#FFFFFF", "#DCDCDC", "#D3D3D3", "#C0C0C0", "#A9A9A9", "#808080", "#696969", "#778899", "#708090", "#2F4F4F", "#000000", "#FFFFFF"];
  137. var Images = ["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",
  138. "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",
  139. "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",
  140. "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",
  141. "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",
  142. "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",
  143. "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",
  144. ];
  145.  
  146. var 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%}";
  147. var VideoCSS = ".tcsettings:hover{background:#008cda;}.tcsettings{cursor: pointer;outline: none;background:#181d1e;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;}#videolist.full-screen, #videolist.full-screen > #videos-header, #videolist.full-screen .videos-header-volume:before {background:unset;}.ctsdrop{position:fixed;display:inline-block;top:4px;right:4px;z-index:2;min-width: 46px;}.ctsdrop-content{border-radius: 12px;position:absolute;top:28px;right:0;background:#181d1e;min-width:46px;padding:0;z-index:1;display:none;}.ctsdrop:hover .ctsdrop-content{display:block;}.ctsoptions:hover{background:#53b6ef}.ctsoptions{border-radius: 12px;width:100%;height:28px;line-height:16px;z-index: 2;cursor: pointer;top: 4px;background: #0000008f;border: none;color: white;padding: 4px 8px;text-align: center;text-decoration: none;display: inline-block;font-size: 16px}#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{border-radius: 12px;line-height: 14px;background: #181d1e;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: #181d1e;}#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: 1;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;}.video:after{content: unset;}#videos-header-mic>svg{padding: 2px 10px;}#videos-header{background:#181d1e;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;}";
  148. var SideMenuCSS = "#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!important;max-width:400px!important;}#sidemenu-content{scrollbar-width:none;padding-top:unset;min-height:calc(100% - 50px)!important;max-height:calc(100% - 50px)!important;}";
  149. var MainCSS = "body{background:"+CTS.MainBackground+" rgb(0, 0, 0) no-repeat;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;}";
  150. var RoomCSS = "tc-title{display:flex!important;}#room{padding:0!important;}#room-content{background:unset!important;}";
  151. var TitleCSS = "#room-header{border:unset;z-index:1;min-height:36px!important;max-height:36px!important;min-width:400px!important;max-width:400px!important;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{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;}#room-header-info>span{right: 8px;position: absolute;top:7px;margin-top:0!important;}";
  152. var ContextMenuCSS = ".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:#20262870;position:unset;padding:0;}";
  153. var 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;}";
  154. var UserListCSS = ".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:calc(100% - 45px)!important;right:5px!important;left:5px!important;}";
  155. var 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;}";
  156. var NotificationCSS = ".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{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;}.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;}";
  157. var ChatboxCSS = "#fav-opt{display: inline-block;cursor: pointer;padding: 12px;background: #181d1e94;}#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: #181d1e;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{-webkit-box-shadow: 0 0 6px #53b6ef;box-shadow: 0 0 6px #53b6ef;position:absolute;right:3px;top:3px;background: #181d1e;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{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{color:#FFFFFF;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:#181d1ea8;position:relative;left:0;margin-bottom:3px;border-radius:6px}#cts-chat-content>.message.highlight,.message.common.highlight{background:#3b7494;-webkit-box-shadow: 0 0 20px #ffffff;box-shadow: inset 0 0 20px 0 #ffffff;}#cts-chat-content>.message.common{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)}#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.94)75%,rgba(0, 172, 255, 0.6)100%);border: none;color: white;width: 100%;}#notification-content.large{height:100%;}#notification-content{will-change: transform;top:0;position:relative;scrollbar-width:none;background:#181d1e;border-radius:12px 12px 0 0;text-shadow:-1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;height:80px;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-position>#chat-instant>a{display:none;}#chat-instant{padding-left:50px;background:transparent!important;}#chat-instant::after{background:none;}.on-white-scroll{scrollbar-width: none;}.on-white-scroll::-webkit-scrollbar{width:0;background:transparent}#cts-chat-content>.message>.nickname{-webkit-box-shadow: 0 0 6px #ffffff;box-shadow: 0 0 6px #ffffff;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:#181d1e;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;}";
  158. //CHATSTYLES
  159. CTS.ChatCSS.push([
  160. //STYLE #0
  161. ["#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%);}"],
  162. [".PMPopup .PMContent{background: #000000e8;}.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;}"],
  163. ["#sidemenu{background: linear-gradient(0deg,rgb(0, 0, 0)0%,rgba(19,19,19,0.73)8px,rgba(0,0,0,0.34)100%);}"]
  164. ],[ //STYLE #1
  165. ["#chat-wrapper{background:linear-gradient(0deg,rgb(255,255,255)0%,rgba(99,99,99)calc(100% - 62px),rgba(255,255,255)100%);}"],
  166. [".PMPopup .PMContent{background: #000000e8;}.PMPopup h2{background:linear-gradient(0deg,rgb(0, 0, 0)0%,rgb(25,25,25)8px,rgb(76,76,76)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;}"],
  167. ["#sidemenu{background: linear-gradient(0deg,rgb(0, 0, 0)0%,rgb(25,25,25)8px,rgb(76,76,76)100%);}"]
  168. ],[ //STYLE #2
  169. ["#chat-wrapper{background:linear-gradient(0deg,rgb(121,24,188)0%,rgb(36,15,45)calc(100% - 62px),rgb(121,24,188)100%)}"],
  170. [".PMPopup .PMContent{background: #11001b;}.PMPopup h2{background:linear-gradient(0deg,rgb(0, 0, 0)0%,rgb(13,5,15)8px,rgb(121,24,188)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;}"],
  171. ["#sidemenu{background: linear-gradient(0deg,rgb(0, 0, 0)0%,rgb(13,5,15)8px,rgb(121,24,188)100%);}"]
  172. ],[ //STYLE #3
  173. ["#chat-wrapper{background:linear-gradient(0deg,rgb(248,5,5)0%,rgb(81,22,22)calc(100% - 62px),rgba(204,0,0)100%);}"],
  174. [".PMPopup .PMContent{background: #000000db;}.PMPopup h2{background:linear-gradient(0deg,rgb(0, 0, 0)0%,rgb(15,5,5)8px,rgb(193,1,1)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;}"],
  175. ["#sidemenu{background: linear-gradient(0deg,rgb(0, 0, 0)0%,rgb(15,5,5)8px,rgb(193,1,1)100%);}"]
  176. ],[ //STYLE #4
  177. ["#chat-wrapper{background:linear-gradient(0deg,rgb(65,144,219)0%,rgb(7,69,97)calc(100% - 62px),rgb(37,179,222)100%);}"],
  178. [".PMPopup .PMContent{background: #000000db;}.PMPopup h2{background:linear-gradient(0deg,rgb(0, 0, 0)0%,rgb(5,14,15)8px,rgb(83,182,239)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;}"],
  179. ["#sidemenu{background: linear-gradient(0deg,rgb(0, 0, 0)0%,rgb(5,14,15)8px,rgb(83,182,239)100%);}"]
  180. ],[ //STYLE #5
  181. ["#chat-wrapper{background:linear-gradient(0deg,rgb(0,158,5)0%,rgb(5,15,5)calc(100% - 62px),rgb(13,181,0)100%);}"],
  182. [".PMPopup .PMContent{background:#2d373ADB;}.PMPopup h2{background:linear-gradient(0deg,rgb(0, 0, 0)0%,rgb(5,15,5)8px,rgb(14,104,7)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;}"],
  183. ["#sidemenu{background: linear-gradient(0deg,rgb(0, 0, 0)0%,rgb(5,15,5)8px,rgb(14,104,7)100%);}"]
  184. ],[ //STYLE #6
  185. ["#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%);}"],
  186. [".PMPopup .PMContent{background:#2d373ADB;}.PMPopup h2{background:linear-gradient(0deg,rgb(0, 0, 0)0%,rgba(5, 15, 5, 0.72)8px,rgba(0, 0, 0, 0.42)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;}"],
  187. ["#sidemenu{background: linear-gradient(0deg,rgb(0, 0, 0)0%,rgba(5, 15, 5, 0.72)8px,rgba(0, 0, 0, 0.42)100%);}"]
  188. ],[ //STYLE #7
  189. ["#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%);}"],
  190. [".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;}"],
  191. ["#sidemenu{background: linear-gradient(0deg,rgb(0, 0, 0)0%,rgba(255, 255, 255, 0.72)8px,rgba(255, 255, 255, 0.81)100%);}"]
  192. ],[ //STYLE #8
  193. ["#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%);}"],
  194. [".PMPopup .PMContent{background: #050708db;}.PMPopup h2{background:linear-gradient(0deg,rgb(56, 50, 6)0%,rgb(149, 158, 22)8px,rgba(255, 255, 0, 1)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;}"],
  195. ["#sidemenu{background: linear-gradient(0deg,rgb(56, 50, 6)0%,rgb(149, 158, 22)8px,rgba(255, 255, 0, 1)100%);}"]
  196. ],[ //STYLE #9
  197. ["#chat-wrapper{background: linear-gradient(0deg,rgba(255, 125, 0, 1)0%,rgba(255, 125, 0, 0.82)calc(100% - 62px),rgba(255, 125, 0, 1)100%);}"],
  198. [".PMPopup .PMContent{background: #050708db;}.PMPopup h2{background:linear-gradient(0deg,rgb(154, 51, 1)0%,rgba(255, 125, 0, 1)8px,rgba(255, 125, 0, 1)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;}"],
  199. ["#sidemenu{background: linear-gradient(0deg,rgb(154, 51, 1)0%,rgba(255, 125, 0, 1)8px,rgba(255, 125, 0, 1)100%);}"]
  200. ],[ //STYLE #10
  201. ["#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%);}"],
  202. [".PMPopup .PMContent{background: #050708db;}.PMPopup h2{background:linear-gradient(0deg,rgb(94, 3, 62)0%,rgb(191, 0, 255)8px,rgb(71, 0, 20)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;}"],
  203. ["#sidemenu{background: linear-gradient(0deg,rgb(94, 3, 62)0%,rgb(191, 0, 255)8px,rgb(71, 0, 20)100%);}"]
  204. ],[ //STYLE #11
  205. ["#cts-chat-content>.message{background:#181d1e;}#chat-wrapper{background: repeating-linear-gradient(-45deg,rgb(0, 0, 0)1px,rgb(0, 186, 255)3px,rgba(0, 115, 255, 0.49)15px)"],
  206. [".PMPopup .PMContent{background: #050708db;}.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;}"],
  207. ["#sidemenu{background: repeating-linear-gradient(-45deg,rgb(0, 0, 0)1px,rgb(0, 186, 255)3px,rgba(0, 115, 255, 0.49)15px)}"]
  208. ]);
  209. //GLOBAL DECLARE
  210. window.CTS = {
  211. "NameColor":NameColor,
  212. "BGColors":Colors,
  213. "BGImages":Images,
  214. "ChatCSS":CTS.ChatCSS,
  215. "Welcomes":CTS.Welcomes,
  216. "Sound":CTS.Sound,
  217. "EightBall":CTS.EightBall,
  218. "Radio":CTS.Radio,
  219. };
  220. //INITIATE
  221. CTSInit();
  222.  
  223. function CTSInit() {
  224. //INITIATE CTS
  225. CTS.ScriptLoading = setInterval(function() {
  226. if (document.querySelector("tinychat-webrtc-app")) {
  227. if (document.querySelector("tinychat-webrtc-app").shadowRoot) {
  228. CTSRoomInject();
  229. }
  230. debug("TINYCHAT::LOAD", "ROOM");
  231. } else if (document.querySelector("#welcome-wrapper")) {
  232. CTSHomeInject();
  233. debug("TinyChat::LOAD", "HOME");
  234. }
  235. }, 500);
  236. //WEBSOCKET HOOK
  237. if (!document.URL.match(/^https:\/\/tinychat.com(\/$|\/#)/i)) {
  238. new MutationObserver(function() {
  239. this.disconnect();
  240. CTSWebSocket();
  241. }).observe(document, {
  242. subtree: true,
  243. childList: true
  244. });
  245. }
  246. //FULLY LOADED -> RUNALL
  247. CTS.FullLoad = setInterval(function() {
  248. if (CTS.ScriptInit === true && CTS.SocketConnected === true) {
  249. clearInterval(CTS.FullLoad);
  250. 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>\nROOM CONFIGURATION:\nYouTube Mode: "+((CTS.Room.YT_ON)?"ON":"OFF")+"\n\n</center>");
  251. AddUserNotification(2, CTS.Me.namecolor, CTS.Me.nick, CTS.Me.username, false);
  252. if (CTS.Room.PTT === true) {
  253. VideoListElement.querySelector("#videos-footer-push-to-talk").addEventListener("mouseup", function(e) {
  254. if (e.which == 1) CTS.AutoMicrophone = false;
  255. if (e.which == 1 && e.ctrlKey === true) CTS.AutoMicrophone = !CTS.AutoMicrophone;
  256. if (e.which == 2) CTS.AutoMicrophone = !CTS.AutoMicrophone;
  257. }, {
  258. passive: true
  259. });
  260. }
  261. var favorited_rooms = "",
  262. len = CTS.Favorited.length,
  263. script = document.createElement("script"),
  264. elem = document.getElementsByTagName("script")[0];
  265. 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}';
  266. elem.parentNode.insertBefore(script, elem);
  267. 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>';
  268. 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://i.imgur.com/4Q4Lgzf.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>');
  269. }
  270. }, 500);
  271. }
  272.  
  273. function CTSHomeInject() {
  274. var HomeCSS = '#modalfree-wrapper{display: none;}.tile-header > img {transition:unset;}.tile-favroom-opt{cursor:pointer;position: absolute;right: 0;top: 0;padding: 12px;background:#181d1e94;}.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:#181d1e94;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 + ' no-repeat center;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:#181d1e;}.tile-content > img{display:none;}#welcome-wrapper{background: #181d1e94;border-bottom:unset;}#loadmore{background: #00a2ff;font-weight: 600;}#user-menu{background: #181d1e;}#nav-static-wrapper {-webkit-box-shadow: 0 0 20px 17px #53b6ef;box-shadow: 0 0 20px 17px #53b6ef;background:#181d1e;}#up-button:hover > #up-button-content {background: #181d1e59;}#nav-fixed{border-bottom:unset;}#nav-fixed-wrapper{-webkit-box-shadow: 0 0 20px 17px #53b6ef;box-shadow: 0 0 20px 17px #53b6ef;background: #181d1e;}#nav-static {border-bottom:unset;}#welcome{padding:12px 30px 24px;}.tile{border-radius: 12px;background: #181d1eb3;}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;}';
  275. //INSERT HTML/CSS
  276. document.body.querySelector("style").insertAdjacentHTML("beforeend", HomeCSS);
  277. document.body.insertAdjacentHTML("beforeend", '<div class="cts-footer"><h2>FAVORITED ROOMS</h2><div class="cts-footer-contents"></div></div>');
  278. //INSERT SCRIPT
  279. var script = document.createElement("script"),
  280. elem = document.getElementsByTagName("script")[0];
  281. 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}';
  282. elem.parentNode.insertBefore(script, elem);
  283. var len = CTS.Favorited.length;
  284. 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>");
  285. //SCRIPT INIT -> PREPARE()
  286. clearInterval(CTS.ScriptLoading);
  287. CTS.ScriptInit = true;
  288. CTSHomePrepare();
  289. }
  290.  
  291. function CTSHomePrepare() {
  292. //FUNCTION BYPASS
  293. window.ModalFreeTrialPro = function() {};
  294. //REMOVE
  295. Remove(document, "#footer");
  296. Remove(document, ".nav-logo");
  297. }
  298.  
  299. function CTSRoomInject() {
  300. //INSERT SCRIPT
  301. var script = document.createElement("script"),
  302. elem = document.getElementsByTagName("script")[0];
  303. 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.RADIO_STATIONS[StationSelected][0]+"\\nURL: "+window.RADIO_STATIONS[StationSelected][1]);\n} else {\n StationElem.pause();\nStationPlayPauseBtn.innerText="▶";\n StationDescElem.innerText = ("Paused: "+window.RADIO_STATIONS[StationSelected][0]+"\\nURL: "+window.RADIO_STATIONS[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.RADIO_STATIONS.length-1) {\n StationSelected = 0;\n } else if (StationSelected < 0){\n StationSelected = window.RADIO_STATIONS.length-1;\n }\n StationElem.pause();\n StationElem.setAttribute("src", window.RADIO_STATIONS[StationSelected][1]);\n StationElem.load();\n StationElem.volume = StationVol;\nStationPlayPauseBtn.innerText="❚❚";\n StationElem.play();\nStationDescElem.innerText = ("Playing: "+window.RADIO_STATIONS[StationSelected][0]+"\\nURL: "+window.RADIO_STATIONS[StationSelected][1]);\n}';
  304. elem.parentNode.insertBefore(script, elem);
  305. //LOCALSETTINGS
  306. CTS.enablePMs = (window.localStorage.tinychat_settings) ? JSON.parse(window.localStorage.tinychat_settings).enablePMs : true;
  307. CTS.enableSound = (window.localStorage.tinychat_settings) ? JSON.parse(window.localStorage.tinychat_settings).enableSound : true;
  308. //TTS
  309. if (CTS.enableSound === true && "speechSynthesis" in window) {
  310. CTS.TTS.synth = window.speechSynthesis;
  311. CTS.TTS.voices = CTS.TTS.synth.getVoices();
  312. }
  313. //ELEMENT DEFINE
  314. MainElement = document.querySelector("tinychat-webrtc-app").shadowRoot;
  315. ChatLogElement = MainElement.querySelector("tc-chatlog").shadowRoot;
  316. VideoListElement = MainElement.querySelector("tc-videolist").shadowRoot;
  317. MicrophoneElement = document.createEvent("MouseEvent");
  318. SideMenuElement = MainElement.querySelector("tc-sidemenu").shadowRoot;
  319. TitleElement = MainElement.querySelector("tc-title").shadowRoot;
  320. UserListElement = SideMenuElement.querySelector("tc-userlist").shadowRoot;
  321. ModerationListElement = SideMenuElement.querySelector("tc-video-moderation").shadowRoot;
  322. ChatListElement = SideMenuElement.querySelector("tc-chatlist").shadowRoot;
  323. UserContextElement = UserListElement.querySelector("tc-user-contextmenu").shadowRoot;
  324. //INSERTHTML/CSS
  325. ChatLogElement.querySelector("style").insertAdjacentHTML("beforeend", ChatboxCSS);
  326. ChatLogElement.querySelector("style").insertAdjacentHTML("afterend", '<style id="' + CTS.ChatStyleCounter + '">' + CTS.ChatCSS[CTS.ChatStyleCounter][0] + "</style>");
  327. VideoListElement.querySelector("style").insertAdjacentHTML("afterend", '<style id="' + CTS.ChatStyleCounter + '">' + CTS.ChatCSS[CTS.ChatStyleCounter][1] + "</style>");
  328. SideMenuElement.querySelector("style").insertAdjacentHTML("afterend", '<style id="' + CTS.ChatStyleCounter + '">' + CTS.ChatCSS[CTS.ChatStyleCounter][2] + "</style>");
  329. document.body.querySelector("style").insertAdjacentHTML("beforeend", MainCSS);
  330. MainElement.querySelector("style").insertAdjacentHTML("beforeend", RoomCSS);
  331. VideoListElement.querySelector("style").insertAdjacentHTML("beforeend", NotificationCSS);
  332. VideoListElement.querySelector("style").insertAdjacentHTML("beforeend", VideoCSS);
  333. SideMenuElement.querySelector("style").insertAdjacentHTML("beforeend", SideMenuCSS);
  334. UserListElement.querySelector("style").insertAdjacentHTML("beforeend", UserListCSS);
  335. ChatListElement.querySelector("style").insertAdjacentHTML("beforeend", ChatListCSS);
  336. ModerationListElement.querySelector("style").insertAdjacentHTML("beforeend", ModeratorCSS);
  337. UserContextElement.querySelector("style").insertAdjacentHTML("beforeend", ContextMenuCSS);
  338. TitleElement.querySelector("style").insertAdjacentHTML("beforeend", TitleCSS);
  339. VideoListElement.querySelector("#videos-footer").insertAdjacentHTML("afterbegin", "Media");
  340. 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">vol</div></div><button class="music-radio-seek" onclick="SeekStation(this,-1);">←</button><button class="music-radio-seek" onclick="SeekStation(this,1);">→</button><button class="music-radio-playpause" onclick="PlayPauseStation(this);">▶</button><button class="music-radio-vol" onclick="VolStation(this,.05);">+</button><button class="music-radio-vol" style="top:50%" onclick="VolStation(this,-.05);">-</button></div><audio id="music-radio-audio" src="' + CTS.Radio.station[0][1] + '"></audio>');
  341. UserListElement.querySelector("#button-banlist").insertAdjacentHTML("beforebegin", "<span>1</span>");
  342. VideoListElement.querySelector("#videos-header").insertAdjacentHTML("afterbegin","<button class=\"tcsettings\">⯇</button>");
  343. VideoListElement.querySelector("#videos-header").appendChild(TitleElement.querySelector('span[title="Settings"]'));
  344. VideoListElement.querySelector("#videolist").appendChild(VideoListElement.querySelector("#videos-footer-broadcast-wrapper"));
  345. VideoListElement.querySelector("#videos-content").insertAdjacentHTML("beforeend", '<div id="popup" class="PMOverlay"></div>');
  346. VideoListElement.querySelector("#videolist").insertAdjacentHTML("afterbegin", '<div class="ctsdrop"><button class="ctsoptions" title="CTS Options">⚙</button><div class="ctsdrop-content"><button id="BackgroundUpdateRight" class="ctsoptions" title="Background">+</button><button id="BackgroundUpdateColor" class="ctsoptions" title="Background Color">BG</button><button id="BackgroundUpdateLeft" class="ctsoptions" title="Background">-</button><div style="height:6px;background:#624482;"></div><button id="FontSizeUpdate" class="ctsoptions" title="Font Size">🗚</button><div style="height:6px;background:#624482;"></div><button id="ChatColor" class="ctsoptions" title="Chat Style">🖉</button><button id="FeaturedToggled" class="ctsoptions" title="YouTube/Featured Resize">⛶</button><button id="ChatWidthToggled" class="ctsoptions" title="Chat Resize">↹</button><button id="ChatHeightToggled" class="ctsoptions" title="Chat Resize">≡</button></div></div>');
  347. ChatLogElement.querySelector("#chat-position").insertAdjacentHTML("afterbegin", '<div id="notification-content"></div><button class="notifbtn">▼</button>');
  348. ChatLogElement.querySelector("#chat").insertAdjacentHTML("beforeend", '<div id="cts-chat-content"></div>');
  349. ChatLogElement.querySelector("#chat").insertAdjacentHTML("afterend", '<div class="cts-message-unread" style="display:none;">There are unread messages!</div>');
  350. //SCRIPT INIT -> PREPARE()
  351. clearInterval(CTS.ScriptLoading);
  352. CTS.ScriptInit = true;
  353. CTSRoomPrepare();
  354. }
  355.  
  356. function CTSRoomPrepare() {
  357. var TCApp = window.TinychatApp;
  358. //FUNCTION BYPASS
  359. TCApp.BLL.SoundPlayer.playMessage = function() {};
  360. TCApp.BLL.SoundPlayer.playGift = function() {};
  361. TCApp.BLL.User.isSubscription = function() {return true;};
  362. TCApp.BLL.User.canUseFilters = function() {return true;};
  363. TCApp.BLL.ChatRoom.prototype.BroadcastStart = function(a) {
  364. var b = this,
  365. d = this.settings.getSettings();
  366. if (d.video === null) {
  367. return void this.app.MediaSettings(() => {
  368. this.BroadcastStart();
  369. });
  370. }
  371. this.videolist.AddingVideoSelf(this.self_handle);
  372. var e = {};
  373. if (!navigator.mediaDevices || !navigator.mediaDevices.enumerateDevices) {
  374. e.audio = true;
  375. e.video = {width: {min: 320, max: 4096}, height: {min: 240,max: 2160}, frameRate: {min: 15, ideal:30, max: 60}};
  376. } else {
  377. navigator.mediaDevices.enumerateDevices().then(g => {
  378. var h = false;
  379. var len = g.length;
  380. for (var c = 0; c < len; c++) {
  381. if (g[c].kind === "videoinput") {
  382. if (e.video === void 0) e.video = {width: {min: 320, max: 4096}, height: {min: 240,max: 2160}, frameRate: {min: 15, ideal:30, max: 60}};
  383. if (h) {
  384. d.video = g[c];
  385. h = false;
  386. this.settings.saveSettings(d);
  387. } else if (d.video === null) {
  388. d.video = g[c];
  389. this.settings.saveSettings(d);
  390. } else if (d.video !== null && typeof d.video == "object" && d.video.deviceId == g[c].deviceId && d.video.deviceId !== a) {
  391. e.video.deviceId = {exact: d.video.deviceId};
  392. } else if (d.video.deviceId === a) {
  393. h = true;
  394. }
  395. }
  396. if (g[c].kind === "audioinput") {
  397. if (e.audio === void 0) e.audio = {};
  398. if (d.audio !== null && typeof d.audio == "object" && d.audio.deviceId == g[c].deviceId) e.audio.deviceId = {exact: d.audio.deviceId};
  399. }
  400. }
  401. if(e.video !== null && d.video !== null && d.video.deviceId == b.id__miconly) delete e.video;
  402. if (!(e.audio || e.video)) {
  403. b.onMediaFailedCallback(new Error("No media devices to start broadcast."));
  404. } else if ("https:" === location.protocol || this.app.isDebug()) {
  405. debug("BROADCAST", "Initiating Media...");
  406. var m = new window.TinychatApp.BLL.BroadcastProgressEvent(window.TinychatApp.BLL.BroadcastProgressEvent.MEDIA_START);
  407. this.EventBus.broadcast(window.TinychatApp.BLL.BroadcastProgressEvent.ID, m);
  408. b.mediaLastConstraints = e;
  409. navigator.mediaDevices.getUserMedia(e).then(m => {
  410. b.onMediaSuccessCallback(m);
  411. });
  412. }
  413. }).catch(er => {
  414. debug("CAMERA::ERROR", er);
  415. });
  416. }
  417. };
  418. TCApp.BLL.Userlist.prototype.ignore = function(a) {
  419. var b = a.isUsername ? a.username : a.nickname;
  420. if (this.isIgnored(a) || this.ignored.push(b)) {
  421. var c = new window.TinychatApp.BLL.IgnorelistUpdateUserEvent(a);
  422. this.EventBus.broadcast(window.TinychatApp.BLL.IgnorelistUpdateUserEvent.ID, c);
  423. this.app.showToast(b + " ignored successfully till they leave or you refresh!");
  424. CTS.TempIgnoreList.push(b.toUpperCase());
  425. }
  426. };
  427. TCApp.BLL.Userlist.prototype.unignore = function(a) {
  428. var b = a.isUsername ? a.username : a.nickname,
  429. len = this.ignored.length;
  430. for (var TI = 0; TI<len; TI++) {
  431. if (CTS.TempIgnoreList[TI] === b.toUpperCase()) {
  432. this.ignored.splice(TI, 1);
  433. break;
  434. }
  435. }
  436. len = CTS.TempIgnoreList.length;
  437. for (TI = 0; TI<len; TI++) {
  438. if (CTS.TempIgnoreList[TI] === b.toUpperCase()) {
  439. CTS.TempIgnoreList.splice(TI, 1);
  440. break;
  441. }
  442. }
  443. var e = new window.TinychatApp.BLL.IgnorelistUpdateUserEvent(a);
  444. this.EventBus.broadcast(window.TinychatApp.BLL.IgnorelistUpdateUserEvent.ID, e);
  445. this.app.showToast(a.username + " unignored");
  446. };
  447.  
  448. //REMOVE
  449. Remove(ChatLogElement, 'span[id="input-unread"]');
  450. Remove(ChatLogElement, "#chat-content");
  451. Remove(ChatLogElement, "#chat-wider");
  452. Remove(ChatLogElement, "#chatlog-button");
  453. Remove(SideMenuElement, "#top-buttons-wrapper");
  454. Remove(SideMenuElement, "#user-info");
  455. Remove(SideMenuElement, "#close-users");
  456. Remove(TitleElement, "#room-header-avatar");
  457. Remove(TitleElement, "#room-header-gifts");
  458. Remove(TitleElement, "#room-header-info-text");
  459. Remove(TitleElement, "#room-header-info-details");
  460. Remove(TitleElement, "#room-header-mobile-button");
  461. Remove(TitleElement, 'span[title="Follow"]');
  462. Remove(TitleElement, 'span[title="Share room"]');
  463. Remove(VideoListElement, "#youtube-overlay");
  464. Remove(VideoListElement, "#videos-header-volume");
  465. Remove(document, "#menu-icon");
  466. Remove(document, "#users-icon");
  467. //PARAM REMOVE
  468. if (CTS.enablePMs === false) Remove(ChatListElement, "#chatlist");
  469. //LOAD
  470. CTSRoomLoad();
  471. }
  472.  
  473. function CTSRoomLoad() {
  474. //EVENT LISTENERS
  475. VideoListElement.querySelector("#ChatHeightToggled").addEventListener("click", function() {
  476. if (!CTS.ChatDisplay) {
  477. CTS.ChatWidth += 5;
  478. CTS.ChatDisplay = true;
  479. }
  480. CTS.ChatHeight -= 5;
  481. CTS.UserListDisplay = true;
  482. if (CTS.ChatHeight == 20) {
  483. CTS.ChatHeight = 45;
  484. CTS.UserListDisplay = false;
  485. }
  486. 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;" : "top:36px;min-height:calc(100% - 120px)!important;max-height: calc(100% - 120px)!important;");
  487. 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);" : "0;");
  488. 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;bottom:0;");
  489. VideoListElement.querySelector("#videos-header").style.cssText = "bottom:unset;min-width:400px;width:calc(400px + " + CTS.ChatWidth + "%);max-width:calc(400px + " + CTS.ChatWidth + "%);top:" + (CTS.UserListDisplay ? CTS.ChatHeight + "%;" : "unset;bottom:50px;");
  490. 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;";
  491. UserListElement.querySelector("#button-banlist").style.cssText = "top:calc(" + CTS.ChatHeight + "% + 89px);";
  492. document.querySelector("#content").style.cssText = "width:calc(100% " + (CTS.ChatDisplay ? "- (400px + " + CTS.ChatWidth + "%)" : "") + ")";
  493. VideoListElement.querySelector("#videos-footer").style.cssText = "display:block;top:" + (CTS.UserListDisplay ? "calc(" + CTS.ChatHeight + "% + 119px);" : "36px;") + "right:-70px;display:block;";
  494. UpdateScroll(1, true);
  495. Resize();
  496. }, {
  497. passive: true
  498. });
  499. VideoListElement.querySelector("#ChatWidthToggled").addEventListener("click", function() {
  500. CTS.ChatWidth += 5;
  501. CTS.ChatDisplay = true;
  502. if (CTS.ChatWidth == 25) {
  503. CTS.ChatWidth = -5;
  504. CTS.ChatDisplay = false;
  505. }
  506. 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;" : "top:36px;min-height:calc(100% - 120px)!important;max-height: calc(100% - 120px)!important;");
  507. 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);" : "0;");
  508. 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);" : "unset;bottom:0;");
  509. VideoListElement.querySelector("#videos-header").style.cssText = (!CTS.ChatDisplay) ? "display:none" : "bottom:unset;min-width:400px;width:calc(400px + " + CTS.ChatWidth + "%);max-width:calc(400px + " + CTS.ChatWidth + "%);top:" + ((CTS.UserListDisplay) ? CTS.ChatHeight + "%;" : "unset;bottom:50px;");
  510. 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;";
  511. UserListElement.querySelector("#button-banlist").style.cssText = (!CTS.ChatDisplay) ? "display:none" : "top:calc(" + CTS.ChatHeight + "% + 89px);";
  512. document.querySelector("#content").style.cssText = "width:calc(100% " + ((CTS.ChatDisplay) ? "- (400px + " + CTS.ChatWidth + "%)" : "") + ")";
  513. if (CTS.Me.mod) VideoListElement.querySelector("#videos-footer").style.cssText = "display:block;top:" + ((CTS.UserListDisplay) ? "calc(" + CTS.ChatHeight + "% + 119px);" : "36px;") + "right:-70px;display:block;";
  514. UpdateScroll(1, true);
  515. Resize();
  516. }, {
  517. passive: true
  518. });
  519. VideoListElement.querySelector("#FeaturedToggled").addEventListener("click", function() {
  520. CTS.Featured = !CTS.Featured;
  521. if (CTS.Featured === true) {
  522. Remove(VideoListElement, "#SmallFTYT");
  523. } else {
  524. var node = document.createElement("style");
  525. node.appendChild(document.createTextNode(FeaturedCSS));
  526. node.setAttribute("id", "SmallFTYT");
  527. VideoListElement.appendChild(node);
  528. }
  529. Resize();
  530. }, {
  531. passive: true
  532. });
  533. VideoListElement.querySelector("#ChatColor").addEventListener("click", function() {
  534. CTS.ChatStyleCounter++;
  535. Remove(VideoListElement, "style[id=\"" + (CTS.ChatStyleCounter - 1) + "\"]");
  536. Remove(ChatLogElement, "style[id=\"" + (CTS.ChatStyleCounter - 1) + "\"]");
  537. Remove(SideMenuElement, "style[id=\"" + (CTS.ChatStyleCounter - 1) + "\"]");
  538. var len = CTS.ChatCSS.length - 1;
  539. if (CTS.ChatStyleCounter > len) CTS.ChatStyleCounter = 0;
  540. ChatLogElement.querySelector("style").insertAdjacentHTML("afterend", "<style id=\"" + CTS.ChatStyleCounter + "\">" + CTS.ChatCSS[CTS.ChatStyleCounter][0] + "</style>");
  541. VideoListElement.querySelector("style").insertAdjacentHTML("afterend", "<style id=\"" + CTS.ChatStyleCounter + "\">" + CTS.ChatCSS[CTS.ChatStyleCounter][1] + "</style>");
  542. SideMenuElement.querySelector("style").insertAdjacentHTML("afterend", "<style id=\"" + CTS.ChatStyleCounter + "\">" + CTS.ChatCSS[CTS.ChatStyleCounter][2] + "</style>");
  543. Save("ChatStyle", CTS.ChatStyleCounter);
  544. }, {
  545. passive: true
  546. });
  547. ChatLogElement.querySelector(".cts-message-unread").addEventListener("click", function() {
  548. UpdateScroll(1, true);
  549. CheckUnreadMessage();
  550. }, {
  551. passive: true
  552. });
  553. ChatLogElement.querySelector("#chat").addEventListener("scroll", function(event) {
  554. var element = event.target;
  555. if (Math.floor(element.scrollTop + 25) >= (element.scrollHeight - element.offsetHeight)) CheckUnreadMessage();
  556. }, {
  557. passive: true
  558. });
  559. ChatLogElement.querySelector("#notification-content").addEventListener("scroll", function(event) {
  560. var element = event.target;
  561. if (Math.floor(element.scrollTop + 25) >= (element.scrollHeight - element.offsetHeight)) CTS.NotficationScroll = true;
  562. }, {
  563. passive: true
  564. });
  565. if (CTS.Notification) {
  566. ChatLogElement.querySelector(".notifbtn").addEventListener("click", NotificationResize, {passive: true});
  567. }
  568. VideoListElement.querySelector(".tcsettings").addEventListener("click", function(event) {
  569. var arg;
  570. if (this.innerText === "⯈") {
  571. this.innerText = "⯇";
  572. arg = "block";
  573. } else {
  574. this.innerText = "⯈";
  575. arg = "none";
  576. }
  577. VideoListElement.querySelector("#videos-header-sound").style.display = arg;
  578. if (CTS.Room.PTT === false) VideoListElement.querySelector("#videos-header-mic").style.display = arg;
  579. //VideoListElement.querySelector("#videos-header-snapshot").style.display = arg;
  580. VideoListElement.querySelector("#videos-header-fullscreen").style.display = arg;
  581. VideoListElement.querySelector("span[title=\"Settings\"]").style.display = arg;
  582. }, {
  583. passive: true
  584. });
  585. VideoListElement.querySelector("button[id=\"BackgroundUpdateLeft\"]").addEventListener("click", function() {
  586. CTS.MainBackgroundCounter++;
  587. if (CTS.MainBackgroundCounter === Images.length) CTS.MainBackgroundCounter = 0;
  588. document.body.style.background = "url(\""+Images[CTS.MainBackgroundCounter] +"\") rgb(0, 0, 0) no-repeat";
  589. Save("MainBackground", "url(" + Images[CTS.MainBackgroundCounter] + ")");
  590. }, {
  591. passive: true
  592. });
  593. VideoListElement.querySelector("button[id=\"BackgroundUpdateColor\"]").addEventListener("click", function() {
  594. CTS.MainBackgroundColorCounter++;
  595. if (CTS.MainBackgroundColorCounter === Colors.length) CTS.MainBackgroundColorCounter = 0;
  596. document.body.style.background = Colors[CTS.MainBackgroundColorCounter];
  597. Save("MainBackground", "url(" + Images[CTS.MainBackgroundCounter] + ")");
  598. }, {
  599. passive: true
  600. });
  601. VideoListElement.querySelector("button[id=\"BackgroundUpdateRight\"]").addEventListener("click", function() {
  602. CTS.MainBackgroundCounter--;
  603. if (CTS.MainBackgroundCounter === -1) CTS.MainBackgroundCounter = Images.length - 1;
  604. document.body.style.background = "url(\""+Images[CTS.MainBackgroundCounter] +"\") rgb(0, 0, 0) no-repeat";
  605. Save("MainBackground", "url(" + Images[CTS.MainBackgroundCounter] + ")");
  606. }, {
  607. passive: true
  608. });
  609. VideoListElement.querySelector("button[id=\"FontSizeUpdate\"]").addEventListener("click", function() {
  610. CTS.FontSize += 5;
  611. if (CTS.FontSize >= 40) CTS.FontSize = 15;
  612. Save("FontSize", CTS.FontSize);
  613. ChatLogElement.querySelector("#textarea").style.fontSize = (CTS.FontSize - 4) + "px";
  614. }, {
  615. passive: true
  616. });
  617. //MUTATION OBSERVERS
  618. new MutationObserver(function() {
  619. LoadMessage();
  620. }).observe(ChatLogElement.querySelector("#chat-instant"), {
  621. attributes: true,
  622. attributeFilter: ["class"],
  623. childList: false,
  624. characterData: false
  625. });
  626. new MutationObserver(function() {
  627. Cameras();
  628. }).observe(VideoListElement.querySelector(".videos-items:first-child"), {
  629. childList: true
  630. });
  631. new MutationObserver(function() {
  632. Cameras();
  633. }).observe(VideoListElement.querySelector(".videos-items:last-child"), {
  634. childList: true
  635. });
  636. new MutationObserver(function() {
  637. if (CTS.AutoMicrophone) {
  638. OpenMicrophone();
  639. }
  640. }).observe(VideoListElement.querySelector("#videos-footer-broadcast-wrapper"), {
  641. attributes: true,
  642. attributeFilter: ["class"]
  643. });
  644. //REFRESH VIEW
  645. NotificationDisplay();
  646. Cameras();
  647. }
  648.  
  649. //YOUTUBE FUNCTIONS
  650. function CheckHost() {
  651. if (CTS.Host === 0) {
  652. Send("msg", "!whoisbot");
  653. CTS.HostAttempt = 0;
  654. CTS.HostWaiting = true;
  655. }
  656. }
  657.  
  658. function SetBot(stillbot) {
  659. if (stillbot) {
  660. CTS.Game.NoReset = true;
  661. }
  662. Send("msg", "!bot");
  663. CTS.HostWaiting = false;
  664. }
  665.  
  666. function CheckYouTube() {
  667. if (arguments[3] === undefined) arguments[3] = true;
  668. CTS.YouTube.XHR.type = arguments[1];
  669. 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);
  670. if (videoid !== null) {
  671. videoid = videoid[1].replace(/v\=/g, "");
  672. if (videoid.match(/list\=/i)) {
  673. if (arguments[3]) {
  674. videoid = videoid.replace(/list\=/, "");
  675. debug("YOUTUBE::PLAYLIST LINK GATHERER", videoid);
  676. CTS.YouTube.XHR.open("GET", "https://www.googleapis.com/youtube/v3/playlistItems?playlistId=" + videoid + "&part=snippet&maxResults=50" + ((arguments[2] !== undefined) ? "&pageToken=" + arguments[2] : "") + "&type=video&eventType=completed&key=AIzaSyCPQe4gGZuyVQ78zdqf9O5iEyfVLPaRwZg");
  677. CTS.YouTube.XHR.playlistid = videoid;
  678. CTS.YouTube.XHR.send();
  679. }
  680. } else {
  681. CTS.YouTube.XHR.videoid = videoid;
  682. CTS.YouTube.VideoReturn = true;
  683. 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=AIzaSyCPQe4gGZuyVQ78zdqf9O5iEyfVLPaRwZg");
  684. CTS.YouTube.XHR.send();
  685. debug("YOUTUBE::LINK SEARCH", CTS.YouTube.XHR.videoid);
  686. }
  687. } else {
  688. if (CTS.YouTube.MessageQueueList.length <= 0) {
  689. arguments[0] = arguments[0].replace(/^(!yt )/, "");
  690. CTS.YouTube.SearchReturn = true;
  691. CTS.YouTube.XHR.open("GET", "https://www.googleapis.com/youtube/v3/search?key=AIzaSyCPQe4gGZuyVQ78zdqf9O5iEyfVLPaRwZg&maxResults=1&q=" + encodeURI(arguments[0]) + "&type=video&part=snippet");
  692. CTS.YouTube.XHR.send();
  693. debug("YOUTUBE::KEYWORD SEARCH", arguments[0]);
  694. }
  695. }
  696. }
  697.  
  698. function YouTubePlayList() {
  699. CTS.YouTube.ShowQueue = (arguments[0] !== undefined) ? true : false;
  700. if ((!CTS.YouTube.Playing && CTS.Host == CTS.Me.handle) || CTS.YouTube.Clear === true || CTS.YouTube.ShowQueue === true) Send("yut_playlist");
  701. }
  702.  
  703. function YouTubeTrackAdd() {
  704. if (CTS.YouTube.MessageQueueList[0] !== undefined) {
  705. if (CTS.YouTube.Busy === false) {
  706. if (CTS.YouTube.MessageQueueList.length > 0) {
  707. debug("YOUTUBE::ID", CTS.YouTube.MessageQueueList[0].snippet.resourceId.videoId);
  708. 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=AIzaSyCPQe4gGZuyVQ78zdqf9O5iEyfVLPaRwZg");
  709. CTS.YouTube.XHR.videoid = CTS.YouTube.MessageQueueList[0].snippet.resourceId.videoId;
  710. CTS.YouTube.XHR.send();
  711. CTS.YouTube.MessageQueueList.shift();
  712. }
  713. }
  714. }
  715. }
  716.  
  717. function YouTubePlayListItems() {
  718. var len = arguments[0].length;
  719. for (var i = 0; i < len; i++) {
  720. if (CTS.YouTube.NotPlayable.includes(arguments[0][i].snippet.title) === false) {
  721. CTS.YouTube.MessageQueueList.push(arguments[0][i]);
  722. }
  723. }
  724. }
  725.  
  726. function YouTubePlayListRemove() {
  727. var len = arguments[0].length;
  728. for (var i = 0; i < len; i++) {
  729. setTimeout(Send("yut_playlist_remove", [arguments[0][i].id, arguments[0][i].duration, arguments[0][i].title, arguments[0][i].image]), (i * 5), arguments[0]);
  730. }
  731. }
  732.  
  733. function YouTubeTimeConvert() {
  734. var a = arguments[0].match(/\d+/g);
  735. if (arguments[0].indexOf("M") >= 0 && arguments[0].indexOf("H") == -1 && arguments[0].indexOf("S") == -1) a = [0, a[0], 0];
  736. if (arguments[0].indexOf("H") >= 0 && arguments[0].indexOf("M") == -1) a = [a[0], 0, a[1]];
  737. if (arguments[0].indexOf("H") >= 0 && arguments[0].indexOf("M") == -1 && arguments[0].indexOf("S") == -1) a = [a[0], 0, 0];
  738. var len = a.length;
  739. arguments[0] = 0;
  740. if (len == 3) {
  741. arguments[0] = arguments[0] + parseInt(a[0]) * 3600;
  742. arguments[0] = arguments[0] + parseInt(a[1]) * 60;
  743. arguments[0] = arguments[0] + parseInt(a[2]);
  744. }
  745. if (len == 2) {
  746. arguments[0] = arguments[0] + parseInt(a[0]) * 60;
  747. arguments[0] = arguments[0] + parseInt(a[1]);
  748. }
  749. if (len == 1) arguments[0] = arguments[0] + parseInt(a[0]);
  750. return arguments[0];
  751. }
  752.  
  753. function BotCommandCheck(){
  754. // text:user
  755. //Fun
  756. if (arguments[1].match(/^!8ball\s.*\?/i)) Send("msg", CTS.EightBall[Rand(0, CTS.EightBall.length - 1)]);
  757. if (arguments[1].match(/^!coin$/i)) Send("msg", "The coin landed on "+((Rand(0, 1)==1)?"heads":"tails")+"!");
  758. if (arguments[1].match(/^!whoisbot$/i)) BotCommand(5, arguments[0]);
  759. if (arguments[1].match(/^!chuck$/i)) Chuck(); // If API locks up; we'll see errors then
  760. if (arguments[1].match(/^!dad$/i)) Dad(); // If API locks up; we'll see errors then
  761.  
  762. if (CTS.Room.YT_ON) {
  763. if (arguments[1].match(/^!play$/i)) YouTubePlayList();
  764. if (arguments[1].match(/^!yt\s/i)) BotCommand(1, arguments[0], arguments[1]);
  765. if (arguments[1].match(/^!ytbypass\s/i)) BotCommand(6, arguments[0], arguments[1]);
  766. if (arguments[1].match(/^!ytclear$/i)) BotCommand(2, arguments[0]);
  767. if (arguments[1].match(/^!ytskip$/i)) BotCommand(3, arguments[0]);
  768. if (arguments[1].match(/^!ytqueue$/i)) BotCommand(4, arguments[0]);
  769. }
  770. //Can Game Check
  771. if(CTS.UserList[arguments[0]].canGame) {
  772. //Fish
  773. FishCommandCheck(arguments[0], arguments[1]);
  774. }
  775. }
  776.  
  777. function BotCheck() {
  778. if (CTS.UserList[arguments[0]].mod) {
  779. //CHECK YOUTUBE HOST
  780. if(arguments[1].match(/^!bot$/i)) {
  781. //SET HOST&CONTINUE YT
  782. CTS.Host = arguments[2].handle;
  783. CTS.HostWaiting = false;
  784. //RESET GAMES
  785. if (CTS.Host != CTS.Me.handle && CTS.Game.NoReset) CTS.Game.NoReset = false;
  786. if (arguments[2].handle === CTS.Host && CTS.HostWaiting === false && !CTS.Game.NoReset) {
  787. if (CTS.Me.handle !== arguments[2].handle) {
  788. CTS.Game.Fish.GameStart = false;
  789. CTS.Game.NoReset = false;
  790. Fish.reset(true);
  791. }
  792. }
  793. if (CTS.Me.handle == arguments[2].handle && CTS.Room.YT_ON) YouTubePlayList();
  794. } else if (CTS.HostWaiting === true) {
  795. CTS.HostAttempt++;
  796. if (CTS.HostAttempt == 1) {
  797. setTimeout(function() {
  798. if (CTS.HostWaiting === true && CTS.Host === 0) SetBot(false);
  799. }, 6000);
  800. }
  801. if (CTS.HostAttempt == 10) SetBot(false);
  802. }
  803. }
  804. }
  805.  
  806. CTS.YouTube.XHR.onload = function() {
  807. var response = JSON.parse(CTS.YouTube.XHR.responseText);
  808. if (response.error) {
  809. Send("msg", "⛔" + ((response.error.errors[0].reason) ? response.error.errors[0].reason : "Track could not be added!") + "⛔");
  810. } else {
  811. if (response.kind == "youtube#playlistItemListResponse" && response.nextPageToken === undefined && response.items.length === 0) {
  812. CTS.YouTube.ListBuilt = true;
  813. Send("msg", "🎵Found " + CTS.YouTube.MessageQueueList.length + " tracks!\nThis may take a few moments to add, requests can be made shortly.🎵");
  814. CTS.YouTube.DataReady = true;
  815. CTS.YouTube.Busy = false;
  816. YouTubeTrackAdd();
  817. }
  818. CTS.YouTube.DataReady = false;
  819. if (response.items[0]) {
  820. CTS.YouTube.Busy = true;
  821. if (response.items[0].id) {
  822. if (response.kind == "youtube#playlistItemListResponse") {
  823. YouTubePlayListItems(response.items);
  824. } else {
  825. CTS.YouTube.VideoID = response.items[0].id.videoId;
  826. 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=AIzaSyCPQe4gGZuyVQ78zdqf9O5iEyfVLPaRwZg");
  827. CTS.YouTube.XHR.send();
  828. }
  829. } else if (response.items[0].contentDetails.duration) {
  830. CTS.YouTube.DataReady = true;
  831. }
  832. if (CTS.YouTube.DataReady === false) {
  833. CTS.YouTube.Busy = false;
  834. if (response.kind == "youtube#searchListResponse") CTS.YouTube.XHR.videoid = response.items[0].id.videoId;
  835. if (response.kind == "youtube#playlistItemListResponse") {
  836. if (response.nextPageToken !== undefined) {
  837. CTS.YouTube.ListBuilt = false;
  838. CheckYouTube("https://www.youtube.com/playlist?list=" + CTS.YouTube.XHR.playlistid, false, response.nextPageToken);
  839. CTS.YouTube.Busy = true;
  840. } else {
  841. CTS.YouTube.ListBuilt = true;
  842. Send("msg", "🎵Adding " + CTS.YouTube.MessageQueueList.length + " track(s) to queue!🎵\nEnjoy!");
  843. CTS.YouTube.Busy = false;
  844. }
  845. }
  846. } else {
  847. CTS.YouTube.VideoID = (CTS.YouTube.XHR.videoid) ? CTS.YouTube.XHR.videoid : CTS.YouTube.MessageQueueList[0].snippet.resourceId.videoId;
  848. if (CTS.YouTube.Playing === true) {
  849. MessagePopUp(-1, "Added " + ((response.items[0] === undefined) ? response.items.snippet.title : response.items[0].snippet.title), true, true);
  850. 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]);
  851. CTS.YouTube.Busy = false;
  852. } else {
  853. if (response.items[0].snippet.title !== undefined) {
  854. 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]);
  855. 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]);
  856. CTS.YouTube.Playing = true;
  857. }
  858. CTS.YouTube.Busy = false;
  859. }
  860. }
  861. }
  862. if (CTS.YouTube.SearchReturn === true || (CTS.YouTube.SearchReturn === false && CTS.YouTube.VideoReturn === true && CTS.YouTube.XHR.type === true)) {
  863. var title = "";
  864. CTS.YouTube.SearchReturn = false;
  865. CTS.YouTube.VideoReturn = false;
  866. if (response.items[0] !== undefined) {
  867. if (response.items[0].length > 0) title = response.items[0].snippet.title;
  868. }
  869. if (response.items !== undefined) {
  870. if (response.items.length > 0) title = response.items[0].snippet.title;
  871. }
  872. Send("msg", ((title === "") ? "⛔Track could not be added!⛔" : "🎵Added " + DecodeTXT(title) + " to queue!🎵"));
  873. }
  874. if (CTS.YouTube.MessageQueueList.length > 0) YouTubeTrackAdd();
  875. }
  876. };
  877. // Chuck Norris Jokes API (https://api.chucknorris.io/)
  878. function Chuck(chat, selectedchat) {
  879. if (chat === undefined) {
  880. CTS.Chuck.Bot = true;
  881. } else {
  882. CTS.Chuck.Bot = false;
  883. if (selectedchat !== undefined) {
  884. CTS.Chuck.activepm = selectedchat;
  885. CTS.Chuck.chat = chat;
  886. } else {
  887. CTS.Chuck.activepm = undefined;
  888. CTS.Chuck.chat = chat;
  889. }
  890. }
  891. CTS.Chuck.XHR.open("GET", "https://api.chucknorris.io/jokes/random");
  892. CTS.Chuck.XHR.send();
  893. }
  894.  
  895. CTS.Chuck.XHR.onload = function() {
  896. var response = JSON.parse(CTS.Chuck.XHR.responseText);
  897. console.log(response);
  898. if (response.error) {
  899. console.log(response); // Template error check, will see how this service calls theirs
  900. } else {
  901. var msg = "[CHUCK NORRIS]\n"+response.value;
  902. if (CTS.Chuck.Bot === true) {
  903. Send("msg", msg);
  904. } else {
  905. if (CTS.Chuck.activepm !== undefined) {
  906. Send("pvtmsg", msg, CTS.Chuck.activepm);
  907. } else {
  908. Send("msg", msg);
  909. }
  910. }
  911. }
  912. };
  913.  
  914. // icanhazdadjoke API (https://icanhazdadjoke.com/)
  915. function Dad(chat, selectedchat) {
  916. if (chat === undefined) {
  917. CTS.Dad.Bot = true;
  918. } else {
  919. CTS.Dad.Bot = false;
  920. if (selectedchat !== undefined) {
  921. CTS.Dad.activepm = selectedchat;
  922. CTS.Dad.chat = chat;
  923. } else {
  924. CTS.Dad.activepm = undefined;
  925. CTS.Dad.chat = chat;
  926. }
  927. }
  928. CTS.Dad.XHR.open("GET", "https://icanhazdadjoke.com/");
  929. CTS.Dad.XHR.setRequestHeader("Accept", "application/json");
  930. CTS.Dad.XHR.send();
  931. }
  932.  
  933. CTS.Dad.XHR.onload = function() {
  934. var response = JSON.parse(CTS.Dad.XHR.responseText);
  935. console.log(response);
  936. if (response.error) {
  937. console.log(response); // Template error check, will see how this service calls theirs
  938. } else {
  939. var msg = "[DAD JOKE]\n"+response.joke;
  940. if (CTS.Dad.Bot === true) {
  941. Send("msg", msg);
  942. } else {
  943. if (CTS.Dad.activepm !== undefined) {
  944. Send("pvtmsg", msg, CTS.Dad.activepm);
  945. } else {
  946. Send("msg", msg);
  947. }
  948. }
  949. }
  950. };
  951.  
  952. // Message Functions
  953. function CreateMessage() {
  954. CheckUnreadMessage();
  955. if (arguments[6] == GetActiveChat()) ChatLogElement.querySelector("#cts-chat-content").insertAdjacentHTML("beforeend", "<div class=\"message" + ((CTS.Avatar) ? " common " : " ") + ((CTS.HighlightList.includes(arguments[3]) || CTS.HighlightList.includes(arguments[4].toUpperCase())) ? "highlight" : "") + "\" " + ((arguments[2] === "") ? "style=\"padding-left:3px;\"" : "") + ">" + ((CTS.Avatar) ? "<a href=\"#\" class=\"avatar\"><div><img src=\"" + arguments[2] + "\"></div></a>" : "") + "<div class=\"nickname\" style=\"-webkit-box-shadow: 0 0 6px " + arguments[1] + ";box-shadow: 0 0 6px " + arguments[1] + ";background:" + arguments[1] + ";\">" + arguments[4] + "<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>");
  956. var Chat = ChatLogElement.querySelectorAll("#cts-chat-content>.message");
  957. var len = Chat.length;
  958. if (len > CTS.ChatLimit + 50) {
  959. CTS.ChatScroll = true;
  960. len = Chat.length - CTS.ChatLimit;
  961. var ChatIndex = 0;
  962. for (ChatIndex; ChatIndex < len; ChatIndex++) {
  963. Chat[ChatIndex].parentNode.removeChild(Chat[ChatIndex]);
  964. CTS.Message[arguments[6]].shift();
  965. window.TinychatApp.getInstance().defaultChatroom._chatlog.items = [];
  966. }
  967. }
  968. UpdateScroll(1, false);
  969. }
  970.  
  971. function AKB() {
  972. if ((CTS.AutoKick === false && CTS.AutoBan === false) && arguments[0] === true) {
  973. CTS.WatchList.push([arguments[2], arguments[1], new Date()]);
  974. debug("WATCHLIST::ADDED", arguments[2] + ":" + arguments[1]);
  975. } else {
  976. if (CTS.Me.mod) {
  977. if (CTS.AutoKick === true) {
  978. CTS.NoGreet = true;
  979. Send("kick", arguments[1]);
  980. } else if (CTS.AutoBan === true) {
  981. CTS.NoGreet = true;
  982. Send("ban", arguments[1]);
  983. }
  984. }
  985. }
  986. }
  987.  
  988. function AISB() {
  989. if (arguments[0].username !== "") {
  990. if (!CTS.SafeList.includes(arguments[0].username.toUpperCase())) {
  991. if (arguments[0].giftpoints > 0 || arguments[0].subscription > 0 || arguments[0].mod === true) {
  992. if (CTS.SafeList.length < 1000) {
  993. CTS.SafeList.push(arguments[0].username.toUpperCase());
  994. Save("AKB", JSON.stringify(CTS.SafeList));
  995. debug("SAFELIST::ADDED", arguments[0].username.toUpperCase() + ":" + arguments[0].handle);
  996. }
  997. } else {
  998. if (arguments[0].lurker === false) {
  999. AKB(true, arguments[0].handle, arguments[0].username.toUpperCase());
  1000. } else {
  1001. AKB(false, arguments[0].handle);
  1002. }
  1003. }
  1004. }
  1005. } else {
  1006. AKB(false, arguments[0].handle);
  1007. }
  1008. }
  1009.  
  1010. function LoadMessage() {
  1011. var ChatIndex, index, Chat = ChatLogElement.querySelector("#cts-chat-content");
  1012. CTS.ChatScroll = true;
  1013. if (!CTS.MessageCallback[CTS.ActiveMessage]) CTS.MessageCallback[CTS.ActiveMessage] = [];
  1014. CTS.MessageCallback[CTS.ActiveMessage].html = Chat.innerHTML;
  1015. CTS.MessageCallback[CTS.ActiveMessage].len = (Chat.innerHTML === "") ? 0 : CTS.Message[CTS.ActiveMessage].length;
  1016. Chat.innerHTML = "";
  1017. CheckUnreadMessage();
  1018. CTS.ActiveMessage = GetActiveChat();
  1019. if (CTS.Message[CTS.ActiveMessage]) {
  1020. index = (CTS.MessageCallback[CTS.ActiveMessage]) ? CTS.MessageCallback[CTS.ActiveMessage].len : 0;
  1021. if (index > 0) Chat.innerHTML = CTS.MessageCallback[CTS.ActiveMessage].html;
  1022. var len = CTS.Message[CTS.ActiveMessage].length;
  1023. 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)) ? "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 + "<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>");
  1024. } else {
  1025. CTS.Message[CTS.ActiveMessage] = [];
  1026. }
  1027. UpdateScroll(1, false);
  1028. }
  1029.  
  1030. function CheckUnreadMessage() {
  1031. if (Math.floor(ChatLogElement.querySelector("#chat").scrollTop + 50) >= (ChatLogElement.querySelector("#chat").scrollHeight - ChatLogElement.querySelector("#chat").offsetHeight)) {
  1032. CTS.MissedMsg = 0;
  1033. CTS.ChatScroll = true;
  1034. ChatLogElement.querySelector(".cts-message-unread").style.display = "none";
  1035. } else {
  1036. CTS.MissedMsg++;
  1037. CTS.ChatScroll = false;
  1038. if (ChatLogElement.querySelector(".cts-message-unread").style.display == "none") {
  1039. ChatLogElement.querySelector(".cts-message-unread").style.display = "block";
  1040. ChatLogElement.querySelector(".cts-message-unread").innerHTML = "There are " + CTS.MissedMsg + " unread message(s)!";
  1041. }
  1042. }
  1043. }
  1044.  
  1045. function GetActiveChat() {
  1046. var elem = ChatListElement.querySelector(".active");
  1047. if (elem) return elem.getAttribute("data-chat-id");
  1048. return 0;
  1049. }
  1050.  
  1051. function CheckImgur() {
  1052. if (CTS.imgur) {
  1053. var i = arguments[0].match(/https?:\/\/i\.imgur\.com\/[a-zA-Z0-9]*\.(jpg|gif|png|mp4)/);
  1054. if (i !== null) {
  1055. arguments[0] = (i[1] == "mp4") ? "<center>(Video Below)\n<video onclick=\"if (this.paused) {this.play();}else{this.pause();}\" oncontextmenu=\"return false;\" width=\"320px\" height=\"240px\"><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>";
  1056. }
  1057. }
  1058. return arguments[0];
  1059. }
  1060.  
  1061. function TTS() {
  1062. var utter = new window.SpeechSynthesisUtterance(arguments[0]);
  1063. utter.voice = CTS.TTS.voices[0];
  1064. utter.rate = 1.0;
  1065. utter.pitch = 0.5;
  1066. CTS.TTS.synth.speak(utter);
  1067. }
  1068.  
  1069. function RoomUsers() {
  1070. if (CTS.ScriptInit) UserListElement.querySelector("#header>span>span").innerText = " : " + CTS.UserList.length;
  1071. }
  1072.  
  1073. function SpamPrevention() {
  1074. var LineBreaks = (arguments[0].match(/\n|\r/g) || []).length;
  1075. if (LineBreaks >= 14 && arguments[1] === false) return true;
  1076. return false;
  1077. }
  1078.  
  1079. function GamePrevention () {
  1080. if (!CTS.CanSeeGames && arguments[1] && arguments[0].match(/^\[(?:FISHING\sBOAT)\]/i)) return false;
  1081. return true;
  1082. }
  1083.  
  1084. function UpdateScroll() {
  1085. if (arguments[0] === 1 && (CTS.ChatScroll || arguments[1] === true)) ChatLogElement.querySelector("#chat").scrollTop = ChatLogElement.querySelector("#chat").scrollHeight;
  1086. if (arguments[0] === 2 && (CTS.NotificationScroll || arguments[1] === true)) ChatLogElement.querySelector("#notification-content").scrollTop = ChatLogElement.querySelector("#notification-content").scrollHeight;
  1087. }
  1088.  
  1089. function DecodeTXT() {
  1090. var txt = document.createElement("textarea");
  1091. txt.innerHTML = arguments[0];
  1092. return txt.value;
  1093. }
  1094.  
  1095. function HTMLtoTXT() {
  1096. var p = document.createElement("p");
  1097. p.appendChild(document.createTextNode(arguments[0]));
  1098. 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>");
  1099. }
  1100.  
  1101. function TimeToDate() {
  1102. if (arguments[1] === undefined) arguments[1] = new Date();
  1103. var match = arguments[0].trim().match(/(\d+):(\d+)\s?((am|AM|aM|Am)|(pm|PM|pM|Pm))/);
  1104. var t = {
  1105. hours: parseInt(match[1]),
  1106. minutes: parseInt(match[2]),
  1107. period: match[3].toLowerCase()
  1108. };
  1109. if (t.hours === 12) {
  1110. if (t.period === "am") arguments[1].setHours(t.hours - 12, t.minutes, 0);
  1111. if (t.period === "pm") arguments[1].setHours(t.hours, t.minutes, 0);
  1112. } else {
  1113. if (t.period === "am") arguments[1].setHours(t.hours, t.minutes, 0);
  1114. if (t.period === "pm") arguments[1].setHours(t.hours + 12, t.minutes, 0);
  1115. }
  1116. return arguments[1];
  1117. }
  1118.  
  1119. function PushPM() {
  1120. var list = (arguments[2] !== undefined) ? CTS.UserList[arguments[2]] : CTS.Me;
  1121.  
  1122. CTS.Message[arguments[0]].push({
  1123. "time": Time(),
  1124. "namecolor": list.namecolor,
  1125. "avatar": list.avatar,
  1126. "username": list.username,
  1127. "nick": list.nick,
  1128. "msg": CheckImgur(HTMLtoTXT(arguments[1]))
  1129. });
  1130.  
  1131. if (arguments[0] == GetActiveChat()) {
  1132. var msg = CTS.Message[arguments[0]][CTS.Message[arguments[0]].length - 1];
  1133. CreateMessage(msg.time, list.namecolor, list.avatar, list.username, list.nick, msg.msg, arguments[0]);
  1134. UpdateScroll(1, false);
  1135. }
  1136. }
  1137.  
  1138. function Time() {
  1139. return (new Date().toLocaleString("en-US", {
  1140. hour: "numeric",
  1141. minute: "numeric",
  1142. second: "numeric",
  1143. hour12: true
  1144. }));
  1145. }
  1146. // Features
  1147. function MessagePopUp() {
  1148. if (CTS.Popups) {
  1149. var push = false;
  1150. if (arguments[0] != -1) {
  1151. if (ChatListElement.querySelector(".list-item .active")) {
  1152. if (ChatListElement.querySelector(".active").innerHTML.includes(CTS.UserList[arguments[0]].nick) && !ChatListElement.querySelector(".active").innerHTML.includes("(offline)")) {
  1153. if (arguments[2]) push = true;
  1154. } else {
  1155. push = true;
  1156. }
  1157. } else if (!arguments[2]) {
  1158. push = true;
  1159. }
  1160. }
  1161. if (arguments[3]) push = true;
  1162. if (push || !CTS.ChatDisplay) {
  1163. if (VideoListElement.querySelector(".PMOverlay .PMPopup:nth-child(5)")) {
  1164. Remove(VideoListElement, ".PMOverlay .PMPopup:first-child");
  1165. clearTimeout(CTS.NotificationTimeOut[0]);
  1166. CTS.NotificationTimeOut.shift();
  1167. }
  1168. VideoListElement.querySelector(".PMOverlay").insertAdjacentHTML("beforeend", "<div class=\"PMPopup\"><h2><div class=\"PMTime\">" + Time() + "</div><div class=\"PMName\">" + ((arguments[3]) ? "YouTube Bot" : (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>");
  1169. CTS.NotificationTimeOut.push(setTimeout(function() {
  1170. if (VideoListElement.querySelector(".PMOverlay .PMPopup")) {
  1171. Remove(VideoListElement, ".PMOverlay .PMPopup:first-child");
  1172. CTS.NotificationTimeOut.shift();
  1173. }
  1174. }, 11100));
  1175. }
  1176. }
  1177. }
  1178.  
  1179. function Reminder() {
  1180. var temp,
  1181. i,
  1182. len = CTS.ReminderServerInList.length;
  1183. for (i = 0; i < len; i++) clearTimeout(CTS.ReminderServerInList[i]);
  1184. CTS.ReminderServerInList = [];
  1185. if (CTS.Reminder === true) {
  1186. len = CTS.ReminderList.length;
  1187. for (i = 0; i < len; i++) {
  1188. temp = TimeToDate(CTS.ReminderList[i][0]);
  1189. CTS.RecentTime = new Date();
  1190. if (temp < CTS.RecentTime) temp.setDate(temp.getDate() + 1);
  1191. var OffsetTime = temp - CTS.RecentTime;
  1192. CTS.ReminderServerInList.push(setTimeout(AddReminder, OffsetTime, arguments[0], CTS.ReminderList[i][1], i));
  1193. }
  1194. }
  1195. }
  1196.  
  1197. function AddReminder() {
  1198. Send("msg", "🕬 " + arguments[1]);
  1199. setTimeout(Reminder, 5000, arguments[0]);
  1200. }
  1201.  
  1202. function NotificationDisplay() {
  1203. ChatLogElement.querySelector("#notification-content").style.cssText = "display:" + ((CTS.Notification) ? "block" : "none") + ";";
  1204. ChatLogElement.querySelector(".notifbtn").style.cssText = "display:" + ((CTS.Notification) ? "block" : "none") + ";";
  1205. if (CTS.Notification) {
  1206. ChatLogElement.querySelector(".notifbtn").addEventListener("click", NotificationResize, {passive: true});
  1207. } else {
  1208. ChatLogElement.querySelector(".notifbtn").removeEventListener("click", NotificationResize, {passive: true});
  1209. }
  1210. }
  1211.  
  1212. function NotificationResize() {
  1213. ChatLogElement.querySelector("#notification-content").classList.toggle("large");
  1214. if (ChatLogElement.querySelector(".notifbtn").innerText === "▼") {
  1215. ChatLogElement.querySelector(".notifbtn").innerText = "▲";
  1216. ChatLogElement.querySelector("#chat").style.height="0%";
  1217. ChatLogElement.querySelector("#input").style.display="none";
  1218. } else {
  1219. ChatLogElement.querySelector(".notifbtn").innerText = "▼";
  1220. ChatLogElement.querySelector("#chat").style.height="100%";
  1221. ChatLogElement.querySelector("#input").style.display="block";
  1222. }
  1223. }
  1224.  
  1225. function Dice() {
  1226. return String.fromCharCode("0x268" + Rand(0, 5));
  1227. }
  1228.  
  1229. function Rand() {
  1230. arguments[0] = Math.ceil(arguments[0]);
  1231. arguments[1] = Math.floor(arguments[1]);
  1232. return Math.floor(Math.random() * (arguments[1] - arguments[0] + 1)) + arguments[0];
  1233. }
  1234.  
  1235. function OpenMicrophone() {
  1236. MicrophoneElement.initMouseEvent("mousedown");
  1237. VideoListElement.querySelector("#videos-footer-push-to-talk").dispatchEvent(MicrophoneElement);
  1238. }
  1239.  
  1240. function Cameras() {
  1241. var Camera = VideoListElement.querySelectorAll(".videos-items:first-child>.js-video");
  1242. for (var featured = 1; featured < Camera.length; featured++) {
  1243. if (!Camera[featured].querySelector("tc-video-item").shadowRoot.querySelector(".video #fixed")) {
  1244. Camera[featured].querySelector("tc-video-item").shadowRoot.querySelector(".video").insertAdjacentHTML("afterbegin", "<style id=\"fixed\">.video.large{position: absolute;left:20%;top: 0;z-index: 2;width: 60%;}.video{padding:0;}.video>div>.overlay{box-shadow:unset!important;}.video:after{content:unset;}</style>");
  1245. }
  1246. }
  1247. Camera = VideoListElement.querySelectorAll(".videos-items:last-child>.js-video");
  1248. for (var normal = 0; normal < Camera.length; normal++) {
  1249. if (!Camera[normal].querySelector("tc-video-item").shadowRoot.querySelector(".video #fixed")) {
  1250. Camera[normal].querySelector("tc-video-item").shadowRoot.querySelector(".video").insertAdjacentHTML("afterbegin", "<style id=\"fixed\">.video.large{position: absolute;left:20%;top: 0;z-index: 2;width: 60%;}.video{padding:0;}.video>div>.overlay{box-shadow:unset!important;}.video:after{content:unset;}</style>");
  1251. }
  1252. }
  1253. Resize();
  1254. }
  1255.  
  1256. function Resize() {
  1257. window.dispatchEvent(new Event("resize"));
  1258. }
  1259.  
  1260. function OwnerCommand(){
  1261. if (CTS.UserList[arguments[0]].owner && !CTS.Me.owner) {
  1262. //PROCEED WITH CAUTION
  1263. if (arguments[1].match(/^!raid\s/i)) {
  1264. var raid = arguments[1].match(/^(?:\!raid\s)(https?:\/\/tinychat.com(?!\/#)\/(?!gifts|settings|coins|subscription|promote)(?:room\/)?(?:[a-z0-9_]){1,32})/i);
  1265. if (raid !== undefined) window.location.replace(raid[1]);
  1266. }
  1267. if (arguments[1].match(/^!version$/i)) Send("pvtmsg", "I am using "+CTS.Project.Name+"v"+CTS.Project.Version, CTS.UserList[arguments[0]].handle);
  1268.  
  1269. }
  1270. }
  1271.  
  1272. function Command() {
  1273. var UserCommand = arguments[0].match(/^!([a-z0-9]*)(?:\s?)(.*)/i);
  1274. if (UserCommand) {
  1275. if (typeof CommandList[UserCommand[1].toLowerCase()] == "function") {
  1276. debug("COMMAND::" + ((arguments[1]) ? "PM" : "MAIN"), UserCommand[1]+":"+UserCommand[2]);
  1277. CommandList[UserCommand[1].toLowerCase()](UserCommand[2], arguments[1]);
  1278. }
  1279. }
  1280. }
  1281. // Alert Functions
  1282. function Settings() {
  1283. Alert(GetActiveChat(), ((arguments[0] !== undefined) ? arguments[0] : "") + "<center>CTS BOT CONFIGURATION:\nBot Mode: " + ((CTS.Bot) ? "AUTO" : "OFF") + "\nOperator Mode: " + ((CTS.UserYT) ? "ON" : "OFF") + "\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.Notification) ? "SHOW" : "HIDE") + "\nPopup Display: " + ((CTS.Popups) ? "SHOW" : "HIDE") + "\nFont Size: " + CTS.FontSize + "PX\n\nFOR LIST OF COMMANDS:\n!CTS</center>");
  1284. }
  1285.  
  1286. function Alert() {
  1287. CTS.Message[arguments[0]].push({
  1288. "time": Time(),
  1289. "namecolor": "#3f69c0",
  1290. "avatar": "https://i.imgur.com/S09irS7.png",
  1291. "username": "",
  1292. "nick": ("CTS Version: " + CTS.Project.Version),
  1293. "msg": arguments[1]
  1294. });
  1295. var len = CTS.Message[arguments[0]].length - 1;
  1296. arguments[1] = CTS.Message[arguments[0]][len];
  1297. CreateMessage(arguments[1].time, arguments[1].namecolor, arguments[1].avatar, arguments[1].username, arguments[1].nick, arguments[1].msg, arguments[0]);
  1298. }
  1299.  
  1300. function AddUserNotification() {
  1301. if (CTS.ScriptInit) {
  1302. var chat = ChatLogElement.querySelector("#notification-content"),
  1303. Notification;
  1304. CTS.NotificationScroll = (Math.floor(chat.scrollTop) + 5 >= (chat.scrollHeight - chat.offsetHeight)) ? true : false;
  1305. if (arguments[0] == 1) {
  1306. Notification = arguments[3] + ((arguments[4]) ? " is " : " has stopped ") + "broadcasting!";
  1307. } else if (arguments[0] == 2) {
  1308. Notification = arguments[3] + " has " + ((!arguments[4]) ? "joined!" : "left");
  1309. } else if (arguments[0] == 3) {
  1310. Notification = arguments[2] + "has mentioned you!";
  1311. ChatLogElement.querySelector("#notification-content").insertAdjacentHTML("beforeend", "<div class=\"list-item\"><div class=\"notification\"><span style=\"background:" + arguments[1] + "\" class=\"nickname\">" + arguments[2] + "</span><span class=\"time\"> " + Time() + " </span><br/> has mentioned you.</div></div>");
  1312. UpdateScroll(2, true);
  1313. } else if (arguments[0] == 4) {
  1314. Notification = "with the account name " + arguments[3] + " changed their name to " + arguments[5];
  1315. }
  1316. if (arguments[0] != 3) ChatLogElement.querySelector("#notification-content").insertAdjacentHTML("beforeend", "<div class=\"list-item\"><div class=\"notification\"><span class=\"nickname\" style=\"background:" + arguments[1] + ";\">" + arguments[2] + "</span><span class=\"time\"> " + Time() + " </span><br/>" + Notification + "</div></div>");
  1317. if (CTS.TTS.synth !== undefined && (CTS.TTSList.includes(arguments[2].toUpperCase()) || CTS.TTSList.includes(arguments[3]) || CTS.TTSList.includes("-ALL") || CTS.TTSList.includes("-EVENT"))) TTS(arguments[2] + ((arguments[0] == 4) ? " " : "as ") + Notification);
  1318. UpdateScroll(2, false);
  1319. var Notifications = ChatLogElement.querySelectorAll(".notification");
  1320. if (Notifications.length > CTS.NotificationLimit + 10) {
  1321. for (var NotificationIndex = 0; NotificationIndex < Notifications.length - CTS.NotificationLimit; NotificationIndex++) Notifications[NotificationIndex].parentNode.removeChild(Notifications[NotificationIndex]);
  1322. }
  1323. }
  1324. }
  1325.  
  1326. function AddSystemNotification() {
  1327. if (CTS.ScriptInit) {
  1328. ChatLogElement.querySelector("#notification-content").insertAdjacentHTML("beforeend", "<div class=\"list-item\"><span class=\"nickname\"style=\"background:#F00\">SYSTEM</span><span class=\"time\"> " + Time() + " </span><br/>" + arguments[0] + "</div>");
  1329. if (CTS.TTS.synth !== undefined && (CTS.TTSList.includes("-ALL") || CTS.TTSList.includes("-EVENT"))) TTS(arguments[0]);
  1330. UpdateScroll(2, false);
  1331. }
  1332. }
  1333. // User Functions
  1334. function AddUser() {
  1335. CTS.UserList.push({
  1336. "handle": arguments[0],
  1337. "username": arguments[5],
  1338. "nick": arguments[4],
  1339. "owner":arguments[7],
  1340. "mod": arguments[1],
  1341. "namecolor": arguments[2],
  1342. "avatar": arguments[3],
  1343. "canGame": arguments[6],
  1344. });
  1345. AddUserNotification(2, arguments[2], arguments[4], arguments[5], false);
  1346. }
  1347.  
  1348. function User() {
  1349. for (var user = 0; user < CTS.UserList.length; user++) {
  1350. if (CTS.UserList[user].handle == arguments[0]) return user;
  1351. }
  1352. return -1;
  1353. }
  1354.  
  1355. function UsernameToHandle() {
  1356. for (var user = 0; user < CTS.UserList.length; user++) {
  1357. if (CTS.UserList[user].username.toUpperCase() == arguments[0] || CTS.UserList[user].nick.toUpperCase() == arguments[0]) return CTS.UserList[user].handle;
  1358. }
  1359. return -1;
  1360. }
  1361.  
  1362. function CheckUserListSafe() {
  1363. var len = CTS.UserList.length;
  1364. for (var user = 0; user < len; user++) {
  1365. if (!CTS.SafeList.includes(CTS.UserList[user].username)) {
  1366. CTS.KBQueue.push(CTS.UserList[user].handle);
  1367. }
  1368. }
  1369. len = CTS.KBQueue.length;
  1370. for (var kb = 0; kb < len; kb++) {
  1371. Send(arguments[0], CTS.KBQueue[kb]);
  1372. }
  1373. CTS.KBQueue = [];
  1374. }
  1375.  
  1376. function CheckUserTempIgnore() {
  1377. if (CTS.TempIgnoreList.includes(CTS.UserList[arguments[0]].username) || CTS.TempIgnoreList.includes(CTS.UserList[arguments[0]].nick.toUpperCase())) return true;
  1378. return false;
  1379. }
  1380.  
  1381. function CheckUserIgnore() {
  1382. if (CTS.IgnoreList.includes(CTS.UserList[arguments[0]].username) || CTS.IgnoreList.includes(CTS.UserList[arguments[0]].nick.toUpperCase())) return true;
  1383. return false;
  1384. }
  1385.  
  1386. function CheckUserAbuse() {
  1387. if (CTS.Me.mod) {
  1388. if ((CTS.KickList.includes(arguments[1]) || CTS.KickList.includes(arguments[2]))) {
  1389. CTS.NoGreet = true;
  1390. Send("kick", arguments[0]);
  1391. }
  1392. if ((CTS.BanList.includes(arguments[1]) || CTS.BanList.includes(arguments[2]))) {
  1393. CTS.NoGreet = true;
  1394. Send("ban", arguments[0]);
  1395. }
  1396. }
  1397. }
  1398.  
  1399. function CheckUserKeywordAbuse() {
  1400. if (arguments[0] != CTS.Me.handle) {
  1401. var len = CTS.KickKeywordList.length;
  1402. for (var i = 0; i < len; i++) {
  1403. if (arguments[1].includes(CTS.KickKeywordList[i])) Send("kick", arguments[0]);
  1404. }
  1405. len = CTS.BanKeywordList.length;
  1406. for (i = 0; i < len; i++) {
  1407. if (arguments[1].includes(CTS.BanKeywordList[i])) Send("ban", arguments[0]);
  1408. }
  1409. }
  1410. }
  1411.  
  1412. function CheckUserStream() {
  1413. var user = User(arguments[0]);
  1414. if (user != -1) AddUserNotification(1, CTS.UserList[user].namecolor, CTS.UserList[user].nick, CTS.UserList[user].username, arguments[1]);
  1415. }
  1416.  
  1417. function CheckUserName() {
  1418. return arguments[0].match(/^(-all|[a-z0-9_]){1,32}$/i);
  1419. }
  1420. // Load/Save Function
  1421. function Load() {
  1422. var val = localStorage.getItem(CTS.Project.Storage + arguments[0]);
  1423. if (null === val && "undefined" != typeof arguments[1]) {
  1424. Save(arguments[0], arguments[1]);
  1425. return arguments[1];
  1426. }
  1427. return val;
  1428. }
  1429.  
  1430. function Save() {
  1431. localStorage.setItem(CTS.Project.Storage + arguments[0], arguments[1]);
  1432. }
  1433. // Socket functions
  1434. function CTSWebSocket() {
  1435. if (window.Proxy === undefined) return;
  1436. var handler = {
  1437. set: function(Target, prop, value) {
  1438. if (prop == "onmessage") {
  1439. var oldMessage = value;
  1440. value = function(event) {
  1441. var parse = JSON.parse(event.data);
  1442. ServerMsg(parse, Target);
  1443. oldMessage(event);
  1444. };
  1445. }
  1446. return (Target[prop] = value);
  1447. },
  1448. get: function(Target, prop) {
  1449. var value = Target[prop];
  1450. if (prop == "send") {
  1451. value = function(event) {
  1452. var parse = JSON.parse(event);
  1453. ClientMsg(parse, Target);
  1454. Target.send(event);
  1455. };
  1456. }
  1457. return value;
  1458. }
  1459. };
  1460. var WebSocketProxy = new window.Proxy(window.WebSocket, {
  1461. construct: function(Target, args) {
  1462. CTS.SocketTarget = new Target(args[0]);
  1463. debug("SOCKET::CONNECTING", args[0]);
  1464. return new window.Proxy(CTS.SocketTarget, handler);
  1465. }
  1466. });
  1467. window.WebSocket = WebSocketProxy;
  1468. }
  1469.  
  1470. function BotCommand() {
  1471. var len = CTS.YouTube.MessageQueueList.length;
  1472. if (len <= 0) {
  1473. // Moderator Control
  1474. if (CTS.UserList[arguments[1]].mod) {
  1475. if (arguments[0] == 2) {
  1476. if (CTS.YouTube.CurrentTrack.ID !== undefined) {
  1477. CTS.YouTube.Clear = true;
  1478. YouTubePlayList();
  1479. }
  1480. }
  1481. if (arguments[0] == 5) SetBot(true);
  1482. }
  1483. // User and Moderator Control
  1484. if ((CTS.UserYT && (CTS.BotOPList.includes(CTS.UserList[arguments[1]].username) || CTS.BotOPList.includes("-ALL"))) || CTS.UserList[arguments[1]].mod) {
  1485. if (arguments[0] == 1) CheckYouTube(arguments[2], true, undefined, CTS.UserList[arguments[1]].mod);
  1486. if (arguments[0] == 4) YouTubePlayList(true);
  1487. if (arguments[0] == 6) {
  1488. if (CTS.UserList[arguments[1]].mod) {
  1489. 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);
  1490. if (videoid !== null) {
  1491. CTS.SocketTarget.send(JSON.stringify({
  1492. "tc": "yut_play",
  1493. "item": {
  1494. "id": videoid[1],
  1495. "duration": 7200,
  1496. "offset": 0,
  1497. "title": "YOUTUBE IS BYPASSED - MODS ONLY"
  1498. }
  1499. }));
  1500. debug("YOUTUBE::LINK BYPASS", videoid[1]);
  1501. }
  1502. } else {
  1503. Send("msg", "Ask a moderator to play your request.");
  1504. }
  1505. }
  1506. if (arguments[0] == 3) {
  1507. if (CTS.YouTube.CurrentTrack.ID !== undefined) {
  1508. Send("yut_stop", [CTS.YouTube.CurrentTrack.ID, CTS.YouTube.CurrentTrack.duration, CTS.YouTube.CurrentTrack.title, CTS.YouTube.CurrentTrack.thumbnail, 0]);
  1509. Send("msg", "🎵" + CTS.YouTube.CurrentTrack.title + " has been skipped!🎵");
  1510. }
  1511. }
  1512. }
  1513. } else {
  1514. if (CTS.YouTube.ListBuilt === false) {
  1515. Send("msg", "🎵 Playlist search is happening, please wait! 🎵\n" + CTS.YouTube.MessageQueueList.length + " tracks found.");
  1516. } else {
  1517. Send("msg", "🎵 Playlist items are being added, please wait! 🎵\n" + CTS.YouTube.MessageQueueList.length + " tracks remaining.");
  1518. }
  1519. }
  1520. }
  1521.  
  1522. function ServerMsg() {
  1523. if (typeof ServerInList[arguments[0].tc] == "function") {
  1524. //debug(("SERVER::" + arguments[0].tc.toUpperCase()), arguments[0]);
  1525. ServerInList[arguments[0].tc](arguments[0]);
  1526. }
  1527. }
  1528.  
  1529. function ClientMsg() {
  1530. if (typeof ServerOutList[arguments[0].tc] == "function") {
  1531. //debug(("CLIENT::" + arguments[0].tc.toUpperCase()), arguments[0]);
  1532. ServerOutList[arguments[0].tc](arguments[0]);
  1533. }
  1534. }
  1535.  
  1536. function Send() {
  1537. ServerSendList[arguments[0]](arguments[0], arguments[1], arguments[2]);
  1538. if (arguments[1] === undefined) arguments[1] = "Open Request";
  1539. //debug(("CLIENT::SEND::" + arguments[0].toUpperCase()), arguments[1]);
  1540. }
  1541. // Game Functions
  1542. // Fishing Boat
  1543. function FishUpgradeStatus(playerExist, type) {
  1544. var msg = "[FISHING BOAT]\nCommand Delay:30s\n";
  1545. if (type != 7) msg += playerExist.Nickname+":\n";
  1546. if (type == 0 || type == 1 ) msg += "[NET]Lv. "+playerExist.Upgrades.Net+"\n"+((playerExist.Upgrades.Net>= 10)?"[MAXED]":"[$"+Fish.pricelist(playerExist,0)+" to UPGRADE]\n\n");
  1547. if (type == 0 || type == 2 ) msg += "[RADAR]Lv. "+playerExist.Upgrades.Radar+"\n"+((playerExist.Upgrades.Radar >= 20)?"[MAXED]":"[$"+Fish.pricelist(playerExist,1)+" to UPGRADE]")+"\n\n";
  1548. if (type == 0 || type == 3 ) msg += "[INSURANCE]\n"+((playerExist.Upgrades.Insurance)?"[OWNED]":"[$"+Fish.pricelist(playerExist,3)+" per ROUND]")+"\n\n";
  1549. if (type == 0 || type == 4 ) msg += "[SHOP]Lv. "+playerExist.Upgrades.Store+"\n"+((playerExist.Upgrades.Store>=6)?"[MAXED]":"[$"+Fish.pricelist(playerExist,2)+" to UPGRADE]")+"\n\n";
  1550. if (type == 6) msg += "HELP:\n!fish\n!fishbank\n!fishsplit user|nick\n!fishrob user|nick\n[$"+Fish.pricelist(playerExist,4)+"]\n!fishslap user|nick\n[$"+Fish.pricelist(playerExist,5)+"]\n!fishupgrade\n!fishupgrade\n[Net|Radar|Insurance|Shop]\n\n";
  1551. Send("msg", msg);
  1552. }
  1553.  
  1554. function FishTimerCheck(playerExist) {
  1555. if (new Date() - playerExist.LastCheck >= 30000) {
  1556. playerExist.LastCheck = new Date();
  1557. return true;
  1558. }
  1559. return false;
  1560. }
  1561.  
  1562. function FishCommandCheck() {
  1563. var command,
  1564. playerExist = Fish.getPlayer(CTS.UserList[arguments[0]].handle, false, true),
  1565. FishCommand = arguments[1].match(/^\!(fish(?:rob|slap|split|help|upgrade)?)\s?(?:([a-z0-9_]*)|net|shop|radar|insurance)?$/i);
  1566.  
  1567. if (FishCommand) {
  1568. if (FishCommand[1]==="fishslap"||FishCommand[1]==="fishrob"||FishCommand[1]==="fishsplit") {
  1569. if (FishCommand[2] !== undefined) {
  1570. if (typeof FishList[FishCommand[1].toLowerCase()] == "function") FishList[FishCommand[1].toLowerCase()](playerExist, FishCommand[2]);
  1571. }
  1572. } else {
  1573. command = ((FishCommand[2] !== undefined)?FishCommand[1]+FishCommand[2]:FishCommand[1]);
  1574. if (typeof FishList[command.toLowerCase()] == "function") FishList[command.toLowerCase()](playerExist, CTS.UserList[arguments[0]]);
  1575. }
  1576. }
  1577. }
  1578.  
  1579. function FishTransfer(playerExist, target, cost, deduct, rob) {
  1580. if (target!==undefined&&target!==-1) {
  1581. if (playerExist.Points > cost) {
  1582. if (rob) {
  1583. playerExist.Points -= cost;
  1584. target.Points -= deduct;
  1585. playerExist.Points += deduct;
  1586. Send("msg", "[FISHING BOAT]\n"+playerExist.Nickname+ " robbed "+ target.Nickname+" for $"+deduct+"!");
  1587. } else {
  1588. playerExist.Points = deduct;
  1589. target.Points += deduct;
  1590. Send("msg", "[FISHING BOAT]\n"+playerExist.Nickname+ " split their money with "+ target.Nickname+"!");
  1591. }
  1592. } else {
  1593. Send("msg", "[FISHING BOAT]\n"+playerExist.Nickname+" are you kidding me?\nTalk to me when you have money!");
  1594. }
  1595. }
  1596. }
  1597.  
  1598. function FishTransaction(playerExist, cost, status) {
  1599. if (playerExist.Points > cost) {
  1600. playerExist.Points -= cost;
  1601. return true;
  1602. } else {
  1603. Send("msg", "[FISHING BOAT]\n"+playerExist.Nickname+", are you kidding me?\nTalk to me when you have money!");
  1604. return false;
  1605. }
  1606. }
  1607. // Server / Client List Functions
  1608. var UnicodeConversionList = {
  1609. convert: function() {
  1610. return this.numerical(arguments[0]).replace(/[A-Za-z]/g, this.alphabet);
  1611. },
  1612. alphabet: function() {
  1613. return String.fromCodePoint(arguments[0].codePointAt(0) + ((/[A-Z]/.test(arguments[0])) ? "𝗔".codePointAt(0) - "A".codePointAt(0) : "𝗮".codePointAt(0) - "a".codePointAt(0)));
  1614. },
  1615. numerical: function() {
  1616. return arguments[0].replace(/\d/g, function(c) {
  1617. return String.fromCodePoint(0x1D79E + c.charCodeAt(0));
  1618. });
  1619. }
  1620. };
  1621. var CommandList = {
  1622. cts: function() {
  1623. Alert(GetActiveChat(), "<b style=\"color:#ee3636;\">Owner Commands:</b>\n!raid <b style=\"color:#ffff00;\">tc link</b>\n!version\n\n<b style=\"color:#ee3636;\">Moderator Commands:</b>\n!whoisbot\n!bot\n!bottoggle\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!banlist\n!banlistclear\n!banadd <b style=\"color:#ffff00;\">user | nick</b>\n!banremove <b style=\"color:#ffff00;\">#</b>\n\n!bankeywordlist\n!bankeywordlistclear\n!bankeywordadd <b style=\"color:#ffff00;\">keyword</b>\n!bankeywordremove <b style=\"color:#ffff00;\">#</b>\n\n!kicklist\n!kicklistclear\n!kickadd <b style=\"color:#ffff00;\">user | nick</b>\n!kickremove <b style=\"color:#ffff00;\">#</b>\n\n!kickkeywordlist\n!kickkeywordlistclear\n!kickkeywordadd <b style=\"color:#ffff00;\">keyword</b>\n!kickkeywordremove <b style=\"color:#ffff00;\">#</b>\n\n!oplist\n!oplistclear\n!opadd <b style=\"color:#ffff00;\">user | nick | -all</b>\n!opremove <b style=\"color:#ffff00;\">#</b>\n!optoggle\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 | nick</b>\n!ignoreremove <b style=\"color:#ffff00;\">#</b>\n\n!greetlist\n!greetlistclear\n!greetadd <b style=\"color:#ffff00;\">user | nick | -all</b>\n!greetremove <b style=\"color:#ffff00;\">#</b>\n\n!ttslist\n!ttslistclear\n!ttsadd <b style=\"color:#ffff00;\">user | nick | -all | -event</b>\n!ttsremove <b style=\"color:#ffff00;\">#</b>\n\n!highlightlist\n!highlightlistclear\n!highlightadd <b style=\"color:#ffff00;\">user | nick</b>\n!highlightremove <b style=\"color:#ffff00;\">#</b>\n\n!reminderlist\n!reminderlistclear\n!reminderadd <b style=\"color:#ffff00;\">user | nick</b>\n!reminderremove <b style=\"color:#ffff00;\">#</b>\n!remindertoggle\n\n!safelist\n!safelistclear\n!safelistadd <b style=\"color:#ffff00;\">user</b>\n!safelistremove <b style=\"color:#ffff00;\">#</b>\n\n!lists\n!listsclear\n\n!greetmode\n!imgurtoggle\n!avatartoggle\n!notificationtoggle\n!popuptoggle\n\n!coin\n!8ball <b style=\"color:#ffff00;\">question</b>\n!roll <b style=\"color:#ffff00;\">#</b>\n!chuck\n\n!clr\n!settings\n!share\n\n<b style=\"color:#ee3636;\">Game Commands:</b>\n!gamehost\n!gameview\n!fish");
  1624. },
  1625. mentionadd: function() {
  1626. if (arguments[0] === "") {
  1627. Alert(GetActiveChat(), "🗷Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  1628. } else {
  1629. if (CheckUserName(arguments[0])) {
  1630. CTS.MentionList.push(arguments[0].toUpperCase());
  1631. Save("MentionList", JSON.stringify(CTS.MentionList));
  1632. Alert(GetActiveChat(), "🗹Command Accepted!");
  1633. } else {
  1634. Alert(GetActiveChat(), "🗷Command Rejected!\nArgument passed didn't match criteria!");
  1635. }
  1636. }
  1637. },
  1638. mentionremove: function() {
  1639. if (arguments[0] === "" || isNaN(arguments[0])) {
  1640. Alert(GetActiveChat(), "🗷Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  1641. } else {
  1642. if (CTS.MentionList[arguments[0]] !== undefined) {
  1643. CTS.MentionList.splice(arguments[0], 1);
  1644. Save("MentionList", JSON.stringify(CTS.MentionList));
  1645. Alert(GetActiveChat(), "🗹Command Accepted!");
  1646. } else {
  1647. Alert(GetActiveChat(), "🗷Command Rejected!\nID was not found!");
  1648. }
  1649. }
  1650. },
  1651. mentionlistclear: function() {
  1652. CTS.MentionList = [];
  1653. Save("MentionList", JSON.stringify(CTS.MentionList));
  1654. Alert(GetActiveChat(), "🗹Command Accepted!");
  1655. },
  1656. mentionlist: function() {
  1657. Alert(GetActiveChat(), SettingsList.MentionList());
  1658. },
  1659. ignoreadd: function() {
  1660. if (arguments[0] === "") {
  1661. Alert(GetActiveChat(), "🗷Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  1662. } else {
  1663. if (CheckUserName(arguments[0])) {
  1664. CTS.IgnoreList.push(arguments[0].toUpperCase());
  1665. Save("IgnoreList", JSON.stringify(CTS.IgnoreList));
  1666. Alert(GetActiveChat(), "🗹Command Accepted!");
  1667. } else {
  1668. Alert(GetActiveChat(), "🗷Command Rejected!\nArgument passed didn't match criteria!");
  1669. }
  1670. }
  1671. },
  1672. ignoreremove: function() {
  1673. if (arguments[0] === "" || isNaN(arguments[0])) {
  1674. Alert(GetActiveChat(), "🗷Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  1675. } else {
  1676. if (CTS.IgnoreList[arguments[0]] !== undefined) {
  1677. CTS.IgnoreList.splice(arguments[0], 1);
  1678. Save("IgnoreList", JSON.stringify(CTS.IgnoreList));
  1679. Alert(GetActiveChat(), "🗹Command Accepted!");
  1680. } else {
  1681. Alert(GetActiveChat(), "🗷Command Rejected!\nID was not found!");
  1682. }
  1683. }
  1684. },
  1685. ignorelistclear: function() {
  1686. CTS.IgnoreList = [];
  1687. Save("IgnoreList", JSON.stringify(CTS.IgnoreList));
  1688. Alert(GetActiveChat(), "🗹Command Accepted!");
  1689. },
  1690. ignorelist: function() {
  1691. Alert(GetActiveChat(), SettingsList.IgnoreList());
  1692. },
  1693. banadd: function() {
  1694. if (arguments[0] === "") {
  1695. Alert(GetActiveChat(), "🗷Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  1696. } else {
  1697. if (CheckUserName(arguments[0])) {
  1698. CTS.BanList.push(arguments[0].toUpperCase());
  1699. Save("BanList", JSON.stringify(CTS.BanList));
  1700. Alert(GetActiveChat(), "🗹Command Accepted!");
  1701. var check = UsernameToHandle(arguments[0].toUpperCase());
  1702. if (check != -1 && CTS.Me.mod) Send("ban", check);
  1703. } else {
  1704. Alert(GetActiveChat(), "🗷Command Rejected!\nArgument passed didn't match criteria!");
  1705. }
  1706. }
  1707. },
  1708. banremove: function() {
  1709. if (arguments[0] === "" || isNaN(arguments[0])) {
  1710. Alert(GetActiveChat(), "🗷Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  1711. } else {
  1712. if (CTS.BanList[arguments[0]] !== undefined) {
  1713. CTS.BanList.splice(arguments[0], 1);
  1714. Save("BanList", JSON.stringify(CTS.BanList));
  1715. Alert(GetActiveChat(), "🗹Command Accepted!");
  1716. } else {
  1717. Alert(GetActiveChat(), "🗷Command Rejected!\nID was not found!");
  1718. }
  1719. }
  1720. },
  1721. banlistclear: function() {
  1722. CTS.BanList = [];
  1723. Save("BanList", JSON.stringify(CTS.BanList));
  1724. Alert(GetActiveChat(), "🗹Command Accepted!");
  1725. },
  1726. banlist: function() {
  1727. Alert(GetActiveChat(), SettingsList.BanList());
  1728. },
  1729. kickadd: function() {
  1730. if (arguments[0] === "") {
  1731. Alert(GetActiveChat(), "🗷Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  1732. } else {
  1733. if (CheckUserName(arguments[0])) {
  1734. CTS.KickList.push(arguments[0].toUpperCase());
  1735. Save("KickList", JSON.stringify(CTS.KickList));
  1736. Alert(GetActiveChat(), "🗹Command Accepted!");
  1737. var check = UsernameToHandle(arguments[0].toUpperCase());
  1738. if (check != -1 && CTS.Me.mod) Send("kick", check);
  1739. } else {
  1740. Alert(GetActiveChat(), "🗷Command Rejected!\nArgument passed didn't match criteria!");
  1741. }
  1742. }
  1743. },
  1744. kickremove: function() {
  1745. if (arguments[0] === "" || isNaN(arguments[0])) {
  1746. Alert(GetActiveChat(), "🗷Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  1747. } else {
  1748. if (CTS.KickList[arguments[0]] !== undefined) {
  1749. CTS.KickList.splice(arguments[0], 1);
  1750. Save("KickList", JSON.stringify(CTS.KickList));
  1751. Alert(GetActiveChat(), "🗹Command Accepted!");
  1752. } else {
  1753. Alert(GetActiveChat(), "🗷Command Rejected!\nID was not found!");
  1754. }
  1755. }
  1756. },
  1757. kicklistclear: function() {
  1758. CTS.KickList = [];
  1759. Save("KickList", JSON.stringify(CTS.KickList));
  1760. Alert(GetActiveChat(), "🗹Command Accepted!");
  1761. },
  1762. kicklist: function() {
  1763. Alert(GetActiveChat(), SettingsList.KickList());
  1764. },
  1765. bankeywordadd: function() {
  1766. if (arguments[0] === "") {
  1767. Alert(GetActiveChat(), "🗷Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  1768. } else {
  1769. CTS.BanKeywordList.push(arguments[0]);
  1770. Save("BanKeywordList", JSON.stringify(CTS.BanKeywordList));
  1771. Alert(GetActiveChat(), "🗹Command Accepted!");
  1772. }
  1773. },
  1774. bankeywordremove: function() {
  1775. if (arguments[0] === "" || isNaN(arguments[0])) {
  1776. Alert(GetActiveChat(), "🗷Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  1777. } else {
  1778. if (CTS.BanKeywordList[arguments[0]] !== undefined) {
  1779. CTS.BanKeywordList.splice(arguments[0], 1);
  1780. Save("BanKeywordList", JSON.stringify(CTS.BanKeywordList));
  1781. Alert(GetActiveChat(), "🗹Command Accepted!");
  1782. } else {
  1783. Alert(GetActiveChat(), "🗷Command Rejected!\nID was not found!");
  1784. }
  1785. }
  1786. },
  1787. bankeywordlistclear: function() {
  1788. CTS.BanKeywordList = [];
  1789. Save("BanKeywordList", JSON.stringify(CTS.BanKeywordList));
  1790. Alert(GetActiveChat(), "🗹Command Accepted!");
  1791. },
  1792. bankeywordlist: function() {
  1793. Alert(GetActiveChat(), SettingsList.BanKeywordList());
  1794. },
  1795. kickkeywordadd: function() {
  1796. if (arguments[0] === "") {
  1797. Alert(GetActiveChat(), "🗷Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  1798. } else {
  1799. CTS.KickKeywordList.push(arguments[0]);
  1800. Save("KickKeywordList", JSON.stringify(CTS.KickKeywordList));
  1801. Alert(GetActiveChat(), "🗹Command Accepted!");
  1802. }
  1803. },
  1804. kickkeywordremove: function() {
  1805. if (arguments[0] === "" || isNaN(arguments[0])) {
  1806. Alert(GetActiveChat(), "🗷Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  1807. } else {
  1808. if (CTS.KickKeywordList[arguments[0]] !== undefined) {
  1809. CTS.KickKeywordList.splice(arguments[0], 1);
  1810. Save("KickKeywordList", JSON.stringify(CTS.KickKeywordList));
  1811. Alert(GetActiveChat(), "🗹Command Accepted!");
  1812. } else {
  1813. Alert(GetActiveChat(), "🗷Command Rejected!\nID was not found!");
  1814. }
  1815. }
  1816. },
  1817. kickkeywordlistclear: function() {
  1818. CTS.KickKeywordList = [];
  1819. Save("KickKeywordList", JSON.stringify(CTS.KickKeywordList));
  1820. Alert(GetActiveChat(), "🗹Command Accepted!");
  1821. },
  1822. kickkeywordlist: function() {
  1823. Alert(GetActiveChat(), SettingsList.KickKeywordList());
  1824. },
  1825. greetadd: function() {
  1826. if (arguments[0] === "") {
  1827. Alert(GetActiveChat(), "🗷Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  1828. } else {
  1829. if (CheckUserName(arguments[0])) {
  1830. CTS.GreetList.push(arguments[0].toUpperCase());
  1831. Save("GreetList", JSON.stringify(CTS.GreetList));
  1832. Alert(GetActiveChat(), "🗹Command Accepted!");
  1833. } else {
  1834. Alert(GetActiveChat(), "🗷Command Rejected!\nArgument passed didn't match criteria!");
  1835. }
  1836. }
  1837. },
  1838. greetremove: function() {
  1839. if (arguments[0] === "" || isNaN(arguments[0])) {
  1840. Alert(GetActiveChat(), "🗷Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  1841. } else {
  1842. if (CTS.GreetList[arguments[0]] !== undefined) {
  1843. CTS.GreetList.splice(arguments[0], 1);
  1844. Save("GreetList", JSON.stringify(CTS.GreetList));
  1845. Alert(GetActiveChat(), "🗹Command Accepted!");
  1846. } else {
  1847. Alert(GetActiveChat(), "🗷Command Rejected!\nID was not found!");
  1848. }
  1849. }
  1850. },
  1851. greetlistclear: function() {
  1852. CTS.GreetList = [];
  1853. Save("GreetList", JSON.stringify(CTS.GreetList));
  1854. Alert(GetActiveChat(), "🗹Command Accepted!");
  1855. },
  1856. greetlist: function() {
  1857. Alert(GetActiveChat(), SettingsList.GreetList());
  1858. },
  1859. highlightadd: function() {
  1860. if (arguments[0] === "") {
  1861. Alert(GetActiveChat(), "🗷Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  1862. } else {
  1863. if (CheckUserName(arguments[0])) {
  1864. CTS.HighlightList.push(arguments[0].toUpperCase());
  1865. Save("HighlightList", JSON.stringify(CTS.HighlightList));
  1866. Alert(GetActiveChat(), "🗹Command Accepted!");
  1867. } else {
  1868. Alert(GetActiveChat(), "🗷Command Rejected!\nArgument passed didn't match criteria!");
  1869. }
  1870. }
  1871. },
  1872. highlightremove: function() {
  1873. if (arguments[0] === "" || isNaN(arguments[0])) {
  1874. Alert(GetActiveChat(), "🗷Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  1875. } else {
  1876. if (CTS.HighlightList[arguments[0]] !== undefined) {
  1877. CTS.HighlightList.splice(arguments[0], 1);
  1878. Save("HighlightList", JSON.stringify(CTS.HighlightList));
  1879. Alert(GetActiveChat(), "🗹Command Accepted!");
  1880. } else {
  1881. Alert(GetActiveChat(), "🗷Command Rejected!\nID was not found!");
  1882. }
  1883. }
  1884. },
  1885. highlightlistclear: function() {
  1886. CTS.HighlightList = [];
  1887. Save("HighlightList", JSON.stringify(CTS.HighlightList));
  1888. Alert(GetActiveChat(), "🗹Command Accepted!");
  1889. },
  1890. highlightlist: function() {
  1891. Alert(GetActiveChat(), SettingsList.HighlightList());
  1892. },
  1893. opadd: function() {
  1894. if (arguments[0] === "") {
  1895. Alert(GetActiveChat(), "🗷Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  1896. } else {
  1897. if (CheckUserName(arguments[0])) {
  1898. CTS.BotOPList.push(arguments[0].toUpperCase());
  1899. Save("BotOPList", JSON.stringify(CTS.BotOPList));
  1900. Alert(GetActiveChat(), "🗹Command Accepted!");
  1901. } else {
  1902. Alert(GetActiveChat(), "🗷Command Rejected!\nArgument passed didn't match criteria!");
  1903. }
  1904. }
  1905. },
  1906. opremove: function() {
  1907. if (arguments[0] === "" || isNaN(arguments[0])) {
  1908. Alert(GetActiveChat(), "🗷Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  1909. } else {
  1910. if (CTS.BotOPList[arguments[0]] !== undefined) {
  1911. CTS.BotOPList.splice(arguments[0], 1);
  1912. Save("BotOPList", JSON.stringify(CTS.BotOPList));
  1913. Alert(GetActiveChat(), "🗹Command Accepted!");
  1914. } else {
  1915. Alert(GetActiveChat(), "🗷Command Rejected!\nID was not found!");
  1916. }
  1917. }
  1918. },
  1919. oplistclear: function() {
  1920. CTS.BotOPList = [];
  1921. Save("BotOPList", JSON.stringify(CTS.BotOPList));
  1922. Alert(GetActiveChat(), "🗹Command Accepted!");
  1923. },
  1924. oplist: function() {
  1925. Alert(GetActiveChat(), SettingsList.BotOPList());
  1926. },
  1927. ttsadd: function() {
  1928. if (arguments[0] === "") {
  1929. Alert(GetActiveChat(), "🗷Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  1930. } else {
  1931. if (arguments[0].match(/^(-all|-event|[a-z0-9_]){1,32}$/i)) {
  1932. CTS.TTSList.push(arguments[0].toUpperCase());
  1933. Save("TTSList", JSON.stringify(CTS.TTSList));
  1934. Alert(GetActiveChat(), "🗹Command Accepted!");
  1935. } else {
  1936. Alert(GetActiveChat(), "🗷Command Rejected!\nArgument passed didn't match criteria!");
  1937. }
  1938. }
  1939. },
  1940. ttsremove: function() {
  1941. if (arguments[0] === "" || isNaN(arguments[0])) {
  1942. Alert(GetActiveChat(), "🗷Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  1943. } else {
  1944. if (CTS.TTSList[arguments[0]] !== undefined) {
  1945. CTS.TTSList.splice(arguments[0], 1);
  1946. Save("TTSList", JSON.stringify(CTS.TTSList));
  1947. Alert(GetActiveChat(), "🗹Command Accepted!");
  1948. } else {
  1949. Alert(GetActiveChat(), "🗷Command Rejected!\nID was not found!");
  1950. }
  1951. }
  1952. },
  1953. ttslistclear: function() {
  1954. CTS.TTSList = [];
  1955. Save("TTSList", JSON.stringify(CTS.TTSList));
  1956. Alert(GetActiveChat(), "🗹Command Accepted!");
  1957. },
  1958. ttslist: function() {
  1959. Alert(GetActiveChat(), SettingsList.TTSList());
  1960. },
  1961. reminderadd: function() {
  1962. if (arguments[0] === "") {
  1963. Alert(GetActiveChat(), "🗷Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  1964. } else {
  1965. var reminder = arguments[0].match(/^((?:1[0-2]|0?[1-9]):(?:[0-5][0-9])\s?(?:[AaPp][Mm]))\s(.*)/);
  1966. if (reminder === null) {
  1967. Alert(GetActiveChat(), "🗷Command Rejected!\n!reminderadd 4:18 PM This is an example you can try!");
  1968. } else {
  1969. CTS.ReminderList.push([reminder[1], reminder[2]]);
  1970. Save("ReminderList", JSON.stringify(CTS.ReminderList));
  1971. Alert(GetActiveChat(), "🗹Command Accepted!");
  1972. Reminder();
  1973. }
  1974. }
  1975. },
  1976. reminderremove: function() {
  1977. if (arguments[0] === "" || isNaN(arguments[0])) {
  1978. Alert(GetActiveChat(), "🗷Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  1979. } else {
  1980. if (CTS.ReminderList[arguments[0]] !== undefined) {
  1981. CTS.ReminderList.splice(arguments[0], 1);
  1982. Save("ReminderList", JSON.stringify(CTS.ReminderList));
  1983. Reminder();
  1984. Alert(GetActiveChat(), "🗹Command Accepted!");
  1985. } else {
  1986. Alert(GetActiveChat(), "🗷Command Rejected!\nID was not found!");
  1987. }
  1988. }
  1989. },
  1990. reminderlistclear: function() {
  1991. CTS.ReminderList = [];
  1992. Save("ReminderList", JSON.stringify(CTS.ReminderList));
  1993. Alert(GetActiveChat(), "🗹Command Accepted!");
  1994. },
  1995. reminderlist: function() {
  1996. Alert(GetActiveChat(), SettingsList.ReminderList());
  1997. },
  1998. remindertoggle: function() {
  1999. CTS.Reminder = !CTS.Reminder;
  2000. Save("Reminder", JSON.stringify(CTS.Reminder));
  2001. Reminder();
  2002. Settings();
  2003. Alert(GetActiveChat(), "🗹Command Accepted!\n" + ((CTS.Reminder) ? "Reminders are now on!\n" : "Reminders are now off!\n "));
  2004. },
  2005. safelistadd: function() {
  2006. if (arguments[0] === "" || arguments[0].toUpperCase() === "guest") { // Can't protect guests;
  2007. Alert(GetActiveChat(), "🗷Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  2008. } else {
  2009. if (CheckUserName(arguments[0])) {
  2010. CTS.SafeList.push(arguments[0].toUpperCase());
  2011. Save("AKB", JSON.stringify(CTS.SafeList));
  2012. Alert(GetActiveChat(), "🗹Command Accepted!\nBE SURE IT'S CORRECT!!!\n!safelist");
  2013. } else {
  2014. Alert(GetActiveChat(), "🗷Command Rejected!\nArgument passed didn't match criteria!");
  2015. }
  2016. }
  2017. },
  2018. safelistremove: function() {
  2019. if (arguments[0] === "" || isNaN(arguments[0])) {
  2020. Alert(GetActiveChat(), "🗷Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help.");
  2021. } else {
  2022. if (CTS.SafeList[arguments[0]] !== undefined) {
  2023. CTS.SafeList.splice(arguments[0], 1);
  2024. Save("AKB", JSON.stringify(CTS.SafeList));
  2025. Alert(GetActiveChat(), "🗹Command Accepted!");
  2026. } else {
  2027. Alert(GetActiveChat(), "🗷Command Rejected!\nID was not found!");
  2028. }
  2029. }
  2030. },
  2031. safelistclear: function() {
  2032. CTS.SafeList = [];
  2033. Save("AKB", JSON.stringify(CTS.SafeList));
  2034. Alert(GetActiveChat(), "🗹Command Accepted!");
  2035. },
  2036. safelist: function() {
  2037. Alert(GetActiveChat(), SettingsList.SafeList());
  2038. },
  2039. optoggle: function() {
  2040. CTS.UserYT = !CTS.UserYT;
  2041. Save("UserYT", JSON.stringify(CTS.UserYT));
  2042. Settings();
  2043. Alert(GetActiveChat(), "🗹Command Accepted!\n" + ((CTS.UserYT) ? "Operators can now use YouTube.\n" : "Operators cannot use YouTube.\n"));
  2044. },
  2045. avatartoggle: function() {
  2046. CTS.Avatar = !CTS.Avatar;
  2047. Save("Avatar", JSON.stringify(CTS.Avatar));
  2048. Settings();
  2049. Alert(GetActiveChat(), "🗹Command Accepted!\n" + ((CTS.Avatar) ? "Avatars from now on will be visible!\n " : "Avatars from now on will hidden!\n"));
  2050. },
  2051. popuptoggle: function() {
  2052. CTS.Popups = !CTS.Popups;
  2053. Save("Popups", JSON.stringify(CTS.Popups));
  2054. Settings();
  2055. Alert(GetActiveChat(), "🗹Command Accepted!\n" + ((CTS.Popups) ? "Popups from now on will be visible!\n " : "Popups from now on will hidden!\n"));
  2056. },
  2057. notificationtoggle: function() {
  2058. CTS.Notification = !CTS.Notification;
  2059. Save("Notification", JSON.stringify(CTS.Notification));
  2060. NotificationDisplay();
  2061. Alert(GetActiveChat(), "🗹Command Accepted!");
  2062. },
  2063. greetmode: function() {
  2064. CTS.GreetMode = !CTS.GreetMode;
  2065. Save("GreetMode", JSON.stringify(CTS.GreetMode));
  2066. Alert(GetActiveChat(), "🗹Command Accepted!\n" + ((CTS.GreetMode) ? "Server like greet is enabled." : "Server like greet is disabled."));
  2067. },
  2068. imgurtoggle: function() {
  2069. CTS.imgur = !CTS.imgur;
  2070. Save("imgur", JSON.stringify(CTS.imgur));
  2071. Alert(GetActiveChat(), "🗹Command Accepted!\n" + ((CTS.imgur) ? "Imgur preview is enabled." : "Imgur preview is disabled."));
  2072. },
  2073. clr: function() {
  2074. CTS.MessageCallback = [];
  2075. CTS.Message = [];
  2076. CTS.Message[0] = [];
  2077. window.TinychatApp.getInstance().defaultChatroom._chatlog.items = [];
  2078. ChatLogElement.querySelector("#cts-chat-content").innerHTML = "";
  2079. },
  2080. autokick: function() {
  2081. if (arguments[1] === false && CTS.Me.mod) {
  2082. CTS.AutoKick = !CTS.AutoKick;
  2083. CTS.AutoBan = false;
  2084. Alert(GetActiveChat(), "🗹Command Accepted!\n" + ((CTS.AutoKick) ? "AUTO KICK IS NOW ON!" : "AUTO KICK IS NOW OFF!"));
  2085. if (CTS.AutoKick === true) CheckUserListSafe("kick");
  2086. }
  2087. },
  2088. autoban: function() {
  2089. if (arguments[1] === false && CTS.Me.mod) {
  2090. CTS.AutoBan = !CTS.AutoBan;
  2091. CTS.AutoKick = false;
  2092. Alert(GetActiveChat(), "🗹Command Accepted!\n" + ((CTS.AutoBan) ? "AUTO BAN IS NOW ON!" : "AUTO BAN IS NOW OFF!"));
  2093. if (CTS.AutoBan === true) CheckUserListSafe("ban");
  2094. }
  2095. },
  2096. bottoggle: function() {
  2097. CTS.Bot = !CTS.Bot;
  2098. Save("Bot", JSON.stringify(CTS.Bot));
  2099. Settings();
  2100. Alert(GetActiveChat(), "🗹Command Accepted!\n" + ((CTS.Bot) ? "You'll now ask !bot bypass on load." : "You'll not !bot bypass on load."));
  2101. },
  2102. bot: function() {
  2103. if (arguments[1] === false && CTS.Me.mod) Alert(0, "🗹Command Accepted!\nBot bypass was called!");
  2104. },
  2105. share: function() {
  2106. var msg = "CosmosisT's TinyChat Script:\nInstall...\n1. (Tamper Monkey Link)\nhttps://www.tampermonkey.net/\n2. (CTS Link)\nhttps://greasyfork.org/en/scripts/392086";
  2107. if (GetActiveChat() !== 0) {
  2108. Send("pvtmsg", msg, GetActiveChat());
  2109. PushPM(GetActiveChat(), msg);
  2110. } else {
  2111. Send("msg", msg);
  2112. }
  2113. },
  2114. gameview: function() {
  2115. CTS.CanSeeGames = !CTS.CanSeeGames;
  2116. Save("CanSeeGames", JSON.stringify(CTS.CanSeeGames));
  2117. Settings();
  2118. Alert(GetActiveChat(), "🗹Command Accepted!\n" + ((CTS.CanSeeGames) ? "GAME VIEW IS NOW ON!" : "GAME VIEW IS NOW OFF!"));
  2119. },
  2120. gamehost: function() {
  2121. CTS.CanHostGames = !CTS.CanHostGames;
  2122. Save("CanHostGames", JSON.stringify(CTS.CanHostGames));
  2123. Fish.reset(true, true);
  2124. Settings();
  2125. Alert(GetActiveChat(), "🗹Command Accepted!\n" + ((CTS.CanHostGames) ? "GAME HOSTING IS NOW ON!" : "GAME HOSTING IS NOW OFF!"));
  2126. },
  2127. version:function(){
  2128. if(!CTS.Me.owner) {
  2129. var msg = "I am using "+CTS.Project.Name+"v"+CTS.Project.Version;
  2130. if (GetActiveChat() !== 0) {
  2131. Send("pvtmsg", msg, GetActiveChat());
  2132. PushPM(GetActiveChat(), msg);
  2133. } else {
  2134. Send("msg", msg);
  2135. }
  2136. }
  2137. },
  2138. chuck:function() {
  2139. if (CTS.Host == 0 || GetActiveChat() !== 0) {
  2140. if (GetActiveChat() !== 0) {
  2141. Chuck("pvtmsg", GetActiveChat());
  2142. } else {
  2143. Chuck("msg");
  2144. }
  2145. }
  2146. },
  2147. dad:function() {
  2148. if (CTS.Host == 0 || GetActiveChat() !== 0) {
  2149. if (GetActiveChat() !== 0) {
  2150. Dad("pvtmsg", GetActiveChat());
  2151. } else {
  2152. Dad("msg");
  2153. }
  2154. }
  2155. },
  2156. "8ball": function() {
  2157. if (CTS.Host == 0 || GetActiveChat() !== 0) {
  2158. if (arguments[0] === "") {
  2159. Alert(GetActiveChat(), "That's not a question!");
  2160. } else {
  2161. var msg = CTS.EightBall[Rand(0, CTS.EightBall.length - 1)];
  2162. if (GetActiveChat() !== 0) {
  2163. Send("pvtmsg", msg, GetActiveChat());
  2164. } else {
  2165. Send("msg", msg);
  2166. }
  2167. }
  2168. }
  2169. },
  2170. roll: function() {
  2171. var dice,
  2172. msg = "";
  2173. dice = (arguments[0] === "" || isNaN(arguments[0])) ? 1 : (arguments[0] < 12) ? arguments[0] : 12;
  2174. for (var i = 0; i < dice; i++) msg += Dice();
  2175. if (GetActiveChat() !== 0) {
  2176. Send("pvtmsg", msg, GetActiveChat());
  2177. PushPM(GetActiveChat(), msg);
  2178. } else {
  2179. Send("msg", msg);
  2180. }
  2181. },
  2182. coin: function() {
  2183. if (CTS.Host == 0 || GetActiveChat() !== 0) {
  2184. var msg = "The coin landed on "+((Rand(0, 1)==1)?"heads":"tails")+"!";
  2185. if (GetActiveChat() !== 0) {
  2186. Send("pvtmsg", msg, GetActiveChat());
  2187. } else {
  2188. Send("msg", msg);
  2189. }
  2190. }
  2191. },
  2192. settings: function() {
  2193. Settings();
  2194. },
  2195. lists: function() {
  2196. Alert(GetActiveChat(), SettingsList.BanList() + SettingsList.BanKeywordList() + SettingsList.KickList() + SettingsList.KickKeywordList() + SettingsList.BotOPList() + SettingsList.MentionList() + SettingsList.IgnoreList() + SettingsList.GreetList() + SettingsList.TTSList() + SettingsList.HighlightList() + SettingsList.ReminderList());
  2197. },
  2198. listsclear: function() {
  2199. CTS.MentionList = [];
  2200. CTS.IgnoreList = [];
  2201. CTS.BanList = [];
  2202. CTS.KickList = [];
  2203. CTS.BanKeywordList = [];
  2204. CTS.KickKeywordList = [];
  2205. CTS.GreetList = [];
  2206. CTS.HighlightList = [];
  2207. CTS.ReminderList = [];
  2208. CTS.TTSList = [];
  2209. CTS.BotOPList = [];
  2210. Save("MentionList", JSON.stringify(CTS.MentionList));
  2211. Save("IgnoreList", JSON.stringify(CTS.IgnoreList));
  2212. Save("BanList", JSON.stringify(CTS.BanList));
  2213. Save("KickList", JSON.stringify(CTS.KickList));
  2214. Save("BanKeywordList", JSON.stringify(CTS.BanKeywordList));
  2215. Save("KickKeywordList", JSON.stringify(CTS.KickKeywordList));
  2216. Save("GreetList", JSON.stringify(CTS.GreetList));
  2217. Save("HighlightList", JSON.stringify(CTS.HighlightList));
  2218. Save("ReminderList", JSON.stringify(CTS.ReminderList));
  2219. Save("TTSList", JSON.stringify(CTS.TTSList));
  2220. Save("BotOPList", JSON.stringify(CTS.BotOPList));
  2221. Alert(GetActiveChat(), "🗹Command Accepted!");
  2222. },
  2223. ytqueue: function() {},
  2224. ytclear: function() {},
  2225. ytskip: function() {},
  2226. yt: function() {},
  2227. ytbypass: function() {}
  2228. };
  2229. var SettingsList = {
  2230. BanList: function() {
  2231. var index,
  2232. msg,
  2233. len = CTS.BanList.length;
  2234. msg = "<b style=\"color:#ee3636;\"><u>Ban list:</u></b>\n" + ((!len) ? "empty\n" : "");
  2235. for (index = 0; index < len; index++) msg += index + " : " + CTS.BanList[index] + "\n";
  2236. return msg;
  2237. },
  2238. BanKeywordList: function() {
  2239. var index,
  2240. msg,
  2241. len = CTS.BanKeywordList.length;
  2242. msg = "<b style=\"color:#ee3636;\"><u>Ban Keyword list:</u></b>\n" + ((!len) ? "empty\n" : "");
  2243. for (index = 0; index < len; index++) msg += index + " : " + HTMLtoTXT(CTS.BanKeywordList[index]) + "\n";
  2244. return msg;
  2245. },
  2246. KickList: function() {
  2247. var index,
  2248. msg,
  2249. len = CTS.KickList.length;
  2250. msg = "<b style=\"color:#ee3636;\"><u>Kick list:</u></b>\n" + ((!len) ? "empty\n" : "");
  2251. for (index = 0; index < len; index++) msg += index + " : " + CTS.KickList[index] + "\n";
  2252. return msg;
  2253. },
  2254. KickKeywordList: function() {
  2255. var index,
  2256. msg,
  2257. len = CTS.KickKeywordList.length;
  2258. msg = "<b style=\"color:#ee3636;\"><u>Kick Keyword list:</u></b>\n" + ((!len) ? "empty\n" : "");
  2259. for (index = 0; index < len; index++) msg += index + " : " + HTMLtoTXT(CTS.KickKeywordList[index]) + "\n";
  2260. return msg;
  2261. },
  2262. BotOPList: function() {
  2263. var index,
  2264. msg,
  2265. len = CTS.BotOPList.length;
  2266. msg = "<b style=\"color:#ee3636;\"><u>Bot OP list:</u></b>\n" + ((!len) ? "empty\n" : "");
  2267. for (index = 0; index < len; index++) msg += index + " : " + CTS.BotOPList[index] + "\n";
  2268. return msg;
  2269. },
  2270. MentionList: function() {
  2271. var index,
  2272. msg,
  2273. len = CTS.MentionList.length;
  2274. msg = "<b style=\"color:#ee3636;\"><u>Mention list:</u></b>\n" + ((!len) ? "empty\n" : "");
  2275. for (index = 0; index < len; index++) msg += index + " : " + HTMLtoTXT(CTS.MentionList[index]) + "\n";
  2276. return msg;
  2277. },
  2278. IgnoreList: function() {
  2279. var index,
  2280. msg,
  2281. len = CTS.IgnoreList.length;
  2282. msg = "<b style=\"color:#ee3636;\"><u>Ignore list:</u></b>\n" + ((!len) ? "empty\n" : "");
  2283. for (index = 0; index < len; index++) msg += index + " : " + CTS.IgnoreList[index] + "\n";
  2284. return msg;
  2285. },
  2286. GreetList: function() {
  2287. var index,
  2288. msg,
  2289. len = CTS.GreetList.length;
  2290. msg = "<b style=\"color:#ee3636;\"><u>Greet list:</u></b>\n" + ((!len) ? "empty\n" : "");
  2291. for (index = 0; index < len; index++) msg += index + " : " + CTS.GreetList[index] + "\n";
  2292. return msg;
  2293. },
  2294. TTSList: function() {
  2295. var index,
  2296. msg,
  2297. len = CTS.TTSList.length;
  2298. msg = "<b style=\"color:#ee3636;\"><u>TTS list:</u></b>\n" + ((!len) ? "empty\n" : "");
  2299. for (index = 0; index < len; index++) msg += index + " : " + CTS.TTSList[index] + "\n";
  2300. return msg;
  2301. },
  2302. HighlightList: function() {
  2303. var index,
  2304. msg,
  2305. len = CTS.HighlightList.length;
  2306. msg = "<b style=\"color:#ee3636;\"><u>Highlight list:</u></b>\n" + ((!len) ? "empty\n" : "");
  2307. for (index = 0; index < len; index++) msg += index + " : " + CTS.HighlightList[index] + "\n";
  2308. return msg;
  2309. },
  2310. ReminderList: function() {
  2311. var index,
  2312. msg,
  2313. len = CTS.ReminderList.length;
  2314. msg = "<b style=\"color:#ee3636;\"><u>Reminder list:</u></b>\n" + ((!len) ? "empty\n" : "");
  2315. for (index = 0; index < len; index++) msg += index + ": [" + CTS.ReminderList[index][0] + "] " + HTMLtoTXT(CTS.ReminderList[index][1]) + "\n";
  2316. return msg;
  2317. },
  2318. SafeList: function() {
  2319. var index,
  2320. msg,
  2321. len = CTS.SafeList.length;
  2322. msg = "<b style=\"color:#ee3636;\"><u>Safe list:</u></b>\n" + ((!len) ? "empty\n" : "");
  2323. for (index = 0; index < len; index++) msg += index + ": " + CTS.SafeList[index] + "\n";
  2324. return msg;
  2325. }
  2326. };
  2327. var MessageQueueList = {
  2328. add: function() {
  2329. CTS.SendQueue.push(arguments[0]);
  2330. MessageQueueList.run();
  2331. },
  2332. run: function() {
  2333. var SendInterval = setInterval(function() {
  2334. if (CTS.SendQueue !== undefined && CTS.SendQueue.length > 0) {
  2335. var temp = new Date();
  2336. var OffsetTime = temp - CTS.LastMessage;
  2337. if (OffsetTime >= 1500) {
  2338. CTS.LastMessage = new Date();
  2339. CTS.SocketTarget.send(CTS.SendQueue[0]);
  2340. CTS.SendQueue.shift();
  2341. }
  2342. } else {
  2343. clearInterval(SendInterval);
  2344. }
  2345. }, 1600, CTS.LastMessage);
  2346. }
  2347. };
  2348. var ServerSendList = {
  2349. msg: function() {
  2350. var obj = {
  2351. "tc": arguments[0]
  2352. };
  2353. if (arguments[2] !== undefined) {
  2354. obj.handle = arguments[1];
  2355. CTS.SocketTarget.send(JSON.stringify(obj));
  2356. } else {
  2357. if (arguments[1] !== undefined) {
  2358. obj.text = arguments[1];
  2359. MessageQueueList.add(JSON.stringify(obj));
  2360. } else {
  2361. CTS.SocketTarget.send(JSON.stringify(obj));
  2362. }
  2363. }
  2364. },
  2365. pvtmsg: function() {
  2366. var obj = {
  2367. "tc": arguments[0],
  2368. "text": arguments[1],
  2369. "handle": Number(arguments[2])
  2370. };
  2371. MessageQueueList.add(JSON.stringify(obj));
  2372. },
  2373. kick: function() {
  2374. ServerSendList.msg(arguments[0], arguments[1], "kick");
  2375. },
  2376. ban: function() {
  2377. ServerSendList.msg(arguments[0], arguments[1], "ban");
  2378. },
  2379. yut_playlist_add: function() {
  2380. var obj = {
  2381. "tc": arguments[0],
  2382. "item": {
  2383. "id": arguments[1][0],
  2384. "duration": arguments[1][1],
  2385. "title": arguments[1][2],
  2386. "image": arguments[1][3]
  2387. }
  2388. };
  2389. if (arguments[1][4] !== undefined) obj.item.offset = arguments[1][4];
  2390. CTS.SocketTarget.send(JSON.stringify(obj));
  2391. },
  2392. yut_playlist_remove: function() {
  2393. ServerSendList.yut_playlist_add(arguments[0], arguments[1]);
  2394. },
  2395. yut_stop: function() {
  2396. ServerSendList.yut_playlist_add(arguments[0], arguments[1]);
  2397. },
  2398. yut_play: function() {
  2399. ServerSendList.yut_playlist_add(arguments[0], arguments[1]);
  2400. },
  2401. yut_playlist: function() {
  2402. ServerSendList.msg("yut_playlist");
  2403. }
  2404. };
  2405. var ServerInList = {
  2406. joined: function() {
  2407. debug();
  2408. CTS.Me = {
  2409. "handle": arguments[0].self.handle,
  2410. "username": (arguments[0].self.username === "") ? "GUEST" : arguments[0].self.username.toUpperCase(),
  2411. "nick": arguments[0].self.nick,
  2412. "owner":arguments[0].self.owner,
  2413. "mod": arguments[0].self.mod,
  2414. "namecolor": NameColor[Rand(0, NameColor.length-1)],
  2415. "avatar": arguments[0].self.avatar
  2416. };
  2417. CTS.Room = {
  2418. "Avatar": arguments[0].room.avatar,
  2419. "Bio": arguments[0].room.biography,
  2420. "Name": arguments[0].room.name,
  2421. "PTT": arguments[0].room.pushtotalk,
  2422. "Website": arguments[0].room.website,
  2423. "YT_ON":arguments[0].room.youtube_enabled
  2424. };
  2425. CTS.SocketConnected = true;
  2426. var modcall = setInterval(function() {
  2427. if (CTS.ScriptInit === true) {
  2428. if (CTS.Me.mod) {
  2429. if (CTS.Bot) CheckHost();
  2430. VideoListElement.querySelector("#videos-footer>#videos-footer-youtube").style.cssText = "display:block;";
  2431. //VideoListElement.querySelector("#videos-footer>#videos-footer-soundcloud").style.cssText = "display:block;";
  2432. }
  2433. clearInterval(modcall);
  2434. }
  2435. }, 200);
  2436. Reminder();
  2437. },
  2438. userlist: function() {
  2439. var len = arguments[0].users.length;
  2440. for (var user = 0; user < len; user++) {
  2441. AISB(arguments[0].users[user]);
  2442. CheckUserAbuse(arguments[0].users[user].handle, (arguments[0].users[user].username === "") ? "GUEST" : arguments[0].users[user].username.toUpperCase(), arguments[0].users[user].nick.toUpperCase());
  2443. CTS.UserList.push({
  2444. "handle": arguments[0].users[user].handle,
  2445. "username": (arguments[0].users[user].username === "") ? "GUEST" : arguments[0].users[user].username.toUpperCase(),
  2446. "nick": arguments[0].users[user].nick,
  2447. "owner":arguments[0].users[user].owner,
  2448. "mod": arguments[0].users[user].mod,
  2449. "namecolor": NameColor[Rand(0, NameColor.length - 1)],
  2450. "avatar": arguments[0].users[user].avatar,
  2451. "canGame": (arguments[0].users[user].username !== "GUEST") ? true : false
  2452. });
  2453. }
  2454. RoomUsers();
  2455. },
  2456. join: function() {
  2457. AISB(arguments[0]);
  2458. var user = (arguments[0].username === "") ? "GUEST" : arguments[0].username.toUpperCase();
  2459. CheckUserAbuse(arguments[0].handle, user, arguments[0].nick.toUpperCase());
  2460. if (CTS.HighlightList.includes(user) || CTS.HighlightList.includes(arguments[0].nick.toUpperCase())) {
  2461. if (CTS.enableSound === true) CTS.Sound.highlight.play();
  2462. }
  2463. if (arguments[0].username === CTS.WC && !CTS.hasGreetedWC) {
  2464. CTS.hasGreetedWC = true;
  2465. CTS.Sound.C.play();
  2466. Send("msg", UnicodeConversionList.convert("HI!" + arguments[0].nick.toUpperCase())+"!");
  2467. } else if (arguments[0].owner === true && !CTS.hasGreetedOwner) {
  2468. CTS.hasGreetedOwner = true;
  2469. Send("msg", UnicodeConversionList.convert((CTS.Welcomes[Rand(0, CTS.Welcomes.length - 1)] + arguments[0].nick.toUpperCase()))+"!");
  2470. } else {
  2471. if ((CTS.GreetList.includes(user) || CTS.GreetList.includes(arguments[0].nick.toUpperCase()) || (CTS.Me.mod && CTS.GreetList.includes("-ALL"))) && CTS.NoGreet === false) {
  2472. Send("msg", UnicodeConversionList.convert(((CTS.Welcomes[Rand(0, CTS.Welcomes.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!") : "!"))));
  2473. if (CTS.enableSound === true) CTS.Sound.highlight.play();
  2474. }
  2475. }
  2476. CTS.NoGreet = false;
  2477. AddUser(arguments[0].handle, arguments[0].mod, NameColor[Rand(0, NameColor.length - 1)], (arguments[0].avatar === "") ? "https://i.imgur.com/4Q4Lgzf.png" : arguments[0].avatar, arguments[0].nick, user, ((user !== "GUEST")?true:false), arguments[0].owner);
  2478. RoomUsers();
  2479. },
  2480. sysmsg: function() {
  2481. AddSystemNotification(HTMLtoTXT(arguments[0].text));
  2482. },
  2483. nick: function() {
  2484. var user = User(arguments[0].handle);
  2485. if (user != -1) {
  2486. AddUserNotification(4, CTS.UserList[user].namecolor, CTS.UserList[user].nick, CTS.UserList[user].username, true, arguments[0].nick);
  2487. CTS.UserList[user].nick = arguments[0].nick;
  2488. if (CTS.Me.handle == arguments[0].handle) CTS.Me.nick = arguments[0].nick;
  2489. }
  2490. },
  2491. stream_connected: function() {
  2492. debug();
  2493. },
  2494. stream_closed: function() {
  2495. debug();
  2496. },
  2497. ping: function() {
  2498. debug();
  2499. if (CTS.ScriptInit) {
  2500. if (CTS.WatchList.length > 0) {
  2501. var verify = new Date() - CTS.WatchList[0][2];
  2502. debug("WATCHLIST::LIST", CTS.WatchList);
  2503. debug("WATCHLIST::VERIFYING", CTS.WatchList[0][0] + " " + verify + "/900000");
  2504. if (verify > 600000) {
  2505. debug("WATCHLIST::VERIFIED", CTS.WatchList[0][0] + " " + verify + "/900000");
  2506. CTS.SafeList.push(CTS.WatchList[0][0]);
  2507. CTS.WatchList.shift();
  2508. }
  2509. }
  2510. }
  2511. },
  2512. quit: function() {
  2513. if (CTS.ScriptInit) {
  2514. if (CTS.WatchList.length > 0) {
  2515. var len = CTS.WatchList.length;
  2516. for (var i = 0; i < len; i++) {
  2517. if (CTS.WatchList[i][1] == arguments[0].handle) {
  2518. CTS.WatchList.splice(i, 1);
  2519. break;
  2520. }
  2521. }
  2522. }
  2523. var user = User(arguments[0].handle);
  2524. if (user != -1) {
  2525. if (CTS.Me.handle === CTS.Host) {
  2526. if(Fish.getPlayer(arguments[0].handle, true, false)){
  2527. Send("msg", CTS.Game.Fish.UserQuitLast + ", has slipped off the boat; I don't think we should look back.");
  2528. }
  2529. }
  2530. //SEND THEM OUT
  2531. AddUserNotification(2, CTS.UserList[user].namecolor, CTS.UserList[user].nick, CTS.UserList[user].username, true);
  2532. CTS.UserList.splice(user, 1);
  2533. }
  2534. RoomUsers();
  2535. if (CTS.Host == arguments[0].handle) {
  2536. CTS.Host = 0;
  2537. if (CTS.Me.mod && CTS.Bot) {
  2538. setTimeout(function(handle) {
  2539. if (CTS.Host == 0) SetBot(false);
  2540. }, (Rand(10, 30) * 1000), arguments[0].handle);
  2541. }
  2542. }
  2543. }
  2544. },
  2545. msg: function() {
  2546. if (CTS.ScriptInit) {
  2547. var user = User(arguments[0].handle);
  2548. if (user != -1) {
  2549. if (!SpamPrevention(arguments[0].text, CTS.UserList[user].mod)) {
  2550. if (GamePrevention(arguments[0].text, CTS.UserList[user].mod)) {
  2551. var text = HTMLtoTXT(arguments[0].text);
  2552. OwnerCommand(user, arguments[0].text);
  2553. BotCheck(user, text, arguments[0]);
  2554. if (CTS.Me.mod) {
  2555. if (CTS.Host == CTS.Me.handle) BotCommandCheck(user,text);
  2556. CheckUserKeywordAbuse(arguments[0].handle, arguments[0].text);
  2557. }
  2558. if (!CheckUserIgnore(user) && !CheckUserTempIgnore(user) && text !== "") {
  2559. //PUSH MESSAGE
  2560. CTS.Message[0].push({
  2561. "time": Time(),
  2562. "namecolor": CTS.UserList[user].namecolor,
  2563. "avatar": CTS.UserList[user].avatar,
  2564. "username": CTS.UserList[user].username,
  2565. "nick": CTS.UserList[user].nick,
  2566. "msg": CheckImgur(text)
  2567. });
  2568. if (GetActiveChat() === 0) {
  2569. var msg = CTS.Message[0][CTS.Message[0].length - 1];
  2570. CreateMessage(msg.time, msg.namecolor, msg.avatar, msg.username, msg.nick, msg.msg, 0);
  2571. }
  2572. if (CTS.Me.handle !== arguments[0].handle) {
  2573. if (CTS.UserList[user].mod && (text.match(/^!autokick$/i) || text.match(/^!autoban$/i))) {
  2574. Alert(GetActiveChat(), "🗹AntiSpam Watch List CLEARED!\nAnother user has initiated autokick/autoban.");
  2575. CTS.AutoKick = false;
  2576. CTS.AutoBan = false;
  2577. }
  2578. if (CTS.enableSound === true) {
  2579. CTS.Sound.MSG.play();
  2580. if (CTS.TTS.synth !== undefined && (CTS.TTSList.includes(CTS.UserList[user].username) || CTS.TTSList.includes(CTS.UserList[user].nick.toUpperCase()) || CTS.TTSList.includes("-ALL"))) TTS(CTS.UserList[user].nick + ((!text.match(/(?:^\!)|(?:https?|www|\uD83C\uDFB5)/gim)) ? " said, " + text : "is box banging!"));
  2581. }
  2582. var len = CTS.MentionList.length;
  2583. for (var i = 0; i < len; i++) {
  2584. if (text.toUpperCase().includes(CTS.MentionList[i])) {
  2585. if (CTS.enableSound === true) {
  2586. CTS.Sound.mention.play();
  2587. }
  2588. AddUserNotification(3, CTS.UserList[user].namecolor, CTS.UserList[user].nick, CTS.UserList[user].username, true);
  2589. }
  2590. }
  2591. }
  2592. MessagePopUp(user, text, true, false);
  2593. }
  2594. }
  2595. } else {
  2596. if (CTS.Me.mod) Send("kick", arguments[0].handle);
  2597. }
  2598. }
  2599. }
  2600. },
  2601. pvtmsg: function() {
  2602. if (CTS.ScriptInit) {
  2603. if (CTS.enablePMs === true) {
  2604. if (arguments[0].handle != CTS.Me.handle) {
  2605. var user = User(arguments[0].handle);
  2606. if (user != -1) {
  2607. if (!SpamPrevention(arguments[0].text, CTS.UserList[user].mod)){
  2608. if (GamePrevention(arguments[0].text, CTS.UserList[user].mod)) {
  2609. var text = arguments[0].text;
  2610. if (CTS.Me.mod) CheckUserKeywordAbuse(arguments[0].handle, arguments[0].text);
  2611. if (!CheckUserIgnore(user) && !CheckUserTempIgnore(user) && text !== "") {
  2612. if (!CTS.Message[arguments[0].handle]) CTS.Message[arguments[0].handle] = [];
  2613. PushPM(arguments[0].handle, text, user);
  2614. if (CTS.enableSound === true) {
  2615. CTS.Sound.PVTMSG.play();
  2616. if (CTS.TTS.synth !== undefined && (CTS.TTSList.includes(CTS.UserList[user].username) || CTS.TTSList.includes(CTS.UserList[user].nick.toUpperCase()) || CTS.TTSList.includes("-ALL"))) TTS(CTS.UserList[user].nick + ((!text.match(/(?:^\!)|(?:https?|www)/gim)) ? " said, " + text : "is box banging!"));
  2617. }
  2618. MessagePopUp(user, CheckImgur(HTMLtoTXT(text)), false, false);
  2619. }
  2620. }
  2621. } else {
  2622. if (CTS.Me.mod) Send("kick", arguments[0].handle);
  2623. }
  2624. }
  2625.  
  2626. }
  2627. }
  2628. }
  2629. },
  2630. yut_playlist_add: function() {
  2631. if (CTS.ScriptInit) {
  2632. if (!CTS.YouTube.Playing) {
  2633. if (CTS.PlayListStart === true) CTS.PlayListStart = false;
  2634. if (CTS.Host != CTS.Me.handle) {
  2635. Send("msg", "!play");
  2636. } else {
  2637. YouTubePlayList();
  2638. }
  2639. }
  2640. }
  2641. },
  2642. yut_playlist: function() {
  2643. if (CTS.ScriptInit) {
  2644. if (CTS.Me.mod && CTS.Me.handle == CTS.Host) {
  2645. if (CTS.YouTube.Clear === true) {
  2646. if (arguments[0].items !== null) YouTubePlayListRemove(arguments[0].items);
  2647. CTS.YouTube.MessageQueueList = [];
  2648. Send("msg", "🎵YouTube cleared!🎵");
  2649. CTS.YouTube.Clear = false;
  2650. } else {
  2651. if (arguments[0].items === null) {
  2652. CTS.PlayListStart = true;
  2653. } else {
  2654. CTS.YouTube.PlayListCount = arguments[0].items.length;
  2655. CTS.PlayListStart = false;
  2656. if (CTS.YouTube.ShowQueue === true) {
  2657. var msg = "🎵" + CTS.YouTube.PlayListCount + " track(s) in queue!🎵";
  2658. for (var i = 0; i < 3; i++) {
  2659. if (arguments[0].items[i] === undefined) break;
  2660. 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]";
  2661. }
  2662. Send("msg", msg);
  2663. }
  2664. }
  2665. 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);
  2666. }
  2667. CTS.YouTube.ShowQueue = false;
  2668. }
  2669. }
  2670. },
  2671. yut_play: function() {
  2672. if (CTS.ScriptInit) {
  2673. if (CTS.YouTube.CurrentTrack.ID != arguments[0].item.id) {
  2674. CTS.YouTube.CurrentTrack.ID = arguments[0].item.id;
  2675. CTS.YouTube.CurrentTrack.duration = arguments[0].item.duration;
  2676. CTS.YouTube.CurrentTrack.title = arguments[0].item.title;
  2677. CTS.YouTube.CurrentTrack.thumbnail = arguments[0].item.image;
  2678. MessagePopUp(-1, CTS.YouTube.CurrentTrack.title + " is now playing!", true, true);
  2679. }
  2680. CTS.YouTube.Playing = true;
  2681. YouTubePlayList();
  2682. }
  2683. },
  2684. yut_stop: function() {
  2685. if (CTS.ScriptInit) {
  2686. CTS.YouTube.CurrentTrack.ID = undefined;
  2687. CTS.YouTube.CurrentTrack.duration = undefined;
  2688. CTS.YouTube.CurrentTrack.title = undefined;
  2689. CTS.YouTube.CurrentTrack.thumbnail = undefined;
  2690. CTS.YouTube.Playing = false;
  2691. YouTubePlayList();
  2692. }
  2693. },
  2694. publish: function() {
  2695. if (CTS.ScriptInit) {
  2696. CheckUserStream(arguments[0].handle, true);
  2697. }
  2698. },
  2699. unpublish: function() {
  2700. if (CTS.ScriptInit) {
  2701. CheckUserStream(arguments[0].handle, false);
  2702. }
  2703. }
  2704. };
  2705. var ServerOutList = {
  2706. pvtmsg: function() {
  2707. if (CTS.ScriptInit) {
  2708. Command(arguments[0].text, true);
  2709. var text = arguments[0].text;
  2710. if (!CTS.Message[arguments[0].handle]) CTS.Message[arguments[0].handle] = [];
  2711. PushPM(arguments[0].handle, text);
  2712. }
  2713. },
  2714. msg: function() {
  2715. if (CTS.ScriptInit) {
  2716. CTS.LastMessage = new Date();
  2717. Command(arguments[0].text, false);
  2718. }
  2719. }
  2720. };
  2721. // Game List Function
  2722. var Fish = {
  2723. //INIT
  2724. init:function() {
  2725. if (CTS.Me.handle == CTS.Host && CTS.CanHostGames === true) {
  2726. 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 thirty second delay for all commands, don't spam!\nFor commands type !fishhelp!");
  2727. CTS.Game.Fish.StartTimeout = setTimeout(function(g){
  2728. g.cast();
  2729. },5000,this);
  2730. }
  2731. },
  2732. //PLAYERS
  2733. addPlayer:function(handle, username, nickname){
  2734. if (!this.getPlayer(handle, false, false) && CTS.CanHostGames === true) {
  2735. if (CTS.SafeList.includes(username)) {
  2736. CTS.Game.Fish.Player.push({
  2737. Handle: handle,
  2738. Username: username,
  2739. Nickname: nickname,
  2740. LastCheck: new Date()-30000,
  2741. Points: 5000,
  2742. Upgrades: {
  2743. Net: 1,
  2744. Store: 1,
  2745. Radar: 1,
  2746. Insurance: false
  2747. },
  2748. });
  2749. Send("msg", "[FISHING BOAT]\n"+nickname.substr(0,16) + "...\n has jumped aboard.\nType !fishhelp for commands if you don't already know!");
  2750. if (this.getPlayer()==0) this.init();
  2751. }
  2752. }
  2753. },
  2754.  
  2755. getPlayer:function(handle, del, exists) {
  2756. var len = CTS.Game.Fish.Player.length;
  2757. if (handle !== undefined) {
  2758. for (var player = 0; player < len; player++) {
  2759. if (CTS.Game.Fish.Player[player].Handle == handle) {
  2760. if (exists) return CTS.Game.Fish.Player[player];
  2761. if (del) {
  2762. CTS.Game.Fish.UserQuitLast = CTS.Game.Fish.Player[player].Nickname;
  2763. CTS.Game.Fish.Player.splice(player, 1);
  2764. }
  2765. if (!exists) return true;
  2766. }
  2767. }
  2768. if (!exists) {
  2769. return false;
  2770. } else {
  2771. return -1;
  2772. }
  2773. } else {
  2774. return len-1;
  2775. }
  2776. },
  2777.  
  2778. listPlayers:function() {
  2779. var len = CTS.Game.Fish.Player.length - 1,
  2780. msg = "[FISHING BOAT]\nTOP 5 PLAYERS:\n",
  2781. place = 0;
  2782. for (var u = len; u >= 0; u--) {
  2783. place++;
  2784. msg += place+":"+CTS.Game.Fish.Player[u].Nickname+"[$"+CTS.Game.Fish.Player[u].Points+"]\n";
  2785. if (u==4) break;
  2786. }
  2787. Send("msg",msg);
  2788. },
  2789.  
  2790. winner:function(){
  2791. CTS.Game.Fish.Player.sort(function (a, b) {
  2792. return a.Points - b.Points;
  2793. });
  2794. if (CTS.Game.Fish.HighScore[1] < CTS.Game.Fish.Player[0].Points) {
  2795. Send("msg", "[FISHING HIGH SCORE]\nNEW HIGH SCORE,\nKeep going "+CTS.Game.Fish.Player[0].Nickname+"!");
  2796. CTS.Game.Fish.HighScore = [CTS.Game.Fish.Player[0].Nickname, CTS.Game.Fish.Player[0].Points];
  2797. Save("FishHighScore", JSON.stringify(CTS.Game.Fish.HighScore));
  2798. }
  2799.  
  2800. 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[0].Nickname + " : $" + CTS.Game.Fish.Player[0].Points + "!\n\nNext round will start in thirty seconds!");
  2801. this.listPlayers();
  2802. CTS.Game.Fish.RestockTimeout = setTimeout(function(g) {
  2803. g.reset(false, true);
  2804. },30000, this);
  2805. },
  2806. //PRICELIST
  2807. pricelist:function(playerExist, item) {
  2808. if (item == 0) {// net
  2809. return (1000 * playerExist.Upgrades.Net * playerExist.Upgrades.Net * playerExist.Upgrades.Net);
  2810. } else if (item == 1) { // radar
  2811. return (10000*playerExist.Upgrades.Radar*2)+3500;
  2812. } else if (item == 2) { // shop
  2813. return (playerExist.Upgrades.Store*playerExist.Upgrades.Store*25000);
  2814. } else if (item == 3) { // insurance
  2815. return (20000);
  2816. } else if (item == 4) { // rob
  2817. return (100000);
  2818. } else if (item == 5) { // slap
  2819. return (10000000);
  2820. } else if (item == 5) { // split (min$)
  2821. return (10000);
  2822. }
  2823. },
  2824. //GAMEPLAY
  2825. cast:function(){
  2826. clearTimeout(CTS.Game.Fish.StartTimeout);
  2827. if (CTS.Host === CTS.Me.handle) {
  2828. if (this.getPlayer()>=0) {
  2829. if (CTS.Game.Fish.Round < 10) {
  2830. CTS.Game.Fish.Round++;
  2831. var playerlen,
  2832. fishlen = CTS.Game.Fish.TypesOfFish.length-1,
  2833. id,
  2834. type,
  2835. handle,
  2836. eliminate = false,
  2837. msgeliminate,
  2838. value,
  2839. msg = "[FISHING BOAT]\n";
  2840. for (var cast = 0; cast <= 1; cast++) {
  2841. playerlen = this.getPlayer();
  2842. id = Rand(0, playerlen);
  2843. type = Rand(CTS.Game.Fish.Player[id].Upgrades.Radar, fishlen);
  2844. if (Rand(0, 100) <= Rand(10, 70)) {
  2845. var net = Rand(1,CTS.Game.Fish.Player[id].Upgrades.Net);
  2846. value = (net*CTS.Game.Fish.TypesOfFish[type][1]*40*CTS.Game.Fish.Player[id].Upgrades.Store);
  2847. if (CTS.Game.Fish.TypesOfFish[type][2] === true) {
  2848. CTS.Game.Fish.Player[id].Points += value;
  2849. 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");
  2850. } else {
  2851. if (!CTS.Game.Fish.Player[id].Upgrades.Insurance) {
  2852. CTS.Game.Fish.Player[id].Points -= value;
  2853. msg += (CTS.Game.Fish.Player[id].Nickname.substr(0,16) + "..."+((CTS.Game.Fish.Player[id].Points<0)?"[broke]":"[$" + CTS.Game.Fish.Player[id].Points + "]")+":\n🗷" + CTS.Game.Fish.TypesOfFish[type][0] + " -$" + value + "\n");
  2854. } else {
  2855. 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");
  2856. }
  2857. }
  2858. } else {
  2859. cast--;
  2860. }
  2861. if(this.getPlayer() == -1) break;
  2862. if (CTS.Game.Fish.Player[id].Points < 0) {
  2863. eliminate = true;
  2864. handle = CTS.Game.Fish.Player[id].Handle;
  2865. msgeliminate = "[FISHING BOAT]\n"+(CTS.Game.Fish.Player[id].Nickname.substr(0,16)+"...\nCan walk the plank for costing me my moneys!");
  2866. CTS.Game.Fish.Player.splice(id, 1);
  2867. break;
  2868. }
  2869. }
  2870. if (msg !== "[FISHING BOAT]\n") Send("msg", msg);
  2871. if (eliminate) {
  2872. eliminate = false;
  2873. Send("msg", msgeliminate);
  2874. }
  2875. CTS.Game.Fish.ReCastTimeout = setTimeout(function(g){g.cast();},Rand(30000, 120000),this);
  2876. } else {
  2877. this.winner();
  2878. }
  2879. } else {
  2880. //RESTART
  2881. CTS.Game.Fish.GameStart = false;
  2882. Fish.stop();
  2883. }
  2884. }
  2885. },
  2886. //STOPPERS
  2887. reset:function(stop, bypass) {
  2888. var get = this.getPlayer();
  2889. if (get !== undefined) {
  2890. if (get>=0 && !CTS.Game.NoReset || bypass !== undefined) {
  2891. CTS.Game.Fish.Round = 0;
  2892. clearTimeout(CTS.Game.Fish.StartTimeout);
  2893. clearTimeout(CTS.Game.Fish.RestockTimeout);
  2894. clearTimeout(CTS.Game.Fish.ReCastTimeout);
  2895. clearTimeout(CTS.Game.Fish.NotEnoughTimeout);
  2896. if (!stop) {
  2897. this.init();
  2898. } else {
  2899. if (CTS.Game.Fish.Player.length>0) Send("msg", "[FISHING BOAT]\nWelp... Boat sank! I'm not refunding anyone!");
  2900. CTS.Game.Fish.Player = [];
  2901. }
  2902. }
  2903. }
  2904. },
  2905.  
  2906. stop:function(){
  2907. CTS.Game.NoReset = false;
  2908. this.reset(true, true);
  2909. }
  2910. };
  2911. var FishList = {
  2912. fish:function(playerExist, user){
  2913. Fish.addPlayer(user.handle, user.username, user.nick);
  2914. },
  2915.  
  2916. fishbank:function(playerExist){
  2917. if (playerExist !== -1 && FishTimerCheck(playerExist)) Send("msg", "[FISHING BOAT]\n"+playerExist.Nickname.substr(0,16) + ", you have $" +playerExist.Points + ".");
  2918. },
  2919.  
  2920. fishrob:function(playerExist, target) {
  2921. if (playerExist !== -1 && FishTimerCheck(playerExist)) {
  2922. var CanEliminate = Fish.getPlayer(UsernameToHandle(target.toUpperCase()), false, true);
  2923. FishTransfer(playerExist, CanEliminate, Fish.pricelist(playerExist, 4), Rand((Math.round(CanEliminate.Points/8)),Math.round((CanEliminate.Points/4))), true);
  2924. }
  2925. },
  2926.  
  2927. fishslap:function(playerExist, target) {
  2928. if (playerExist !== -1 && FishTimerCheck(playerExist)) {
  2929. var CanEliminate = Fish.getPlayer(UsernameToHandle(target.toUpperCase()), false, true);
  2930. FishTransfer(playerExist, CanEliminate, Fish.pricelist(playerExist, 5), Rand((Math.round(CanEliminate.Points/2)),Math.round((CanEliminate.Points))), true);
  2931. }
  2932. },
  2933.  
  2934. fishsplit:function(playerExist, target) {
  2935. if (playerExist !== -1 && FishTimerCheck(playerExist)) {
  2936. var CanEliminate = Fish.getPlayer(UsernameToHandle(target.toUpperCase()), false, true);
  2937. FishTransfer(playerExist, CanEliminate, Fish.pricelist(playerExist, 6), Math.round(playerExist.Points/2), false);
  2938. }
  2939. },
  2940.  
  2941. fishupgrade:function(playerExist){
  2942. if (playerExist !== -1 && FishTimerCheck(playerExist)) FishUpgradeStatus(playerExist, 0);
  2943. },
  2944.  
  2945. fishhelp:function(playerExist){
  2946. if (playerExist !== -1 && FishTimerCheck(playerExist)) FishUpgradeStatus(playerExist, 6);
  2947. },
  2948.  
  2949. fishupgradenet:function(playerExist){
  2950. if (playerExist !== -1 && FishTimerCheck(playerExist)) {
  2951. if (playerExist.Upgrades.Net >= 10) {
  2952. Send("msg", playerExist.Nickname+", you own all upgrades.");
  2953. } else {
  2954. if(FishTransaction(playerExist, Fish.pricelist(playerExist, 0))) {
  2955. playerExist.Upgrades.Net +=1;
  2956. FishUpgradeStatus(playerExist, 1);
  2957. }
  2958. }
  2959. }
  2960. },
  2961.  
  2962. fishupgradeshop:function(playerExist){
  2963. if (playerExist !== -1 && FishTimerCheck(playerExist)) {
  2964. if (playerExist.Upgrades.Store >= 6) {
  2965. Send("msg", playerExist.Nickname+", you own them all already!");
  2966. } else {
  2967. if(FishTransaction(playerExist, Fish.pricelist(playerExist, 2))) {
  2968. playerExist.Upgrades.Store +=1;
  2969. FishUpgradeStatus(playerExist, 4);
  2970. }
  2971. }
  2972. }
  2973. },
  2974.  
  2975. fishupgraderadar:function(playerExist){
  2976. if (playerExist !== -1 && FishTimerCheck(playerExist)) {
  2977. if (playerExist.Upgrades.Radar >= 20) {
  2978. Send("msg", playerExist.Nickname+", you own all upgrades.");
  2979. } else {
  2980. if(FishTransaction(playerExist, Fish.pricelist(playerExist, 1))) {
  2981. playerExist.Upgrades.Radar +=5;
  2982. FishUpgradeStatus(playerExist, 2);
  2983. }
  2984. }
  2985. }
  2986. },
  2987.  
  2988. fishupgradeinsurance:function(playerExist){
  2989. if (playerExist !== -1 && FishTimerCheck(playerExist)) {
  2990. if (playerExist.Upgrades.Insurance === true) {
  2991. Send("msg", playerExist.Nickname+", you already have insurance!");
  2992. } else {
  2993. if(FishTransaction(playerExist, Fish.pricelist(playerExist, 3))) {
  2994. playerExist.Upgrades.Insurance = true;
  2995. FishUpgradeStatus(playerExist, 3);
  2996. }
  2997. }
  2998. }
  2999. }
  3000. };
  3001. // Misc Functions
  3002. function debug() {
  3003. if (CTS.DebugClear === false) {
  3004. if (arguments[0] !== undefined) {
  3005. var msg = "%cCTS::" + arguments[0];
  3006. if (arguments[1]) msg = msg + "\n%c" + JSON.stringify(arguments[1]);
  3007. console.log(msg, "background: #000000; color: #53b6ef;", "color:#53b6ef;");
  3008. }
  3009. } else {
  3010. console.clear();
  3011. console.log(" ( \n ( * ))\ ) \n )\ \` ) /(()/( \n (((_) ( )(_)/(_)) \n )\___(_(_()(_)) \n((/ __|_ _/ __| \n | (__ | | \__ \ /\n \___| |_| |___/ \nCosmosisT's TinyChat Script\nCREATOR: COSMOSIST\nVERSION: " + CTS.Project.Version + "\nCONSOLE DEBUG: FALSE\n\nJoin the discord today!\nhttps://discord.gg/84xqc6r");
  3012. }
  3013. }
  3014.  
  3015. function Remove() {
  3016. return (arguments[1] !== undefined) ? arguments[0].querySelector(arguments[1]).parentNode.removeChild(arguments[0].querySelector(arguments[1])) : arguments[0].parentNode.removeChild(arguments[0]);
  3017. }
  3018. })();