Created
October 23, 2020 18:57
-
-
Save bhgraham/0f41d98954d41a8affa5010c67a82d57 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name CosmosisT's TinyChat Script (CTS V1.3.87) | |
// @version 1.3.87 | |
// @description Modified TinyChat - Best Scripts; prepare to be amazed. | |
// @author CosmosisT | |
// @url https://gist.github.com/CosmosisT | |
// @license Copyright (C) 2019 CosmosisT | |
// This program is free software: you can redistribute it and/or modify | |
// it under the terms of the GNU General Public License as published by | |
// the Free Software Foundation, either version 3 of the License, or | |
// (at your option) any later version. | |
// | |
// This program is distributed in the hope that it will be useful, | |
// but WITHOUT ANY WARRANTY; without even the implied warranty of | |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
// GNU General Public License for more details. | |
// | |
// You should have received a copy of the GNU General Public License | |
// along with this program. If not, see <https://www.gnu.org/licenses/> | |
// @icon https://tinychat.com/webrtc/2.0.0-81/images/favicon.png | |
// @match https://tinychat.com/room/* | |
// @match https://tinychat.com/* | |
// @exclude https://tinychat.com/settings/* | |
// @exclude https://tinychat.com/subscription/* | |
// @exclude https://tinychat.com/promote/* | |
// @exclude https://tinychat.com/coins/* | |
// @exclude https://tinychat.com/gifts | |
// @grant none | |
// @run-at document-start | |
// jshint esversion: 6 | |
// @namespace https://greasyfork.org/users/395685 | |
// ==/UserScript== | |
(function() { | |
"use strict"; | |
let CTS = { | |
DebugClear: true, | |
Version: "1.3.87", | |
ScriptInit: false, | |
MainBackground: "https://i.imgur.com/ibC5gSl.jpg", | |
MainBackgroundColorCounter: 0, | |
FontSize: 20, | |
ChatStyleCounter: 0, | |
MainBackgroundCounter: 0, | |
ChatLimit: 2000, | |
NotificationLimit: 150, | |
ChatHeight: 30, | |
ChatWidth: 0, | |
ChatDisplay: true, | |
UserListDisplay: true, | |
Featured: true, | |
ChatScroll: true, | |
NotificationScroll: true, | |
HostAttempt: 0, | |
Host: 0, | |
ChatStyles: 10, | |
NameColors: 22, | |
Bot: true, | |
Avatar: true, | |
Reminder: true, | |
Notification: true, | |
UserYT: false, | |
AutoMicrophone: false, | |
WaitToOutputMSG: false, | |
YouTube: { | |
XHR: new XMLHttpRequest(), | |
Playing: false, | |
QueueList: [], | |
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 | |
}, | |
}, | |
MentionList: [], | |
IgnoreList: [], | |
BanList: [], | |
KickList: [], | |
BotOPList: [], | |
BanKeywordList: [], | |
KickKeywordList: [], | |
HighlightList: [], | |
GreetList: [], | |
ReminderList: [], | |
ReminderSetList: [], | |
Me: [], | |
Room: "", | |
UserList: [], | |
ChatCSS: [], | |
NotificationTimeOut: [], | |
MessageCallback: [], | |
Message: [], | |
MissedMsg: 0, | |
ActiveMessage: 0, | |
Sound: { | |
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") | |
}, | |
Welcomes: [ | |
"Hey ", | |
"What's crackin ", | |
"Hello ", | |
"Good to see you ", | |
"Howdy ", | |
"Hey there ", | |
"Yo ", | |
"What's up ", | |
"Greetings " | |
] | |
}, | |
MainElement, ChatLogElement, VideoListElement, SideMenuElement, TitleElement, UserListElement, ModerationListElement, ChatListElement, UserContextElement, Microphone; | |
CTS.Message[0] = []; | |
// Load CTS Settings | |
const CTS_STORAGE = ["", "", "CTSDB1.0", ""].join("***"); | |
CTS.ChatStyleCounter = JSON.parse(Load("ChatStyle", 0)); | |
CTS.KickKeywordList = JSON.parse(Load("KickKeywordList", JSON.stringify([]))); | |
CTS.BanKeywordList = JSON.parse(Load("BanKeywordList", JSON.stringify([]))); | |
CTS.MainBackground = Load("MainBackground", "url()"); | |
CTS.HighlightList = JSON.parse(Load("HighlightList", JSON.stringify([]))); | |
CTS.ReminderList = JSON.parse(Load("ReminderList", JSON.stringify([]))); | |
CTS.Notification = JSON.parse(Load("Notification"), JSON.stringify(true)); | |
CTS.MentionList = JSON.parse(Load("MentionList", JSON.stringify([]))); | |
CTS.IgnoreList = JSON.parse(Load("IgnoreList", JSON.stringify([]))); | |
CTS.GreetList = JSON.parse(Load("GreetList", JSON.stringify([]))); | |
CTS.BotOPList = JSON.parse(Load("BotOPList", JSON.stringify([]))); | |
CTS.FontSize = JSON.parse(Load("FontSize", 20)); | |
CTS.KickList = JSON.parse(Load("KickList", JSON.stringify([]))); | |
CTS.Reminder = JSON.parse(Load("Reminder", JSON.stringify(true))); | |
CTS.BanList = JSON.parse(Load("BanList", JSON.stringify([]))); | |
CTS.UserYT = JSON.parse(Load("UserYT", JSON.stringify(true))); | |
CTS.Avatar = JSON.parse(Load("Avatar", JSON.stringify(true))); | |
CTS.Bot = JSON.parse(Load("Bot", JSON.stringify(true))); | |
// ROOM CSS | |
const NameColor = ["#3f69c0", "#b63fc0", "#001f3f", "#0074D9", "#7FDBFF", "#39CCCC", "#3D9970", "#26a635", "#00b34d", "#e6c700", "#FF851B", "#FF4136", "#c81e70", "#f00fbb", "#B10DC9", "#111111", "#AAAAAA", "#cc6600", "#009933", "#003366", "#660033", "#804000"]; | |
const 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"]; | |
const 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", | |
"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", | |
"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", | |
"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", | |
"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", | |
"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", | |
"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", | |
]; | |
const 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%}"; | |
const VideoCSS = "#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{position:absolute;top:28px;right:0px;background-color:#181d1e;min-width:46px;padding:0px;z-index:1;display:none;}.ctsdrop:hover .ctsdrop-content{display:block;}.ctsoptions:hover{background:#53b6ef}.ctsoptions{width:100%;height:28px;line-height:16px;z-index: 2;cursor: pointer;top: 4px;background-color: #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-color: #1f2223!important}#videos-footer-broadcast-wrapper.active>#videos-footer-submenu-button{background-color: #2d373a!important}#videos-footer #videos-footer-youtube{border-radius: 0;}#videos-footer #videos-footer-soundcloud{border-radius: 0;}#videos-footer #videos-footer-youtube,#videos-footer #videos-footer-soundcloud{line-height: 33px;bottom: 21px;visibility: hidden;height: 36px;margin: unset;width: 120px;position: absolute;z-index: 1;left: calc(50% - 35px);}#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 #videos-footer-soundcloud{left: 120px}#videos-footer:hover #videos-footer-youtube,#videos-footer:hover #videos-footer-soundcloud{visibility: visible}#videos-footer{top: calc(30% + 119px);display: none;padding: 0 0 0 20px;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: 0;z-index: 1;padding: unset!important;white-space: pre}#videos-footer-broadcast-wrapper{-webkit-box-shadow: 0 0 20px #53b6ef;-moz-box-shadow: 0 0 20px #53b6ef;box-shadow: 0 0 20px #53b6ef;z-index: 1;visibility: visible;height: 50px;min-height: 50px;width: 400px;padding: unset;right: 0px;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: 0px;left: 0px;right: 0px;top: 0px}:host,#videolist{background:unset;}.video:after{content: unset;}#videos-header-mic>svg{padding: 2px 10px;}#videos-header{-webkit-box-shadow: 0 0 20px #53b6ef;-moz-box-shadow: 0 0 20px #53b6ef;box-shadow: 0 0 20px #53b6ef;background:#181d1e;transition: none;left: unset;right: 0px;width: 400px;top: calc(30%);position: fixed;max-height: 34px;min-height: 34px;}#videos-header>span{line-height: unset;}#videos-header-sound>svg{padding: 4px}#videos-header-fullscreen > svg {padding: 7px 8px;}"; | |
const SideMenuCSS = "#sidemenu-wider{display:none;}#sidemenu-content::-webkit-scrollbar{width:0px;background:transparent;}#sidemenu{-webkit-box-shadow: 0 0 20px #53b6ef;-moz-box-shadow: 0 0 20px #53b6ef;box-shadow: 0 0 20px #53b6ef;text-shadow:-1px 0 black,0 1px black,1px 0 black,0 -1px black;font:300 20px sans-serif;left:unset!important;right:0px!important;padding-bottom:0px;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;}"; | |
const MainCSS = "body{background:" + CTS.MainBackground + " no-repeat center;background-size:cover;overflow:hidden;}#content{width:calc(100% - 400px);padding:0!important;}"; | |
const RoomCSS = "tc-title{display:flex!important;}#room{padding:0px!important;}#room-content{background:unset!important;}"; | |
const 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:0px;position:fixed;background: linear-gradient(0deg,rgb(19, 73, 104)0%,rgba(9, 27, 29, 0.94)50%,rgb(43, 109, 141)100%);-webkit-box-shadow: 0 0 20px #53b6ef;-moz-box-shadow: 0 0 20px #53b6ef;box-shadow: 0 0 20px #53b6ef;}#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:0px!important;}"; | |
const 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-color:#20262870;position:unset;padding:0px;}"; | |
const 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-color: #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;}"; | |
const 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-color: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;}"; | |
const ChatListCSS = ".list-item>span>img{top:6px;}.list-item>span.active>span{transition:none;box-shadow:none;background-color: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-color:#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;}"; | |
const NotificationCSS = ".PMTime{display:inline-block;padding:0 6px 0 0;margin:0px 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 0px 0px;background:linear-gradient(0deg,rgb(24, 29, 30) 0%,rgb(24, 29, 30) 52%,rgb(60, 117, 148) 100%);-webkit-box-shadow: 0 0 20px #53b6ef;-moz-box-shadow: 0 0 20px #53b6ef;box-shadow: 0 0 20px #53b6ef;margin:0px;padding:5px;font-size:16px;}.PMPopup .PMContent {border-radius: 0px 0px 5px 5px;padding:5px;max-height:30%;overflow:hidden;word-break:break-all;background:#202628;-webkit-box-shadow: 0 0 20px #53b6ef;-moz-box-shadow: 0 0 20px #53b6ef;box-shadow: 0 0 20px #53b6ef;}"; | |
const ChatboxCSS = "#input-user:checked ~ #user-menu{display:inline-block;}#user-menu > a:hover{color: #FFFFFF}#user-menu > a {font-weight: 600;position: relative;display: inline-block;width: 100%;padding: 10px 50px 10px 27px;box-sizing: border-box;font-size: 18px;color: #53b6ef;cursor: pointer;transition: .2s;}#user-menu {position: absolute;display: none;width: 178px;top: -304px;right: 0;padding-bottom: 17px;border: 1px solid rgba(0, 0, 0, .06);box-sizing: border-box;border-radius: 3px;color: #FFFFFF;background-color: #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: 20px 27px;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-color: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;-moz-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;}#cts-chat-content{display:flex;flex-direction:column;justify-content:flex-end;min-height:100%}#cts-chat-content>.message{padding:3px 3px;background:#1316177d;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;-moz-box-shadow: 0 0 20px #ffffff;box-shadow: inset 0 0 20px 0px #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}#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;min-height:80px;max-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-color: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;-moz-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-color:#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-color:#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;-webkit-box-shadow: 0 0 20px #53b6ef;-moz-box-shadow: 0 0 20px #53b6ef;box-shadow: 0 0 20px #53b6ef;}#chat-position{top:22px;left:6px;right:6px;bottom:5px;}.on-white-scroll::webkit-scrollbar{width:0;background:transparent;}"; | |
//HomeCSS | |
// CTS ChatStyles | |
for (let i = 0; i <= CTS.ChatStyles; i++) CTS.ChatCSS[i] = []; | |
CTS.ChatCSS[0].push("#notification-content{-webkit-box-shadow:0 0 20px #53b6ef;-moz-box-shadow:0 0 20px #53b6ef;box-shadow:0 0 20px #53b6ef;}#input>textarea{-webkit-box-shadow:0 0 20px #53b6ef;-moz-box-shadow:0 0 20px #53b6ef;box-shadow:0 0 20px #53b6ef;}#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%);}"); | |
CTS.ChatCSS[0].push("#videos-footer-broadcast-wrapper>.waiting{background-color:#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;}"); | |
CTS.ChatCSS[0].push("#sidemenu{background: linear-gradient(0deg,rgb(0, 0, 0)0%,rgba(19,19,19,0.73)8px,rgba(0,0,0,0.34)100%);}"); | |
CTS.ChatCSS[1].push("#notification-content{-webkit-box-shadow:0 0 20px #53b6ef;-moz-box-shadow:0 0 20px #53b6ef;box-shadow:0 0 20px #53b6ef;}#input>textarea{-webkit-box-shadow:0 0 20px #53b6ef;-moz-box-shadow:0 0 20px #53b6ef;box-shadow:0 0 20px #53b6ef;}#chat-wrapper{background:linear-gradient(0deg,rgb(255,255,255)0%,rgba(99,99,99)calc(100% - 62px),rgba(255,255,255)100%);}"); | |
CTS.ChatCSS[1].push("#videos-footer-broadcast-wrapper>.waiting{background-color:#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;}"); | |
CTS.ChatCSS[1].push("#sidemenu{background: linear-gradient(0deg,rgb(0, 0, 0)0%,rgb(25,25,25)8px,rgb(76,76,76)100%);}"); | |
CTS.ChatCSS[2].push("#notification-content{-webkit-box-shadow:0 0 20px #000000;-moz-box-shadow:0 0 20px #000000;box-shadow:0 0 20px #000000;}#input>textarea{-webkit-box-shadow:0 0 20px #000000;-moz-box-shadow:0 0 20px #000000;box-shadow:0 0 20px #000000;}#chat-wrapper{background:linear-gradient(0deg,rgb(121,24,188)0%,rgb(36,15,45)calc(100% - 62px),rgb(121,24,188)100%)}"); | |
CTS.ChatCSS[2].push("#videos-footer-broadcast-wrapper>.waiting{background-color:#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;}"); | |
CTS.ChatCSS[2].push("#sidemenu{background: linear-gradient(0deg,rgb(0, 0, 0)0%,rgb(13,5,15)8px,rgb(121,24,188)100%);}"); | |
CTS.ChatCSS[3].push("#notification-content{-webkit-box-shadow:0 0 20px #000000;-moz-box-shadow:0 0 20px #000000;box-shadow:0 0 20px #000000;}#input>textarea{-webkit-box-shadow:0 0 20px #000000;-moz-box-shadow:0 0 20px #000000;box-shadow:0 0 20px #000000;}#chat-wrapper{background:linear-gradient(0deg,rgb(248,5,5)0%,rgb(81,22,22)calc(100% - 62px),rgba(204,0,0)100%);}"); | |
CTS.ChatCSS[3].push("#videos-footer-broadcast-wrapper>.waiting{background-color:#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;}"); | |
CTS.ChatCSS[3].push("#sidemenu{background: linear-gradient(0deg,rgb(0, 0, 0)0%,rgb(15,5,5)8px,rgb(193,1,1)100%);}"); | |
CTS.ChatCSS[4].push("#notification-content{-webkit-box-shadow:0 0 20px #53b6ef;-moz-box-shadow:0 0 20px #53b6ef;box-shadow:0 0 20px #53b6ef;}#input>textarea{-webkit-box-shadow:0 0 20px #53b6ef;-moz-box-shadow:0 0 20px #53b6ef;box-shadow:0 0 20px #53b6ef;}#chat-wrapper{background:linear-gradient(0deg,rgb(65,144,219)0%,rgb(7,69,97)calc(100% - 62px),rgb(37,179,222)100%);}"); | |
CTS.ChatCSS[4].push("#videos-footer-broadcast-wrapper>.waiting{background-color:#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;}"); | |
CTS.ChatCSS[4].push("#sidemenu{background: linear-gradient(0deg,rgb(0, 0, 0)0%,rgb(5,14,15)8px,rgb(83,182,239)100%);}"); | |
CTS.ChatCSS[5].push("#notification-content{-webkit-box-shadow:0 0 20px #000000;-moz-box-shadow:0 0 20px #000000;box-shadow:0 0 20px #000000;}#input>textarea{-webkit-box-shadow:0 0 20px #000000;-moz-box-shadow:0 0 20px #000000;box-shadow:0 0 20px #000000;}#chat-wrapper{background:linear-gradient(0deg,rgb(225,0,211)0%,rgb(44,15,45)calc(100% - 62px),rgb(208,0,176)100%);}"); | |
CTS.ChatCSS[5].push("#videos-footer-broadcast-wrapper>.waiting{background-color:#bc01a0;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button{background:#bc01a0!important;}#videos-footer-broadcast-wrapper>#videos-footer-submenu-button:hover{background:#5a004d!important;}#videos-footer-push-to-talk{background:#bc01a0}#videos-footer-push-to-talk:hover{background:#5a004d}#videos-footer-broadcast:hover{background:#5a004d}#videos-footer-broadcast{background:#bc01a0;}"); | |
CTS.ChatCSS[5].push("#sidemenu{background: linear-gradient(0deg,rgb(0, 0, 0)0%,rgb(15,5,14)8px,rgb(188,1,160)100%);}"); | |
CTS.ChatCSS[6].push("#notification-content{-webkit-box-shadow:0 0 20px #000000;-moz-box-shadow:0 0 20px #000000;box-shadow:0 0 20px #000000;}#input>textarea{-webkit-box-shadow:0 0 20px #000000;-moz-box-shadow:0 0 20px #000000;box-shadow:0 0 20px #000000;}#chat-wrapper{background:linear-gradient(0deg,rgb(0,158,5)0%,rgb(5,15,5)calc(100% - 62px),rgb(13,181,0)100%);}"); | |
CTS.ChatCSS[6].push("#videos-footer-broadcast-wrapper>.waiting{background-color:#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;}"); | |
CTS.ChatCSS[6].push("#sidemenu{background: linear-gradient(0deg,rgb(0, 0, 0)0%,rgb(5,15,5)8px,rgb(14,104,7)100%);}"); | |
CTS.ChatCSS[7].push("#notification-content{-webkit-box-shadow:0 0 20px #000000;-moz-box-shadow:0 0 20px #000000;box-shadow:0 0 20px #000000;}#input>textarea{-webkit-box-shadow:0 0 20px #000000;-moz-box-shadow:0 0 20px #000000;box-shadow:0 0 20px #000000;}#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%);}"); | |
CTS.ChatCSS[7].push("#videos-footer-broadcast-wrapper>.waiting{background-color:#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;}"); | |
CTS.ChatCSS[7].push("#sidemenu{background: linear-gradient(0deg,rgb(0, 0, 0)0%,rgba(5, 15, 5, 0.72)8px,rgba(0, 0, 0, 0.42)100%);}"); | |
CTS.ChatCSS[8].push("#notification-content{-webkit-box-shadow:0 0 20px #000000;-moz-box-shadow:0 0 20px #000000;box-shadow:0 0 20px #000000;}#input>textarea{-webkit-box-shadow:0 0 20px #000000;-moz-box-shadow:0 0 20px #000000;box-shadow:0 0 20px #000000;}#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%);}"); | |
CTS.ChatCSS[8].push("#videos-footer-broadcast-wrapper>.waiting{background-color:#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;}"); | |
CTS.ChatCSS[8].push("#sidemenu{background: linear-gradient(0deg,rgb(0, 0, 0)0%,rgba(255, 255, 255, 0.72)8px,rgba(255, 255, 255, 0.81)100%);}"); | |
CTS.ChatCSS[9].push("#notification-content{-webkit-box-shadow:0 0 20px #000000;-moz-box-shadow:0 0 20px #000000;box-shadow:0 0 20px #000000;}#input>textarea{-webkit-box-shadow:0 0 20px #000000;-moz-box-shadow:0 0 20px #000000;box-shadow:0 0 20px #000000;}#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%);}"); | |
CTS.ChatCSS[9].push("#videos-footer-broadcast-wrapper>.waiting{background-color:#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;}"); | |
CTS.ChatCSS[9].push("#sidemenu{background: linear-gradient(0deg,rgb(56, 50, 6)0%,rgb(149, 158, 22)8px,rgba(255, 255, 0, 1)100%);}"); | |
CTS.ChatCSS[10].push("#notification-content{-webkit-box-shadow:0 0 20px #000000;-moz-box-shadow:0 0 20px #000000;box-shadow:0 0 20px #000000;}#input>textarea{-webkit-box-shadow:0 0 20px #000000;-moz-box-shadow:0 0 20px #000000;box-shadow:0 0 20px #000000;}#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%);}"); | |
CTS.ChatCSS[10].push("#videos-footer-broadcast-wrapper>.waiting{background-color:#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;}"); | |
CTS.ChatCSS[10].push("#sidemenu{background: linear-gradient(0deg,rgb(154, 51, 1)0%,rgba(255, 125, 0, 1)8px,rgba(255, 125, 0, 1)100%);}"); | |
CTInit(); | |
function CTInit() { | |
// Script Init | |
CTS.ScriptLoading = setInterval(function() { | |
if (document.querySelector("tinychat-webrtc-app")) { // Hook Room | |
if (document.querySelector("tinychat-webrtc-app").shadowRoot) CTSRoomInject(); | |
debug("TINYCHAT::LOAD", "ROOM"); | |
} else if (document.querySelector("#welcome-wrapper")) { // Hook Front-Page | |
CTSHomeInject(); | |
debug("TinyChat::LOAD", "HOME"); | |
} | |
}, 100); | |
// Socket Init | |
if (!document.URL.match(/^https:\/\/tinychat.com\/#/)) { | |
new MutationObserver(function() { | |
this.disconnect(); | |
CTSWebSocket(); | |
}).observe(document, { | |
subtree: true, | |
childList: true | |
}); | |
} | |
// Both Init | |
CTS.FullLoad = setInterval(function() { | |
if (CTS.ScriptInit == true && CTS.SocketConnected == true) { | |
clearInterval(CTS.FullLoad); | |
Settings("<center><u>" + CTS.Room.Name.toUpperCase() + "</u>\n<img src=\"" + CTS.Room.Avatar + "\">\n" + CTS.Room.Bio + "\n<a href=\"" + CTS.Room.Website + "\" target=\"_blank\">" + CTS.Room.Website + "</a>\n\n"); | |
AddUserNotification(2, CTS.Me.namecolor, CTS.Me.nick, CTS.Me.username, false); | |
if (CTS.Room.PTT == true) { | |
VideoListElement.querySelector("#videos-footer-push-to-talk").addEventListener("mouseup", function(e) { | |
if (e.which == 1) CTS.AutoMicrophone = false; | |
if (e.which == 1 && e.ctrlKey == true) CTS.AutoMicrophone = !CTS.AutoMicrophone; | |
if (e.which == 2) CTS.AutoMicrophone = !CTS.AutoMicrophone; | |
}, { | |
passive: true | |
}); | |
} | |
ChatLogElement.querySelector("#input").insertAdjacentHTML("afterbegin", "<div id=\"header-user\"><label id=\"label-user\" for=\"input-user\"><img class=\"switcher\" src=\"" + CTS.Me.avatar + "\"></label><input type=\"checkbox\" id=\"input-user\" hidden=\"\"><div id=\"user-menu\"><span id=\"nickname\">" + CTS.Me.username + "</span><a href=\"https://tinychat.com/#\">Directory</a><a href=\"https://tinychat.com/room/stonercircle\">CTS Room</a><a href=\"https://tinychat.com/room/" + CTS.Me.username + "\">My Room</a><a href=\"https://tinychat.com/settings/gifts\"> My Gifts</a><a href=\"https://tinychat.com/settings/profile\">Profile</a><a href=\"https://tinychat.com/logout\">Sign Out</a></div></div>"); | |
} | |
}, 25); | |
} | |
function CTSHomeInject() { | |
const HomeCSS = "#promoted .tile-header > img {width:100%;}#navigation > label{border-radius:12px;}#welcome>div{padding-top:0px}.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;}#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{height:425px;}#loadmore-no-more {background-color:#181d1e;}#promoted .tile {height:425px;}.tile-content > img{display:none;}#welcome-wrapper{background: #181d1e94;border-bottom:unset;}#loadmore{background-color: #00a2ff;font-weight: 600;}#user-menu{background: #181d1e;}#nav-static-wrapper {-webkit-box-shadow: 0 0 20px 17px #53b6ef;-moz-box-shadow: 0 0 20px 17px #53b6ef;box-shadow: 0 0 20px 17px #53b6ef;background:#181d1e;}#up-button:hover > #up-button-content {background-color: #181d1e59;}#nav-fixed{border-bottom:unset;}#nav-fixed-wrapper{-webkit-box-shadow: 0 0 20px 17px #53b6ef;-moz-box-shadow: 0 0 20px 17px #53b6ef;box-shadow: 0 0 20px 17px #53b6ef;background: #181d1e;}#nav-static {border-bottom:unset;}#footer-content-wrapper {background: #181d1e;}#welcome{padding:12px 30px 24px;}.tile{border-radius: 12px;background-color: #181d1eb3;}html, body, div, span, a, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {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;}"; | |
document.documentElement.className = ""; | |
document.body.querySelector("style").insertAdjacentHTML("beforeend", HomeCSS); | |
document.querySelector("#promoted-wrapper").insertAdjacentHTML("afterend", "<div id=\"promoted-tiles\"> <div id=\"promoted\" data-left=\"0\" data-right=\"2\" style=\"left: 0%;\"> <div> <div class=\"tile\" data-room-name=\"stonercircle\" onclick=\"locationTo('/room/stonercircle');\" onmouseover=\"slideringTile(0, true, 'promoted');\" onmouseout=\"slideringTile(0, false, 'promoted');\"> <div class=\"tile-header\"> <img id=\"tile-header-image-promoted-0\" src=\"https://avatars.tinychat.com/da/838b96/5f/large/phpKXAdEn.jpeg\" data-current=\"0\" onload=\"MasonryTails.Refresh();\"> <div class=\"tile-info\"> <div class=\"tile-name\">stonercircle</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>11</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>14</span></div></div> </div> <div class=\"tile-content\"> <div class=\"tile-content-info \"> <span class=\"tile-content-info-text\"> Welcome to Stoner Circle, a drama free environment. P-T-T System in place. No-Genitals, No-Bullshit, <br>and\/or No-Lurking! This is an 18+ room, thank you! </span> </div> <div class=\"tile-promoted\"> <svg width=\"23\" height=\"19\" viewBox=\"0 0 23 19\" xmlns=\"https://www.w3.org/2000/svg\"> <path d=\"M22.88 1.428c0-.412-.33-.678-.733-.59l-19.83 4.31c-.403.087-.732-.05-.732-.303 0-.255-.208-.463-.463-.463S.66 4.72.66 5.13v7.324c0 .412.207.75.462.75s.463-.21.463-.464c0-.255.33-.392.732-.304l2.24.487c.402.087.73.496.73.908v2.327c0 1.223.467 2.133 2.602 2.133h4.982c2.804 0 2.6-.816 2.6-2.133v-.112c0-.412.33-.678.732-.59l5.943 1.292c.402.087.73-.178.73-.59V1.427h.002zm-9.26 14.26c0 .413-.336.75-.748.75H7.89c-.413 0-.75-.337-.75-.75v-1.455c0-.41.33-.677.73-.59l5.02 1.09c.4.088.73.497.73.91v.046z\" fill=\"#ffa600\" fill-rule=\"evenodd\"></path> </svg> CTS HELP/SUPPORT!</div> <div class=\"tile-gold\"> <span>G</span> </div> </div> </div> </div> </div> </div> </div></div>"); | |
clearInterval(CTS.ScriptLoading); | |
// Injected let's clear script interval | |
CTS.ScriptInit = true; | |
CTSHomePrepare(); | |
} | |
function CTSHomePrepare() { | |
Remove(document, "#footer-social"); | |
Remove(document, ".nav-logo"); | |
} | |
function CTSRoomInject() { | |
if (window.localStorage.tinychat_settings) { | |
const TC_STORAGE = JSON.parse(window.localStorage.tinychat_settings); | |
CTS.enablePMs = TC_STORAGE.enablePMs; | |
CTS.enableSound = TC_STORAGE.enableSound; | |
} else { | |
CTS.enablePMs = true; | |
CTS.enableSound = true; | |
} | |
// Element Definitions | |
MainElement = document.querySelector("tinychat-webrtc-app").shadowRoot; | |
ChatLogElement = MainElement.querySelector("tc-chatlog").shadowRoot; | |
VideoListElement = MainElement.querySelector("tc-videolist").shadowRoot; | |
Microphone = document.createEvent("MouseEvent"); | |
SideMenuElement = MainElement.querySelector("tc-sidemenu").shadowRoot; | |
TitleElement = MainElement.querySelector("tc-title").shadowRoot; | |
UserListElement = SideMenuElement.querySelector("tc-userlist").shadowRoot; | |
ModerationListElement = SideMenuElement.querySelector("tc-video-moderation").shadowRoot; | |
ChatListElement = SideMenuElement.querySelector("tc-chatlist").shadowRoot; | |
UserContextElement = UserListElement.querySelector("tc-user-contextmenu").shadowRoot; | |
// InsertHTML/CSS | |
ChatLogElement.querySelector("style").insertAdjacentHTML("beforeend", ChatboxCSS); | |
ChatLogElement.querySelector("style").insertAdjacentHTML("afterend", "<style id=\"" + CTS.ChatStyleCounter + "\">" + CTS.ChatCSS[CTS.ChatStyleCounter][0] + "</style>"); | |
VideoListElement.querySelector("style").insertAdjacentHTML("afterend", "<style id=\"" + CTS.ChatStyleCounter + "\">" + CTS.ChatCSS[CTS.ChatStyleCounter][1] + "</style>"); | |
SideMenuElement.querySelector("style").insertAdjacentHTML("afterend", "<style id=\"" + CTS.ChatStyleCounter + "\">" + CTS.ChatCSS[CTS.ChatStyleCounter][2] + "</style>"); | |
document.body.querySelector("style").insertAdjacentHTML("beforeend", MainCSS); | |
MainElement.querySelector("style").insertAdjacentHTML("beforeend", RoomCSS); | |
VideoListElement.querySelector("style").insertAdjacentHTML("beforeend", NotificationCSS); | |
VideoListElement.querySelector("style").insertAdjacentHTML("beforeend", VideoCSS); | |
SideMenuElement.querySelector("style").insertAdjacentHTML("beforeend", SideMenuCSS); | |
UserListElement.querySelector("style").insertAdjacentHTML("beforeend", UserListCSS); | |
ChatListElement.querySelector("style").insertAdjacentHTML("beforeend", ChatListCSS); | |
ModerationListElement.querySelector("style").insertAdjacentHTML("beforeend", ModeratorCSS); | |
UserContextElement.querySelector("style").insertAdjacentHTML("beforeend", ContextMenuCSS); | |
TitleElement.querySelector("style").insertAdjacentHTML("beforeend", TitleCSS); | |
VideoListElement.querySelector("#videos-footer").insertAdjacentHTML("afterbegin", "Media"); | |
UserListElement.querySelector("#button-banlist").insertAdjacentHTML("beforebegin", "<span>1</span>"); | |
VideoListElement.querySelector("#videos-header").appendChild(TitleElement.querySelector("span[title=\"Settings\"]")); | |
VideoListElement.querySelector("#videolist").appendChild(VideoListElement.querySelector("#videos-footer-broadcast-wrapper")); | |
VideoListElement.querySelector("#videos-content").insertAdjacentHTML("beforeend", "<div id=\"popup\" class=\"PMOverlay\"></div>"); | |
VideoListElement.querySelector("#videolist").insertAdjacentHTML("afterbegin", "<div class=\"ctsdrop\"><button class=\"ctsoptions\">⚙</button><div class=\"ctsdrop-content\"><button id=\"BackgroundUpdateRight\" class=\"ctsoptions\">+</button><button id=\"BackgroundUpdateColor\" class=\"ctsoptions\">BG</button><button id=\"BackgroundUpdateLeft\" class=\"ctsoptions\">-</button><div style=\"height:6px;background:#624482;\"></div><button id=\"FontSizeUpdate\" class=\"ctsoptions\">aA</button><div style=\"height:6px;background:#624482;\"></div><button id=\"ChatColor\" class=\"ctsoptions\">✎</button><button id=\"FeaturedToggled\" class=\"ctsoptions\">⛶</button><button id=\"ChatWidthToggled\" class=\"ctsoptions\">↹</button><button id=\"ChatHeightToggled\" class=\"ctsoptions\">≡</button></div></div>"); | |
ChatLogElement.querySelector("#chat-position").insertAdjacentHTML("afterbegin", "<div id=\"notification-content\"></div>"); | |
ChatLogElement.querySelector("#chat").insertAdjacentHTML("beforeend", "<div id=\"cts-chat-content\"></div>"); | |
ChatLogElement.querySelector("#chat").insertAdjacentHTML("afterend", "<div class=\"cts-message-unread\" style=\"display:none;\">There are unread messages!</div>"); | |
// Continue | |
clearInterval(CTS.ScriptLoading); | |
CTS.ScriptInit = true; | |
CTSRoomPrepare(); | |
} | |
function CTSRoomPrepare() { | |
// Clear Audio | |
window.TinychatApp.BLL.SoundPlayer.playMessage = function(a) {}; | |
window.TinychatApp.BLL.SoundPlayer.playGift = function(a) {}; | |
// Remove Elements | |
Remove(ChatLogElement, "span[id=\"input-unread\"]"); | |
Remove(ChatLogElement, "#chat-content"); | |
Remove(ChatLogElement, "#chat-wider"); | |
Remove(ChatLogElement, "#chatlog-button"); | |
Remove(SideMenuElement, "#top-buttons-wrapper"); | |
Remove(SideMenuElement, "#user-info"); | |
Remove(SideMenuElement, "#close-users"); | |
Remove(TitleElement, "#room-header-avatar"); | |
Remove(TitleElement, "#room-header-gifts"); | |
Remove(TitleElement, "#room-header-info-text"); | |
Remove(TitleElement, "#room-header-info-details"); | |
Remove(TitleElement, "#room-header-mobile-button"); | |
Remove(TitleElement, "span[title=\"Follow\"]"); | |
Remove(TitleElement, "span[title=\"Share room\"]"); | |
Remove(VideoListElement, "#youtube-overlay"); | |
Remove(VideoListElement, "#videos-header-volume"); | |
Remove(VideoListElement, "#videos-footer-soundcloud"); | |
Remove(document, "#nav-static-wrapper"); | |
Remove(document, "#nav-fixed-wrapper"); | |
Remove(document, "#menu-icon"); | |
Remove(document, "#users-icon"); | |
if (CTS.enablePMs == false) Remove(ChatListElement, "#chatlist"); | |
LoadCTS(); | |
} | |
function LoadCTS() { | |
VideoListElement.querySelector("#ChatHeightToggled").addEventListener("click", function() { | |
if (!CTS.ChatDisplay) { | |
CTS.ChatWidth += 5; | |
CTS.ChatDisplay = true; | |
} | |
CTS.ChatHeight -= 5; | |
CTS.UserListDisplay = true; | |
if (CTS.ChatHeight == 20) { | |
CTS.ChatHeight = 45; | |
CTS.UserListDisplay = false; | |
} | |
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;"); | |
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;"); | |
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;"); | |
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;"); | |
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;"; | |
UserListElement.querySelector("#button-banlist").style.cssText = "top:calc(" + CTS.ChatHeight + "% + 89px);"; | |
document.querySelector("#content").style.cssText = "width:calc(100% " + ((CTS.ChatDisplay) ? "- (400px + " + CTS.ChatWidth + "%)" : "") + ")"; | |
if (CTS.Me.mod) VideoListElement.querySelector("#videos-footer").style.cssText = "display:block;top:" + ((CTS.UserListDisplay) ? "calc(" + CTS.ChatHeight + "% + 119px);" : "36px;") + "right:-70px;display:block;"; | |
UpdateScroll(1, true); | |
Resize(); | |
}, { | |
passive: true | |
}); | |
VideoListElement.querySelector("#ChatWidthToggled").addEventListener("click", function() { | |
CTS.ChatWidth += 5; | |
CTS.ChatDisplay = true; | |
if (CTS.ChatWidth == 25) { | |
CTS.ChatWidth = -5; | |
CTS.ChatDisplay = false; | |
} | |
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;"); | |
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;"); | |
VideoListElement.querySelector("#videos-footer-broadcast-wrapper").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) ? "calc(" + CTS.ChatHeight + "% + 34px);" : "unset;bottom:0;"); | |
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;"); | |
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;"; | |
UserListElement.querySelector("#button-banlist").style.cssText = (!CTS.ChatDisplay) ? "display:none" : "top:calc(" + CTS.ChatHeight + "% + 89px);"; | |
document.querySelector("#content").style.cssText = "width:calc(100% " + ((CTS.ChatDisplay) ? "- (400px + " + CTS.ChatWidth + "%)" : "") + ")"; | |
if (CTS.Me.mod) VideoListElement.querySelector("#videos-footer").style.cssText = "display:block;top:" + ((CTS.UserListDisplay) ? "calc(" + CTS.ChatHeight + "% + 119px);" : "36px;") + "right:-70px;display:block;"; | |
UpdateScroll(1, true); | |
Resize(); | |
}, { | |
passive: true | |
}); | |
VideoListElement.querySelector("#FeaturedToggled").addEventListener("click", function() { | |
CTS.Featured = !CTS.Featured; | |
if (CTS.Featured === true) { | |
Remove(VideoListElement, "#SmallFTYT"); | |
} else { | |
let node = document.createElement("style"); | |
node.appendChild(document.createTextNode(FeaturedCSS)); | |
node.setAttribute("id", "SmallFTYT"); | |
VideoListElement.appendChild(node); | |
} | |
Resize(); | |
}, { | |
passive: true | |
}); | |
VideoListElement.querySelector("#ChatColor").addEventListener("click", function() { | |
CTS.ChatStyleCounter++; | |
Remove(VideoListElement, "style[id=\"" + (CTS.ChatStyleCounter - 1) + "\"]"); | |
Remove(ChatLogElement, "style[id=\"" + (CTS.ChatStyleCounter - 1) + "\"]"); | |
Remove(SideMenuElement, "style[id=\"" + (CTS.ChatStyleCounter - 1) + "\"]"); | |
if (CTS.ChatStyleCounter > CTS.ChatStyles) CTS.ChatStyleCounter = 0; | |
ChatLogElement.querySelector("style").insertAdjacentHTML("afterend", "<style id=\"" + CTS.ChatStyleCounter + "\">" + CTS.ChatCSS[CTS.ChatStyleCounter][0] + "</style>"); | |
VideoListElement.querySelector("style").insertAdjacentHTML("afterend", "<style id=\"" + CTS.ChatStyleCounter + "\">" + CTS.ChatCSS[CTS.ChatStyleCounter][1] + "</style>"); | |
SideMenuElement.querySelector("style").insertAdjacentHTML("afterend", "<style id=\"" + CTS.ChatStyleCounter + "\">" + CTS.ChatCSS[CTS.ChatStyleCounter][2] + "</style>"); | |
Save("ChatStyle", CTS.ChatStyleCounter); | |
}, { | |
passive: true | |
}); | |
ChatLogElement.querySelector(".cts-message-unread").addEventListener("click", function() { | |
UpdateScroll(1, true); | |
CheckUnreadMessage(); | |
}, { | |
passive: true | |
}); | |
ChatLogElement.querySelector("#chat").addEventListener("scroll", function(event) { | |
let element = event.target; | |
if (Math.floor(element.scrollTop + 25) >= (element.scrollHeight - element.offsetHeight)) CheckUnreadMessage(); | |
}, { | |
passive: true | |
}); | |
ChatLogElement.querySelector("#notification-content").addEventListener("scroll", function(event) { | |
let element = event.target; | |
if (Math.floor(element.scrollTop + 25) >= (element.scrollHeight - element.offsetHeight)) CTS.NotficationScroll = true; | |
}, { | |
passive: true | |
}); | |
VideoListElement.querySelector("button[id=\"BackgroundUpdateLeft\"]").addEventListener("click", function() { | |
CTS.MainBackgroundCounter++; | |
if (CTS.MainBackgroundCounter === Images.length) CTS.MainBackgroundCounter = 0; | |
document.body.style.background = "#000000 url(" + Images[CTS.MainBackgroundCounter] + ") no-repeat center"; | |
document.body.style.backgroundSize = "cover"; | |
Save("MainBackground", "url(" + Images[CTS.MainBackgroundCounter] + ")"); | |
}, { | |
passive: true | |
}); | |
VideoListElement.querySelector("button[id=\"BackgroundUpdateColor\"]").addEventListener("click", function() { | |
CTS.MainBackgroundColorCounter++; | |
if (CTS.MainBackgroundColorCounter === Colors.length) CTS.MainBackgroundColorCounter = 0; | |
document.body.style.background = Colors[CTS.MainBackgroundColorCounter]; | |
Save("MainBackground", Colors[CTS.MainBackgroundColorCounter]); | |
}, { | |
passive: true | |
}); | |
VideoListElement.querySelector("button[id=\"BackgroundUpdateRight\"]").addEventListener("click", function() { | |
CTS.MainBackgroundCounter--; | |
if (CTS.MainBackgroundCounter === -1) CTS.MainBackgroundCounter = Images.length - 1; | |
document.body.style.background = "#000000 url(" + Images[CTS.MainBackgroundCounter] + ") no-repeat center"; | |
document.body.style.backgroundSize = "cover"; | |
Save("MainBackground", "url(" + Images[CTS.MainBackgroundCounter] + ")"); | |
}, { | |
passive: true | |
}); | |
VideoListElement.querySelector("button[id=\"FontSizeUpdate\"]").addEventListener("click", function() { | |
CTS.FontSize += 5; | |
if (CTS.FontSize >= 50) CTS.FontSize = 20; | |
Save("FontSize", CTS.FontSize); | |
ChatLogElement.querySelector("#textarea").style.fontSize = (CTS.FontSize - 4) + "px"; | |
}, { | |
passive: true | |
}); | |
new MutationObserver(function() { | |
LoadMessage(); | |
}).observe(ChatLogElement.querySelector("#chat-instant"), { | |
attributes: true, | |
attributeFilter: ["class"], | |
childList: false, | |
characterData: false | |
}); | |
new MutationObserver(function() { | |
Cameras(); | |
}).observe(VideoListElement.querySelector(".videos-items:first-child"), { | |
childList: true | |
}); | |
new MutationObserver(function() { | |
Cameras(); | |
}).observe(VideoListElement.querySelector(".videos-items:last-child"), { | |
childList: true | |
}); | |
new MutationObserver(function() { | |
if (CTS.AutoMicrophone) { | |
OpenMicrophone(); | |
} | |
}).observe(VideoListElement.querySelector("#videos-footer-broadcast-wrapper"), { | |
attributes: true, | |
attributeFilter: ["class"] | |
}); | |
NotificationDisplay(); | |
Cameras(); | |
} | |
// YouTube Functions | |
function CheckHost(state, handle, text) { | |
if (state) { | |
CTS.HostAttempt = 0; | |
if (CTS.Host == 0) { | |
Send("msg", "!whoisbot"); | |
CTS.HostWaiting = true; | |
} | |
} else { | |
if (text.match(/^!bot$/)) { | |
CTS.HostWaiting = false; | |
CTS.Host = handle; | |
} else { | |
CTS.HostAttempt++; | |
if (CTS.HostWaiting == true) { | |
if (CTS.HostAttempt == 1) { | |
setTimeout(function() { | |
if (CTS.HostWaiting == true && CTS.Host == 0) SetBot(); | |
}, 3000); | |
} | |
if (CTS.HostAttempt == 5) SetBot(); | |
} | |
} | |
} | |
} | |
function SetBot() { | |
Send("msg", "!bot"); | |
CTS.HostWaiting = false; | |
Command("!bot", false); | |
} | |
function CheckYouTube(link, type, token, isMod) { | |
if (isMod == undefined) isMod = true; | |
CTS.YouTube.XHR.type = type; | |
let videoid = link.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); | |
if (videoid != null) { | |
videoid = videoid[1].replace(/v\=/g, ""); | |
if (videoid.match(/list\=/i)) { | |
if (isMod) { | |
videoid = videoid.replace(/list\=/, ""); | |
debug("YOUTUBE::PLAYLIST LINK GATHERER", videoid); | |
CTS.YouTube.XHR.open("GET", "https://www.googleapis.com/youtube/v3/playlistItems?playlistId=" + videoid + "&part=snippet&maxResults=50" + ((token != undefined) ? "&pageToken=" + token : "") + "&type=video&eventType=completed&key=AIzaSyCPQe4gGZuyVQ78zdqf9O5iEyfVLPaRwZg"); | |
CTS.YouTube.XHR.playlistid = videoid; | |
CTS.YouTube.XHR.send(); | |
} | |
} else { | |
CTS.YouTube.XHR.videoid = videoid; | |
CTS.YouTube.VideoReturn = true; | |
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"); | |
CTS.YouTube.XHR.send(); | |
debug("YOUTUBE::LINK SEARCH", CTS.YouTube.XHR.videoid); | |
} | |
} else { | |
if (CTS.YouTube.QueueList.length <= 0) { | |
link = link.replace(/^(!yt )/, ""); | |
CTS.YouTube.SearchReturn = true; | |
CTS.YouTube.XHR.open("GET", "https://www.googleapis.com/youtube/v3/search?key=AIzaSyCPQe4gGZuyVQ78zdqf9O5iEyfVLPaRwZg&maxResults=1&q=" + encodeURI(link) + "&type=video&part=snippet"); | |
CTS.YouTube.XHR.send(); | |
debug("YOUTUBE::KEYWORD SEARCH", link); | |
} | |
} | |
} | |
function YouTubePlayList(queue) { | |
CTS.YouTube.ShowQueue = (queue != undefined) ? true : false; | |
if ((!CTS.YouTube.Playing && CTS.Host == CTS.Me.handle) || CTS.YouTube.Clear == true || CTS.YouTube.ShowQueue == true) Send("yut_playlist"); | |
} | |
function YouTubeTrackAdd() { | |
if (CTS.YouTube.QueueList[0] != undefined) { | |
if (CTS.YouTube.Busy == false) { | |
if (CTS.YouTube.QueueList.length > 0) { | |
debug("YOUTUBE::ID", CTS.YouTube.QueueList[0].snippet.resourceId.videoId); | |
CTS.YouTube.XHR.open("GET", "https://www.googleapis.com/youtube/v3/videos?id=" + CTS.YouTube.QueueList[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"); | |
CTS.YouTube.XHR.videoid = CTS.YouTube.QueueList[0].snippet.resourceId.videoId; | |
CTS.YouTube.XHR.send(); | |
CTS.YouTube.QueueList.shift(); | |
} | |
} | |
} | |
} | |
function YouTubePlayListItems(list) { | |
let len = list.length; | |
for (let i = 0; i < len; i++) { | |
if (CTS.YouTube.NotPlayable.includes(list[i].snippet.title) == false) { | |
CTS.YouTube.QueueList.push(list[i]); | |
} | |
} | |
} | |
function YouTubePlayListRemove(list) { | |
let len = list.length; | |
for (let i = 0; i < len; i++) { | |
setTimeout(Send("yut_playlist_remove", [list[i].id, list[i].duration, list[i].title, list[i].image]), (i * 5), list); | |
} | |
} | |
function YouTubeTimeConvert(time) { | |
var a = time.match(/\d+/g); | |
if (time.indexOf("M") >= 0 && time.indexOf("H") == -1 && time.indexOf("S") == -1) a = [0, a[0], 0]; | |
if (time.indexOf("H") >= 0 && time.indexOf("M") == -1) a = [a[0], 0, a[1]]; | |
if (time.indexOf("H") >= 0 && time.indexOf("M") == -1 && time.indexOf("S") == -1) a = [a[0], 0, 0]; | |
let len = a.length; | |
time = 0; | |
if (len == 3) { | |
time = time + parseInt(a[0]) * 3600; | |
time = time + parseInt(a[1]) * 60; | |
time = time + parseInt(a[2]); | |
} | |
if (len == 2) { | |
time = time + parseInt(a[0]) * 60; | |
time = time + parseInt(a[1]); | |
} | |
if (len == 1) time = time + parseInt(a[0]); | |
return time; | |
} | |
CTS.YouTube.XHR.onload = function() { | |
let response = JSON.parse(CTS.YouTube.XHR.responseText); | |
if (response.error) { | |
Send("msg", "⛔Track could not be added!⛔"); | |
}// else { | |
/* if (response.kind == "youtube#playlistItemListResponse" && response.nextPageToken == undefined && response.items.length == 0) { | |
CTS.YouTube.ListBuilt = true; | |
Send("msg", "🎵Found " + CTS.YouTube.QueueList.length + " tracks!\nThis may take a few moments to add, requests can be made shortly.🎵"); | |
CTS.YouTube.DataReady = true; | |
CTS.YouTube.Busy = false; | |
YouTubeTrackAdd(); | |
} | |
CTS.YouTube.DataReady = false; | |
if (response.items[0]) { | |
CTS.YouTube.Busy = true; | |
if (response.items[0].id) { | |
if (response.kind == "youtube#playlistItemListResponse") { | |
YouTubePlayListItems(response.items); | |
} else { | |
CTS.YouTube.VideoID = response.items[0].id.videoId; | |
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"); | |
CTS.YouTube.XHR.send(); | |
} | |
} else if (response.items[0].contentDetails.duration) { | |
CTS.YouTube.DataReady = true; | |
} | |
if (CTS.YouTube.DataReady == false) { | |
CTS.YouTube.Busy = false; | |
if (response.kind == "youtube#searchListResponse") CTS.YouTube.XHR.videoid = response.items[0].id.videoId; | |
if (response.kind == "youtube#playlistItemListResponse") { | |
if (response.nextPageToken != undefined) { | |
CTS.YouTube.ListBuilt = false; | |
CheckYouTube("https://www.youtube.com/playlist?list=" + CTS.YouTube.XHR.playlistid, false, response.nextPageToken); | |
CTS.YouTube.Busy = true; | |
} else { | |
CTS.YouTube.ListBuilt = true; | |
Send("msg", "🎵Adding " + CTS.YouTube.QueueList.length + " track(s) to queue!🎵\nEnjoy!"); | |
CTS.YouTube.Busy = false; | |
} | |
} | |
} else { | |
CTS.YouTube.VideoID = (CTS.YouTube.XHR.videoid) ? CTS.YouTube.XHR.videoid : CTS.YouTube.QueueList[0].snippet.resourceId.videoId; | |
if (CTS.YouTube.Playing == true) { | |
MessagePopUp(-1, "Added " + ((response.items[0] == undefined) ? response.items.snippet.title : response.items[0].snippet.title), true, true); | |
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]); | |
CTS.YouTube.Busy = false; | |
} else { | |
if (response.items[0].snippet.title != undefined) { // Video doesn't exist... | |
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]); | |
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]); | |
CTS.YouTube.Playing = true; | |
} | |
CTS.YouTube.Busy = false; | |
} | |
} | |
} | |
if (CTS.YouTube.SearchReturn == true || (CTS.YouTube.SearchReturn == false && CTS.YouTube.VideoReturn == true && CTS.YouTube.XHR.type == true)) { | |
let title = ""; | |
CTS.YouTube.SearchReturn = false; | |
CTS.YouTube.VideoReturn = false; | |
if (response.items[0] != undefined) { | |
if (response.items[0].length > 0) title = response.items[0].snippet.title; | |
} | |
if (response.items != undefined) { | |
if (response.items.length > 0) title = response.items[0].snippet.title; | |
} | |
if (title == "") { | |
Send("msg", "⛔Track could not be added!⛔"); | |
} else { | |
Send("msg", "🎵Added " + title + " to queue!🎵"); | |
} | |
} | |
if (CTS.YouTube.QueueList.length > 0) YouTubeTrackAdd(); | |
} */ | |
}; | |
// Message Functions | |
function CreateMessage(time, namecolor, avatar, username, nickname, msg, selectedchat) { | |
CheckUnreadMessage(); | |
if (selectedchat == GetActiveChat()) { | |
ChatLogElement.querySelector("#cts-chat-content").insertAdjacentHTML("beforeend", "<div class=\"message" + ((CTS.Avatar) ? " common " : " ") + ((CTS.HighlightList.includes(username.toUpperCase()) || CTS.HighlightList.includes(nickname.toUpperCase())) ? "highlight" : "") + "\" " + ((avatar == "") ? "style=\"padding-left:3px;\"" : "") + ">" + ((CTS.Avatar) ? "<a href=\"#\" class=\"avatar\"><div><img src=\"" + avatar + "\"></div></a>" : "") + "<div class=\"nickname\" style=\"-webkit-box-shadow: 0 0 6px " + namecolor + ";-moz-box-shadow: 0 0 6px " + namecolor + ";box-shadow: 0 0 6px " + namecolor + ";background:" + namecolor + ";\">" + nickname + "<div class=\"ctstime\"> " + time + " </div></div><div class=\"content\"><cts-message-html><span id=\"html\" class=\"message common\"style=\"font-size:" + CTS.FontSize + "px;\">" + msg + "</span></CTS-message-html></div></div>"); | |
} | |
let Chat = ChatLogElement.querySelectorAll("#cts-chat-content>.message"); | |
let len = Chat.length; | |
if (len > CTS.ChatLimit + 50) { | |
CTS.ChatScroll = true; | |
len = Chat.length - CTS.ChatLimit; | |
let ChatIndex = 0; | |
for (ChatIndex; ChatIndex < len; ChatIndex++) { | |
Chat[ChatIndex].parentNode.removeChild(Chat[ChatIndex]); | |
CTS.Message[selectedchat].shift(); | |
} | |
} | |
UpdateScroll(1, false); | |
} | |
function LoadMessage(reload) { | |
let ChatIndex, index, bypass, Chat = ChatLogElement.querySelector("#cts-chat-content"); | |
CTS.ChatScroll = true; | |
if (!CTS.MessageCallback[CTS.ActiveMessage]) CTS.MessageCallback[CTS.ActiveMessage] = []; | |
CTS.MessageCallback[CTS.ActiveMessage].html = Chat.innerHTML; | |
if (reload) bypass = true; | |
CTS.MessageCallback[CTS.ActiveMessage].len = (Chat.innerHTML == "") ? 0 : CTS.Message[CTS.ActiveMessage].length; | |
Chat.innerHTML = ""; | |
CheckUnreadMessage(); | |
CTS.ActiveMessage = GetActiveChat(); | |
if (CTS.Message[CTS.ActiveMessage]) { | |
index = (CTS.MessageCallback[CTS.ActiveMessage]) ? CTS.MessageCallback[CTS.ActiveMessage].len : 0; | |
index = (bypass) ? 0 : index; | |
if (index > 0) Chat.innerHTML = CTS.MessageCallback[CTS.ActiveMessage].html; | |
let l = (bypass) ? CTS.Message[CTS.ActiveMessage].length : CTS.Message[CTS.ActiveMessage].length; | |
for (ChatIndex = index; ChatIndex < l; ChatIndex++) ChatLogElement.querySelector("#cts-chat-content").insertAdjacentHTML("beforeend", "<div class=\"message" + ((CTS.Avatar) ? " common " : " ") + ((CTS.HighlightList.includes(CTS.Message[CTS.ActiveMessage][ChatIndex].username.toUpperCase())) ? "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 + ";-moz-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>"); | |
} else { | |
CTS.Message[CTS.ActiveMessage] = []; | |
} | |
UpdateScroll(1, false); | |
} | |
function CheckUnreadMessage() { | |
if (Math.floor(ChatLogElement.querySelector("#chat").scrollTop + 25) >= (ChatLogElement.querySelector("#chat").scrollHeight - ChatLogElement.querySelector("#chat").offsetHeight)) { | |
CTS.MissedMsg = 0; | |
CTS.ChatScroll = true; | |
ChatLogElement.querySelector(".cts-message-unread").style.display = "none"; | |
} else { | |
CTS.MissedMsg++; | |
CTS.ChatScroll = false; | |
if (ChatLogElement.querySelector(".cts-message-unread").style.display == "none") ChatLogElement.querySelector(".cts-message-unread").style.display = "block"; | |
ChatLogElement.querySelector(".cts-message-unread").innerHTML = "There are " + CTS.MissedMsg + " unread message(s)!"; | |
} | |
} | |
function GetActiveChat() { | |
let elem = ChatListElement.querySelector(".active"); | |
if (elem) return elem.getAttribute("data-chat-id"); | |
return 0; | |
} | |
function RoomUsers() { | |
if (CTS.ScriptInit) UserListElement.querySelector("#header>span>span").innerText = " : " + CTS.UserList.length; | |
} | |
function SpamPrevention(msg) { | |
let LineBreaks = (msg.match(/\n|\r/g) || []).length; | |
if (LineBreaks >= 10) return true; | |
} | |
function UpdateScroll(box, force) { | |
if (box == 1 && (CTS.ChatScroll || force)) ChatLogElement.querySelector("#chat").scrollTop = ChatLogElement.querySelector("#chat").scrollHeight; | |
if (box == 2 && (CTS.NotificationScroll || force)) ChatLogElement.querySelector("#notification-content").scrollTop = ChatLogElement.querySelector("#notification-content").scrollHeight; | |
} | |
function Sanitize(str) { | |
var p = document.createElement("p"); | |
p.appendChild(document.createTextNode(str)); | |
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>"); | |
} | |
function Time() { | |
return (new Date().toLocaleString("en-US", { | |
hour: "numeric", | |
minute: "numeric", | |
second: "numeric", | |
hour12: true | |
})); | |
} | |
// Features | |
function MessagePopUp(user, msg, selectedchat, youtube) { | |
let push = false; | |
if (user != -1) { | |
if (ChatListElement.querySelector(".list-item .active")) { | |
if (ChatListElement.querySelector(".active").innerHTML.includes(CTS.UserList[user].nick) && !ChatListElement.querySelector(".active").innerHTML.includes("(offline)")) { | |
if (selectedchat) push = true; | |
} else { | |
push = true; | |
} | |
} else if (!selectedchat) { | |
push = true; | |
} | |
} | |
if (youtube) push = true; | |
if (push) { | |
if (VideoListElement.querySelector(".PMOverlay .PMPopup:nth-child(5)")) { | |
Remove(VideoListElement, ".PMOverlay .PMPopup:first-child"); | |
clearTimeout(CTS.NotificationTimeOut[0]); | |
CTS.NotificationTimeOut.shift(); | |
} | |
VideoListElement.querySelector(".PMOverlay").insertAdjacentHTML("beforeend", "<div class=\"PMPopup\"><h2><div class=\"PMTime\">" + Time() + "</div><div class=\"PMName\">" + ((youtube) ? "YouTube Bot" : (CTS.UserList[user].nick + " in " + ((selectedchat) ? "Main" : "PM"))) + "</div></h2><div class=\"PMContent\"style=\"font-size:" + CTS.FontSize + "px\">" + msg + "</div></div>"); | |
CTS.NotificationTimeOut.push(setTimeout(function() { | |
if (VideoListElement.querySelector(".PMOverlay .PMPopup")) { | |
Remove(VideoListElement, ".PMOverlay .PMPopup:first-child"); | |
CTS.NotificationTimeOut.shift(); | |
} | |
}, 11100)); | |
} | |
} | |
function Reminder() { | |
console.log(CTS.ReminderList); | |
let temp, | |
i, | |
len = CTS.ReminderSetList.length; | |
for (i = 0; i < len; i++) clearTimeout(CTS.ReminderSetList[i]); | |
CTS.ReminderSetList = []; | |
if (CTS.Reminder == true) { | |
len = CTS.ReminderList.length; | |
for (i = 0; i < len; i++) { | |
temp = TimeToDate(CTS.ReminderList[i][0]); | |
CTS.RecentTime = new Date(); | |
if (temp < CTS.RecentTime) temp.setDate(temp.getDate() + 1); | |
let OffsetTime = temp - CTS.RecentTime; | |
CTS.ReminderSetList.push(setTimeout(AddReminder, OffsetTime, arguments[0], CTS.ReminderList[i][1], i)); | |
} | |
} | |
} | |
function AddReminder() { | |
Send("msg", "🕬 " + arguments[1]); | |
setTimeout(Reminder, 5000, arguments[0]); | |
} | |
function NotificationDisplay() { | |
ChatLogElement.querySelector("#notification-content").style.cssText = "display:" + ((CTS.Notification) ? "block" : "none") + ";"; | |
} | |
// Redo this, modify SVG+CSS; | |
function Dice() { | |
return String.fromCharCode("0x268" + RandomNumber(0, 5)); | |
} | |
function RandomNumber(min, max) { | |
min = Math.ceil(min); | |
max = Math.floor(max); | |
return Math.floor(Math.random() * (max - min + 1)) + min; | |
} | |
function OpenMicrophone() { | |
Microphone.initMouseEvent("mousedown"); | |
VideoListElement.querySelector("#videos-footer-push-to-talk").dispatchEvent(Microphone); | |
} | |
function Cameras() { | |
let Camera = VideoListElement.querySelectorAll(".videos-items:first-child>.js-video"); | |
for (let featured = 1; featured < Camera.length; featured++) { | |
if (!Camera[featured].querySelector("tc-video-item").shadowRoot.querySelector("#fixed")) { | |
Camera[featured].querySelector("tc-video-item").shadowRoot.querySelector(".video").insertAdjacentHTML("afterbegin", "<style id=\"fixed\">.video{padding:0px;}.video>div>.overlay{box-shadow:unset!important;}.video:after{content:unset;}</style>"); | |
} | |
} | |
Camera = VideoListElement.querySelectorAll(".videos-items:last-child>.js-video"); | |
for (let normal = 0; normal < Camera.length; normal++) { | |
if (!Camera[normal].querySelector("tc-video-item").shadowRoot.querySelector(".video #fixed")) { | |
Camera[normal].querySelector("tc-video-item").shadowRoot.querySelector(".video").insertAdjacentHTML("afterbegin", "<style id=\"fixed\">.video.large{position: absolute;left:calc(50% - 30%);top: 0px;z-index: 2;width: 60%;}.video{padding:0px;}.video>div>.overlay{box-shadow:unset!important;}.video:after{content:unset;}</style>"); | |
} | |
} | |
Resize(); | |
} | |
function Resize() { | |
window.dispatchEvent(new Event("resize")); | |
} | |
function Command(cmd, mainonly) { | |
let UserCommand = cmd.match(/^!([a-zA-Z0-9]*)(?:\s?)(.*)/); | |
if (UserCommand) { | |
if (typeof CommandList[UserCommand[1]] == "function") { | |
debug("COMMAND", UserCommand[1]); | |
CommandList[UserCommand[1]](UserCommand[2], mainonly); | |
} | |
} | |
} | |
// Alert Functions | |
function Settings(msg) { | |
Alert(GetActiveChat(), ((msg != undefined) ? msg : "") + "CTS BOT CONFIGURATION:\nBot Mode: " + ((CTS.Bot) ? "AUTO" : "OFF") + "\nOperator Mode: " + ((CTS.UserYT) ? "ON" : "OFF") + "\nReminder Mode: " + ((CTS.Reminder) ? "ON" : "OFF") + "\n\nAvatar Display: " + ((CTS.Avatar) ? "SHOW" : "HIDE") + "\nNotification Display: " + ((CTS.Notification) ? "SHOW" : "HIDE") + "\nFont Size: " + CTS.FontSize + "PX\n\nFOR LIST OF COMMANDS:\n!cts</center>"); | |
} | |
function Alert(activechat, msg) { | |
CTS.Message[activechat].push({ | |
"time": Time(), | |
"namecolor": "#3f69c0", | |
"avatar": "https://i.imgur.com/S09irS7.png", | |
"username": "", | |
"nick": ("CTS Version: " + CTS.Version), | |
"msg": msg | |
}); | |
let len = CTS.Message[activechat].length - 1; | |
msg = CTS.Message[activechat][len]; | |
CreateMessage(msg.time, msg.namecolor, msg.avatar, msg.username, msg.nick, msg.msg, activechat); | |
} | |
function AddUserNotification(type, namecolor, nickname, username, state, newnickname) { | |
if (CTS.ScriptInit) { | |
let chat = ChatLogElement.querySelector("#notification-content"), | |
Notification; | |
CTS.NotificationScroll = (Math.floor(chat.scrollTop) + 5 >= (chat.scrollHeight - chat.offsetHeight)) ? true : false; | |
if (type == 1) { | |
Notification = username + ((state) ? " is " : " has stopped ") + "broadcasting!"; | |
} else if (type == 2) { | |
Notification = username + " has " + ((!state) ? "joined!" : "left"); | |
} else if (type == 3) { | |
ChatLogElement.querySelector("#notification-content").insertAdjacentHTML("beforeend", "<div class=\"list-item\"><div class=\"notification\"><span style=\"background:" + namecolor + "\" class=\"nickname\">" + nickname + "</span><span class=\"time\"> " + Time() + " </span><br/> has mentioned you.</div></div>"); | |
UpdateScroll(2, true); | |
} else if (type == 4) { | |
Notification = "with the account name " + username + " changed their name to " + newnickname; | |
} | |
if (type == 1 || type == 2 || type == 4) ChatLogElement.querySelector("#notification-content").insertAdjacentHTML("beforeend", "<div class=\"list-item\"><div class=\"notification\"><span class=\"nickname\" style=\"background:" + namecolor + ";\">" + nickname + "</span><span class=\"time\"> " + Time() + " </span><br/>" + Notification + "</div></div>"); | |
UpdateScroll(2, false); | |
let Notifications = ChatLogElement.querySelectorAll(".notification"); | |
if (Notifications.length > CTS.NotificationLimit + 10) { | |
for (let NotificationIndex = 0; NotificationIndex < Notifications.length - CTS.NotificationLimit; NotificationIndex++) Notifications[NotificationIndex].parentNode.removeChild(Notifications[NotificationIndex]); | |
} | |
} | |
} | |
function AddSystemNotification(msg) { | |
if (CTS.ScriptInit) { | |
ChatLogElement.querySelector("#notification-content").insertAdjacentHTML("beforeend", "<div class=\"list-item\"><span class=\"nickname\"style=\"background:#F00\">SYSTEM</span><span class=\"time\"> " + Time() + " </span><br/>" + msg + "</div>"); | |
UpdateScroll(2, false); | |
} | |
} | |
// User Functions | |
function AddUser(handle, mod, namecolor, avatar, nickname, username) { | |
CTS.UserList.push({ | |
"handle": handle, | |
"mod": mod, | |
"namecolor": namecolor, | |
"avatar": avatar, | |
"nick": nickname, | |
"username": username | |
}); | |
AddUserNotification(2, namecolor, nickname, username, false); | |
} | |
function User(handle) { | |
for (let user = 0; user < CTS.UserList.length; user++) { | |
if (CTS.UserList[user].handle == handle) return user; | |
} | |
return -1; | |
} | |
function UsernameToHandle(username) { | |
for (let user = 0; user < CTS.UserList.length; user++) { | |
if (CTS.UserList[user].username.toUpperCase() == username || CTS.UserList[user].nick.toUpperCase() == username) return CTS.UserList[user].handle; | |
} | |
return -1; | |
} | |
function CheckUserIgnore(user) { | |
if (CTS.IgnoreList.includes(CTS.UserList[user].username.toUpperCase()) || CTS.IgnoreList.includes(CTS.UserList[user].nick.toUpperCase())) return true; | |
return false; | |
} | |
function CheckUserAbuse(handle, username, nickname) { | |
if (CTS.Me.mod) { | |
if ((CTS.KickList.includes(username) || CTS.KickList.includes(nickname))) Send("kick", handle); | |
if ((CTS.BanList.includes(username) || CTS.BanList.includes(nickname))) Send("ban", handle); | |
} | |
} | |
function CheckUserKeywordAbuse(handle, msg) { | |
if (handle != CTS.Me.handle) { | |
let len = CTS.KickKeywordList.length; | |
for (let i = 0; i < len; i++) { | |
if (msg.includes(CTS.KickKeywordList[i])) Send("kick", handle); | |
} | |
len = CTS.BanKeywordList.length; | |
for (let i = 0; i < len; i++) { | |
if (msg.includes(CTS.BanKeywordList[i])) Send("ban", handle); | |
} | |
} | |
} | |
function CheckUserStream(handle, published) { | |
let user = User(handle); | |
if (user != -1) { | |
AddUserNotification(1, CTS.UserList[user].namecolor, CTS.UserList[user].nick, CTS.UserList[user].username, published); | |
} | |
} | |
function UserRegex(text) { | |
return text.match(/^(-all|[a-z0-9_]){1,32}$/i); | |
} | |
// Load/Save Function | |
function Load(aKey, aDefault) { | |
let val = localStorage.getItem(CTS_STORAGE + aKey); | |
if (null === val && "undefined" != typeof aDefault) return aDefault; | |
return val; | |
} | |
function Save(aKey, aVal) { | |
localStorage.setItem(CTS_STORAGE + aKey, aVal); | |
} | |
// Socket functions | |
function CTSWebSocket() { | |
if (window.Proxy === undefined) return; | |
let handler = { | |
set: function(target, prop, value) { | |
if (prop == "onmessage") { | |
let oldMessage = value; | |
value = function(event) { | |
let parse = JSON.parse(event.data); | |
ServerMsg(parse, target); | |
oldMessage(event); | |
}; | |
} | |
return (target[prop] = value); | |
}, | |
get: function(target, prop) { | |
let value = target[prop]; | |
if (prop == "send") { | |
value = function(event) { | |
let parse = JSON.parse(event); | |
ClientMsg(parse, target); | |
target.send(event); | |
}; | |
} | |
return value; | |
} | |
}; | |
let WebSocketProxy = new Proxy(window.WebSocket, { | |
construct: function(target, args) { | |
CTS.SocketTarget = new target(args[0]); | |
debug("SOCKET::CONNECTED", args[0]); | |
return new Proxy(CTS.SocketTarget, handler); | |
} | |
}); | |
window.WebSocket = WebSocketProxy; | |
} | |
function BotOperator() { | |
let len = CTS.YouTube.QueueList.length; | |
if (len <= 0) { | |
// Moderator Control | |
if (CTS.UserList[arguments[1]].mod) { | |
if (arguments[0] == 2) { | |
if (CTS.YouTube.CurrentTrack.ID != undefined) { | |
CTS.YouTube.Clear = true; | |
YouTubePlayList(); | |
} | |
} | |
} | |
// User and Moderator Control | |
if ((CTS.UserYT && (CTS.BotOPList.includes(CTS.UserList[arguments[1]].username.toUpperCase()) || CTS.BotOPList.includes("-ALL"))) || CTS.UserList[arguments[1]].mod) { | |
if (arguments[0] == 1) CheckYouTube(arguments[2], true, undefined, CTS.UserList[arguments[1]].mod); | |
if (arguments[0] == 4) YouTubePlayList(true); | |
if (arguments[0] == 3) { | |
if (CTS.YouTube.CurrentTrack.ID != undefined) { | |
Send("yut_stop", [CTS.YouTube.CurrentTrack.ID, CTS.YouTube.CurrentTrack.duration, CTS.YouTube.CurrentTrack.title, CTS.YouTube.CurrentTrack.thumbnail, 0]); | |
Send("msg", "🎵" + CTS.YouTube.CurrentTrack.title + " has been skipped!🎵"); | |
} | |
} | |
} | |
} else { | |
if (CTS.YouTube.ListBuilt == false) { | |
Send("msg", "🎵 Playlist search is happening, please wait! 🎵\n" + CTS.YouTube.QueueList.length + " tracks found."); | |
} else { | |
Send("msg", "🎵 Playlist items are being added, please wait! 🎵\n" + CTS.YouTube.QueueList.length + " tracks remaining."); | |
} | |
} | |
} | |
function ServerMsg(parse) { | |
if (typeof SetList[parse.tc] == "function") { | |
debug(("SERVER::" + parse.tc.toUpperCase()), parse); | |
SetList[parse.tc](parse); | |
} | |
} | |
function ClientMsg(parse) { | |
if (typeof GetList[parse.tc] == "function") { | |
debug(("CLIENT::" + parse.tc.toUpperCase()), parse); | |
GetList[parse.tc](parse); | |
} | |
} | |
function Send(set, arg) { | |
SendList[set](set, arg); | |
if (arg == undefined) arg = "Open Request"; | |
debug(("CLIENT::SEND::" + set.toUpperCase()), arg); | |
} | |
// List Functions | |
let CommandList = { | |
cts: function(arg, mainonly) { | |
Alert(GetActiveChat(), "Command List:\n<b style=\"color:#ee3636;\">Moderator Commands:</b>\n!whoisbot\n!bot\n!bottoggle\n\n!yt <b style=\"color:#ffff00;\">link | keyword</b>\n!ytskip\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\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!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!roll <b style=\"color:#ffff00;\">#</b>\n\n!lists\n!listsclear\n\n!avatartoggle\n!notificationtoggle\n\n!settings\n!share"); | |
}, | |
mentionadd: function(arg, mainonly) { | |
if (arg == "") { | |
Alert(GetActiveChat(), "🗷Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help."); | |
} else { | |
if (UserRegex(arg)) { | |
CTS.MentionList.push(arg.toUpperCase()); | |
Save("MentionList", JSON.stringify(CTS.MentionList)); | |
Alert(GetActiveChat(), "🗹Command Accepted!"); | |
} | |
} | |
}, | |
mentionremove: function(arg, mainonly) { | |
if (arg == "" || isNaN(arg)) { | |
Alert(GetActiveChat(), "🗷Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help."); | |
} else { | |
if (CTS.MentionList[arg] != undefined) { | |
CTS.MentionList.splice(arg, 1); | |
Save("MentionList", JSON.stringify(CTS.MentionList)); | |
Alert(GetActiveChat(), "🗹Command Accepted!"); | |
} else { | |
Alert(GetActiveChat(), "🗷Command Rejected!\nID was not found!"); | |
} | |
} | |
}, | |
mentionlistclear: function() { | |
CTS.MentionList = []; | |
Save("MentionList", JSON.stringify(CTS.MentionList)); | |
Alert(GetActiveChat(), "🗹Command Accepted!"); | |
}, | |
mentionlist: function() { | |
let len = CTS.MentionList.length; | |
let msg = "<u>Mention list:</u>\n" + ((!len) ? "empty\n" : ""); | |
for (let index = 0; index < len; index++) msg += index + " : " + CTS.MentionList[index] + "\n"; | |
Alert(GetActiveChat(), msg); | |
}, | |
ignoreadd: function(arg, mainonly) { | |
if (arg == "") { | |
Alert(GetActiveChat(), "🗷Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help."); | |
} else { | |
if (UserRegex(arg)) { | |
CTS.IgnoreList.push(arg.toUpperCase()); | |
Save("IgnoreList", JSON.stringify(CTS.IgnoreList)); | |
Alert(GetActiveChat(), "🗹Command Accepted!"); | |
} | |
} | |
}, | |
ignoreremove: function(arg, mainonly) { | |
if (arg == "" || isNaN(arg)) { | |
Alert(GetActiveChat(), "🗷Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help."); | |
} else { | |
if (CTS.IgnoreList[arg] != undefined) { | |
CTS.IgnoreList.splice(arg, 1); | |
Save("IgnoreList", JSON.stringify(CTS.IgnoreList)); | |
Alert(GetActiveChat(), "🗹Command Accepted!"); | |
} else { | |
Alert(GetActiveChat(), "🗷Command Rejected!\nID was not found!"); | |
} | |
} | |
}, | |
ignorelistclear: function() { | |
CTS.IgnoreList = []; | |
Save("IgnoreList", JSON.stringify(CTS.IgnoreList)); | |
Alert(GetActiveChat(), "🗹Command Accepted!"); | |
}, | |
ignorelist: function() { | |
let len = CTS.IgnoreList.length; | |
let msg = "<u>Ignore list:</u>\n" + ((!len) ? "empty\n" : ""); | |
for (let index = 0; index < len; index++) msg += index + " : " + CTS.IgnoreList[index] + "\n"; | |
Alert(GetActiveChat(), msg); | |
}, | |
banadd: function(arg, mainonly) { | |
if (arg == "") { | |
Alert(GetActiveChat(), "🗷Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help."); | |
} else { | |
if (UserRegex(arg)) { | |
CTS.BanList.push(arg.toUpperCase()); | |
Save("BanList", JSON.stringify(CTS.BanList)); | |
Alert(GetActiveChat(), "🗹Command Accepted!"); | |
let check = UsernameToHandle(arg.toUpperCase()); | |
if (check != -1) Send("ban", check); | |
} | |
} | |
}, | |
banremove: function(arg, mainonly) { | |
if (arg == "" || isNaN(arg)) { | |
Alert(GetActiveChat(), "🗷Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help."); | |
} else { | |
if (CTS.BanList[arg] != undefined) { | |
CTS.BanList.splice(arg, 1); | |
Save("BanList", JSON.stringify(CTS.BanList)); | |
Alert(GetActiveChat(), "🗹Command Accepted!"); | |
} else { | |
Alert(GetActiveChat(), "🗷Command Rejected!\nID was not found!"); | |
} | |
} | |
}, | |
banlistclear: function() { | |
CTS.BanList = []; | |
Save("BanList", JSON.stringify(CTS.BanList)); | |
Alert(GetActiveChat(), "🗹Command Accepted!"); | |
}, | |
banlist: function() { | |
let len = CTS.BanList.length; | |
let msg = "<u>Ban list:</u>\n" + ((!len) ? "empty\n" : ""); | |
for (let index = 0; index < len; index++) msg += index + " : " + CTS.BanList[index] + "\n"; | |
Alert(GetActiveChat(), msg); | |
}, | |
kickadd: function(arg, mainonly) { | |
if (arg == "") { | |
Alert(GetActiveChat(), "🗷Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help."); | |
} else { | |
if (UserRegex(arg)) { | |
CTS.KickList.push(arg.toUpperCase()); | |
Save("KickList", JSON.stringify(CTS.KickList)); | |
Alert(GetActiveChat(), "🗹Command Accepted!"); | |
let check = UsernameToHandle(arg.toUpperCase()); | |
if (check != -1) Send("kick", check); | |
} | |
} | |
}, | |
kickremove: function(arg, mainonly) { | |
if (arg == "" || isNaN(arg)) { | |
Alert(GetActiveChat(), "🗷Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help."); | |
} else { | |
if (CTS.KickList[arg] != undefined) { | |
CTS.KickList.splice(arg, 1); | |
Save("KickList", JSON.stringify(CTS.KickList)); | |
Alert(GetActiveChat(), "🗹Command Accepted!"); | |
} else { | |
Alert(GetActiveChat(), "🗷Command Rejected!\nID was not found!"); | |
} | |
} | |
}, | |
kicklistclear: function() { | |
CTS.KickList = []; | |
Save("KickList", JSON.stringify(CTS.KickList)); | |
Alert(GetActiveChat(), "🗹Command Accepted!"); | |
}, | |
kicklist: function() { | |
let len = CTS.KickList.length; | |
let msg = "<u>Kick list:</u>\n" + ((!len) ? "empty\n" : ""); | |
for (let index = 0; index < len; index++) msg += index + " : " + CTS.KickList[index] + "\n"; | |
Alert(GetActiveChat(), msg); | |
}, | |
bankeywordadd: function(arg, mainonly) { | |
if (arg == "") { | |
Alert(GetActiveChat(), "🗷Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help."); | |
} else { | |
CTS.BanKeywordList.push(arg); | |
Save("BanKeywordList", JSON.stringify(CTS.BanKeywordList)); | |
Alert(GetActiveChat(), "🗹Command Accepted!"); | |
} | |
}, | |
bankeywordremove: function(arg, mainonly) { | |
if (arg == "" || isNaN(arg)) { | |
Alert(GetActiveChat(), "🗷Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help."); | |
} else { | |
if (CTS.BanKeywordList[arg] != undefined) { | |
CTS.BanKeywordList.splice(arg, 1); | |
Save("BanKeywordList", JSON.stringify(CTS.BanKeywordList)); | |
Alert(GetActiveChat(), "🗹Command Accepted!"); | |
} else { | |
Alert(GetActiveChat(), "🗷Command Rejected!\nID was not found!"); | |
} | |
} | |
}, | |
bankeywordlistclear: function() { | |
CTS.BanKeywordList = []; | |
Save("BanKeywordList", JSON.stringify(CTS.BanKeywordList)); | |
Alert(GetActiveChat(), "🗹Command Accepted!"); | |
}, | |
bankeywordlist: function() { | |
let len = CTS.BanKeywordList.length; | |
let msg = "<u>Ban Keyword list:</u>\n" + ((!len) ? "empty\n" : ""); | |
for (let index = 0; index < len; index++) msg += index + " : " + CTS.BanKeywordList[index] + "\n"; | |
Alert(GetActiveChat(), msg); | |
}, | |
kickkeywordadd: function(arg, mainonly) { | |
if (arg == "") { | |
Alert(GetActiveChat(), "🗷Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help."); | |
} else { | |
CTS.KickKeywordList.push(arg); | |
Save("KickKeywordList", JSON.stringify(CTS.KickKeywordList)); | |
Alert(GetActiveChat(), "🗹Command Accepted!"); | |
} | |
}, | |
kickkeywordremove: function(arg, mainonly) { | |
if (arg == "" || isNaN(arg)) { | |
Alert(GetActiveChat(), "🗷Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help."); | |
} else { | |
if (CTS.KickKeywordList[arg] != undefined) { | |
CTS.KickKeywordList.splice(arg, 1); | |
Save("KickKeywordList", JSON.stringify(CTS.KickKeywordList)); | |
Alert(GetActiveChat(), "🗹Command Accepted!"); | |
} else { | |
Alert(GetActiveChat(), "🗷Command Rejected!\nID was not found!"); | |
} | |
} | |
}, | |
kickkeywordlistclear: function() { | |
CTS.KickKeywordList = []; | |
Save("KickKeywordList", JSON.stringify(CTS.KickKeywordList)); | |
Alert(GetActiveChat(), "🗹Command Accepted!"); | |
}, | |
kickkeywordlist: function() { | |
let len = CTS.KickKeywordList.length; | |
let msg = "<u>Kick Keyword list:</u>\n" + ((!len) ? "empty\n" : ""); | |
for (let index = 0; index < len; index++) msg += index + " : " + Sanitize(CTS.KickKeywordList[index]) + "\n"; | |
Alert(GetActiveChat(), msg); | |
}, | |
greetadd: function(arg, mainonly) { | |
if (arg == "") { | |
Alert(GetActiveChat(), "🗷Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help."); | |
} else { | |
if (UserRegex(arg)) { | |
CTS.GreetList.push(arg.toUpperCase()); | |
Save("GreetList", JSON.stringify(CTS.GreetList)); | |
Alert(GetActiveChat(), "🗹Command Accepted!"); | |
} | |
} | |
}, | |
greetremove: function(arg, mainonly) { | |
if (arg == "" || isNaN(arg)) { | |
Alert(GetActiveChat(), "🗷Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help."); | |
} else { | |
if (CTS.GreetList[arg] != undefined) { | |
CTS.GreetList.splice(arg, 1); | |
Save("GreetList", JSON.stringify(CTS.GreetList)); | |
Alert(GetActiveChat(), "🗹Command Accepted!"); | |
} else { | |
Alert(GetActiveChat(), "🗷Command Rejected!\nID was not found!"); | |
} | |
} | |
}, | |
greetlistclear: function() { | |
CTS.GreetList = []; | |
Save("GreetList", JSON.stringify(CTS.GreetList)); | |
Alert(GetActiveChat(), "🗹Command Accepted!"); | |
}, | |
greetlist: function() { | |
let len = CTS.GreetList.length; | |
let msg = "<u>Greet list:</u>\n" + ((!len) ? "empty\n" : ""); | |
for (let index = 0; index < len; index++) msg += index + " : " + CTS.GreetList[index] + "\n"; | |
Alert(GetActiveChat(), msg); | |
}, | |
highlightadd: function(arg, mainonly) { | |
if (arg == "") { | |
Alert(GetActiveChat(), "🗷Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help."); | |
} else { | |
if (UserRegex(arg)) { | |
CTS.HighlightList.push(arg.toUpperCase()); | |
Save("HighlightList", JSON.stringify(CTS.HighlightList)); | |
Alert(GetActiveChat(), "🗹Command Accepted!"); | |
} | |
} | |
}, | |
highlightremove: function(arg, mainonly) { | |
if (arg == "" || isNaN(arg)) { | |
Alert(GetActiveChat(), "🗷Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help."); | |
} else { | |
if (CTS.HighlightList[arg] != undefined) { | |
CTS.HighlightList.splice(arg, 1); | |
Save("HighlightList", JSON.stringify(CTS.HighlightList)); | |
Alert(GetActiveChat(), "🗹Command Accepted!"); | |
} else { | |
Alert(GetActiveChat(), "🗷Command Rejected!\nID was not found!"); | |
} | |
} | |
}, | |
highlightlistclear: function() { | |
CTS.HighlightList = []; | |
Save("HighlightList", JSON.stringify(CTS.HighlightList)); | |
Alert(GetActiveChat(), "🗹Command Accepted!"); | |
}, | |
highlightlist: function() { | |
let len = CTS.HighlightList.length; | |
let msg = "<u>Highlight list:</u>\n" + ((!len) ? "empty\n" : ""); | |
for (let index = 0; index < len; index++) msg += index + " : " + CTS.HighlightList[index] + "\n"; | |
Alert(GetActiveChat(), msg); | |
}, | |
opadd: function(arg, mainonly) { | |
if (arg == "") { | |
Alert(GetActiveChat(), "🗷Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help."); | |
} else { | |
if (UserRegex(arg)) { | |
CTS.BotOPList.push(arg.toUpperCase()); | |
Save("BotOPList", JSON.stringify(CTS.BotOPList)); | |
Alert(GetActiveChat(), "🗹Command Accepted!"); | |
} | |
} | |
}, | |
opremove: function(arg, mainonly) { | |
if (arg == "" || isNaN(arg)) { | |
Alert(GetActiveChat(), "🗷Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help."); | |
} else { | |
if (CTS.BotOPList[arg] != undefined) { | |
CTS.BotOPList.splice(arg, 1); | |
Save("BotOPList", JSON.stringify(CTS.BotOPList)); | |
Alert(GetActiveChat(), "🗹Command Accepted!"); | |
} else { | |
Alert(GetActiveChat(), "🗷Command Rejected!\nID was not found!"); | |
} | |
} | |
}, | |
oplistclear: function(arg, mainonly) { | |
CTS.BotOPList = []; | |
Save("BotOPList", JSON.stringify(CTS.BotOPList)); | |
Alert(GetActiveChat(), "🗹Command Accepted!"); | |
}, | |
oplist: function() { | |
let len = CTS.BotOPList.length; | |
let msg = "<u>Bot OP list:</u>\n" + ((!len) ? "empty\n" : ""); | |
for (let index = 0; index < len; index++) msg += index + " : " + CTS.BotOPList[index] + "\n"; | |
Alert(GetActiveChat(), msg); | |
}, | |
reminderadd: function(arg, mainonly) { | |
if (arg == "") { | |
Alert(GetActiveChat(), "🗷Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help."); | |
} else { | |
let reminder = arg.match(/^((?:1[0-2]|0?[1-9]):(?:[0-5][0-9])\s?(?:[AaPp][Mm]))\s(.*)/); | |
if (reminder == null) { | |
Alert(GetActiveChat(), "🗷Command Rejected!\n!reminderadd 4:18 PM This is an example you can try!"); | |
} else { | |
CTS.ReminderList.push([reminder[1], reminder[2]]); | |
Save("ReminderList", JSON.stringify(CTS.ReminderList)); | |
Alert(GetActiveChat(), "🗹Command Accepted!"); | |
Reminder(); | |
} | |
} | |
}, | |
reminderremove: function(arg, mainonly) { | |
if (arg == "" || isNaN(arg)) { | |
Alert(GetActiveChat(), "🗷Command Rejected!\nParameter was missing/incorrect\nUse <b>!cts</b> for help."); | |
} else { | |
if (CTS.ReminderList[arg] != undefined) { | |
CTS.ReminderList.splice(arg, 1); | |
Save("ReminderList", JSON.stringify(CTS.ReminderList)); | |
Reminder(); | |
Alert(GetActiveChat(), "🗹Command Accepted!"); | |
} else { | |
Alert(GetActiveChat(), "🗷Command Rejected!\nID was not found!"); | |
} | |
} | |
}, | |
reminderlistclear: function() { | |
CTS.ReminderList = []; | |
Save("ReminderList", JSON.stringify(CTS.ReminderList)); | |
Alert(GetActiveChat(), "🗹Command Accepted!"); | |
}, | |
reminderlist: function() { | |
let len = CTS.ReminderList.length; | |
let msg = "<u>Reminder list:</u>\n" + ((!len) ? "empty\n" : ""); | |
for (let index = 0; index < len; index++) msg += index + " : [" + CTS.ReminderList[index][0] + "] " + Sanitize(CTS.ReminderList[index][1]) + "\n"; | |
Alert(GetActiveChat(), msg); | |
}, | |
remindertoggle: function() { | |
CTS.Reminder = !CTS.Reminder; | |
Save("Reminder", JSON.stringify(CTS.Reminder)); | |
Reminder(); | |
Settings(); | |
Alert(GetActiveChat(), "🗹Command Accepted!\n" + ((CTS.Reminder) ? "Reminders are now on!\n" : "Reminders are now off!\n ")); | |
}, | |
optoggle: function() { | |
CTS.UserYT = !CTS.UserYT; | |
Save("UserYT", JSON.stringify(CTS.UserYT)); | |
Settings(); | |
Alert(GetActiveChat(), "🗹Command Accepted!\n" + ((CTS.UserYT) ? "Operators can now use YouTube.\n" : "Operators cannot use YouTube.\n")); | |
}, | |
avatartoggle: function() { | |
CTS.Avatar = !CTS.Avatar; | |
Save("Avatar", JSON.stringify(CTS.Avatar)); | |
Settings(); | |
Alert(GetActiveChat(), "🗹Command Accepted!\n" + ((CTS.Avatar) ? "Avatars from now on will be hidden!\n " : "Avatars from now on will not show!\n")); | |
}, | |
notificationtoggle: function() { | |
CTS.Notification = !CTS.Notification; | |
Save("Notification", JSON.stringify(CTS.Notification)); | |
NotificationDisplay(); | |
Alert(GetActiveChat(), "🗹Command Accepted!"); | |
}, | |
bottoggle: function() { | |
CTS.Bot = !CTS.Bot; | |
Save("Bot", JSON.stringify(CTS.Bot)); | |
Settings(); | |
Alert(GetActiveChat(), "🗹Command Accepted!\n" + ((CTS.Bot) ? "You'll now ask !whoisbot." : "You'll not ask !whoisbot.")); | |
}, | |
bot: function(arg, mainonly) { | |
if (CTS.Me.mod && mainonly == false) { | |
CTS.Host = CTS.Me.handle; | |
YouTubePlayList(); | |
Alert(0, "🗹Command Accepted!\nBot bypass was called!"); | |
} | |
}, | |
share: function() { | |
Send("msg", "CosmosisT's TinyChat Script:\n(CTS Link)https://greasyfork.org/en/scripts/392086\n(Tamper Monkey Link)\nhttps://www.tampermonkey.net/"); | |
}, | |
roll: function(arg) { | |
let dice, | |
msg; | |
if (arg == "" || isNaN(arg)) { | |
dice = 1; | |
} else { | |
dice = arg; | |
} | |
msg = Dice(); | |
for (let i = 1; i < dice; i++) msg += Dice(); | |
Send("msg", msg); | |
}, | |
settings: function() { | |
Settings(); | |
}, | |
lists: function() { | |
let index, | |
len = CTS.BanList.length, | |
msg = "<b style=\"color:#ee3636;\"><u>Ban list:</u></b>\n" + ((!len) ? "empty\n" : ""); | |
for (let index = 0; index < len; index++) msg += index + " : " + CTS.BanList[index] + "\n"; | |
len = CTS.BanKeywordList.length; | |
msg += "\n<b style=\"color:#ee3636;\"><u>Ban Keyword list:</u></b>\n" + ((!len) ? "empty\n" : ""); | |
for (index = 0; index < len; index++) msg += index + " : " + Sanitize(CTS.BanKeywordList[index]) + "\n"; | |
len = CTS.KickList.length; | |
msg += "\n<b style=\"color:#ee3636;\"><u>Kick list:</u></b>\n" + ((!len) ? "empty\n" : ""); | |
for (index = 0; index < len; index++) msg += index + " : " + CTS.KickList[index] + "\n"; | |
len = CTS.KickKeywordList.length; | |
msg += "\n<b style=\"color:#ee3636;\"><u>Kick Keyword list:</u></b>\n" + ((!len) ? "empty\n" : ""); | |
for (index = 0; index < len; index++) msg += index + " : " + Sanitize(CTS.KickKeywordList[index]) + "\n"; | |
len = CTS.BotOPList.length; | |
msg += "\n<b style=\"color:#ee3636;\"><u>Bot OP list:</u></b>\n" + ((!len) ? "empty\n" : ""); | |
for (index = 0; index < len; index++) msg += index + " : " + CTS.BotOPList[index] + "\n"; | |
len = CTS.MentionList.length; | |
msg += "\n<b style=\"color:#ee3636;\"><u>Mention list:</u></b>\n" + ((!len) ? "empty\n" : ""); | |
for (index = 0; index < len; index++) msg += index + " : " + Sanitize(CTS.MentionList[index]) + "\n"; | |
len = CTS.IgnoreList.length; | |
msg += "\n<b style=\"color:#ee3636;\"><u>Ignore list:</u></b>\n" + ((!len) ? "empty\n" : ""); | |
for (index = 0; index < len; index++) msg += index + " : " + CTS.IgnoreList[index] + "\n"; | |
len = CTS.GreetList.length; | |
msg += "\n<b style=\"color:#ee3636;\"><u>Greet list:</u></b>\n" + ((!len) ? "empty\n" : ""); | |
for (index = 0; index < len; index++) msg += index + " : " + CTS.GreetList[index] + "\n"; | |
len = CTS.HighlightList.length; | |
msg += "\n<b style=\"color:#ee3636;\"><u>Highlight list:</u></b>\n" + ((!len) ? "empty\n" : ""); | |
for (index = 0; index < len; index++) msg += index + " : " + CTS.HighlightList[index] + "\n"; | |
len = CTS.ReminderList.length; | |
msg += "\n<b style=\"color:#ee3636;\"><u>Reminder list:</u></b>\n" + ((!len) ? "empty\n" : ""); | |
for (index = 0; index < len; index++) msg += index + ": [" + CTS.ReminderList[index][0] + "] " + Sanitize(CTS.ReminderList[index][1]) + "\n"; | |
Alert(GetActiveChat(), msg); | |
}, | |
listsclear: function() { | |
CTS.MentionList = []; | |
CTS.IgnoreList = []; | |
CTS.BanList = []; | |
CTS.KickList = []; | |
CTS.BanKeywordList = []; | |
CTS.KickKeywordList = []; | |
CTS.GreetList = []; | |
CTS.HighlightList = []; | |
CTS.ReminderList = []; | |
CTS.BotOPList = []; | |
Save("MentionList", JSON.stringify(CTS.MentionList)); | |
Save("IgnoreList", JSON.stringify(CTS.IgnoreList)); | |
Save("BanList", JSON.stringify(CTS.BanList)); | |
Save("KickList", JSON.stringify(CTS.KickList)); | |
Save("BanKeywordList", JSON.stringify(CTS.BanKeywordList)); | |
Save("KickKeywordList", JSON.stringify(CTS.KickKeywordList)); | |
Save("GreetList", JSON.stringify(CTS.GreetList)); | |
Save("HighlightList", JSON.stringify(CTS.HighlightList)); | |
Save("ReminderList", JSON.stringify(CTS.ReminderList)); | |
Save("BotOPList", JSON.stringify(CTS.BotOPList)); | |
Alert(GetActiveChat(), "🗹Command Accepted!"); | |
}, | |
ytqueue: function() {}, | |
ytclear: function() {}, | |
ytskip: function() {}, | |
yt: function() {} | |
}; | |
let SendList = { | |
msg: function() { | |
let obj = { | |
"tc": arguments[0] | |
}; | |
if (arguments[2] != undefined) { | |
obj.handle = arguments[1]; | |
} else { | |
if (arguments[1] != undefined) obj.text = arguments[1]; | |
} | |
CTS.SocketTarget.send(JSON.stringify(obj)); | |
}, | |
kick: function() { | |
SendList.msg(arguments[0], arguments[1], "kick"); | |
}, | |
ban: function() { | |
SendList.msg(arguments[0], arguments[1], "ban"); | |
}, | |
yut_playlist_add: function() { | |
let obj = { | |
"tc": arguments[0], | |
"item": { | |
"id": arguments[1][0], | |
"duration": arguments[1][1], | |
"title": arguments[1][2], | |
"image": arguments[1][3] | |
} | |
}; | |
if (arguments[1][4] != undefined) obj.item.offset = arguments[1][4]; | |
CTS.SocketTarget.send(JSON.stringify(obj)); | |
}, | |
yut_playlist_remove: function() { | |
SendList.yut_playlist_add(arguments[0], arguments[1]); | |
}, | |
yut_stop: function() { | |
SendList.yut_playlist_add(arguments[0], arguments[1]); | |
}, | |
yut_play: function() { | |
SendList.yut_playlist_add(arguments[0], arguments[1]); | |
}, | |
yut_playlist: function() { | |
SendList.msg("yut_playlist"); | |
} | |
}; | |
let SetList = { | |
joined: function(parse) { | |
debug(); | |
CTS.Me = { | |
"handle": parse.self.handle, | |
"namecolor": NameColor[RandomNumber(0, CTS.NameColors)], | |
"avatar": parse.self.avatar, | |
"username": parse.self.username, | |
"nick": parse.self.nick, | |
"mod": parse.self.mod | |
}; | |
CTS.Room = { | |
"Avatar": parse.room.avatar, | |
"Bio": parse.room.biography, | |
"Name": parse.room.name, | |
"PTT": parse.room.pushtotalk, | |
"Website": parse.room.website | |
}; | |
CTS.SocketConnected = true; | |
let modcall = setInterval(function(target) { | |
if (CTS.ScriptInit == true) { | |
if (CTS.Me.mod) { | |
VideoListElement.querySelector("#videos-footer").style.cssText = "display:block;"; | |
if (CTS.Bot) CheckHost(true); | |
clearInterval(modcall); | |
} | |
} | |
}, 200); | |
Reminder(); | |
}, | |
userlist: function(parse) { | |
let len = parse.users.length; | |
for (let user = 0; user < len; user++) { | |
CheckUserAbuse(parse.users[user].handle, (parse.users[user].username == "") ? "GUEST" : parse.users[user].username.toUpperCase(), parse.users[user].nick.toUpperCase()); | |
CTS.UserList.push({ | |
"handle": parse.users[user].handle, | |
"mod": parse.users[user].mod, | |
"namecolor": NameColor[RandomNumber(0, CTS.NameColors)], | |
"avatar": parse.users[user].avatar, | |
"username": (parse.users[user].username == "") ? "GUEST" : parse.users[user].username, | |
"nick": parse.users[user].nick | |
}); | |
} | |
RoomUsers(); | |
}, | |
join: function(parse) { | |
let user = (parse.username == "") ? "GUEST" : parse.username.toUpperCase(); | |
CheckUserAbuse(parse.handle, user, parse.nick.toUpperCase()); | |
if (CTS.HighlightList.includes(user) || CTS.HighlightList.includes(parse.nick.toUpperCase())) { | |
if (CTS.enableSound == true) CTS.Sound.highlight.play(); | |
} | |
if (CTS.GreetList.includes(user) || CTS.GreetList.includes(parse.nick.toUpperCase()) || CTS.GreetList.includes("-ALL")) { | |
Send("msg", CTS.Welcomes[RandomNumber(0, 8)] + parse.nick + "!"); | |
if (CTS.enableSound == true) CTS.Sound.highlight.play(); | |
} | |
AddUser(parse.handle, parse.mod, NameColor[RandomNumber(0, CTS.NameColors)], (parse.avatar == "") ? "https://i.imgur.com/4Q4Lgzf.png" : parse.avatar, parse.nick, user); | |
RoomUsers(); | |
}, | |
sysmsg: function(parse) { | |
AddSystemNotification(Sanitize(parse.text)); | |
}, | |
nick: function(parse) { | |
let user = User(parse.handle); | |
if (user != -1) { | |
AddUserNotification(4, CTS.UserList[user].namecolor, CTS.UserList[user].nick, CTS.UserList[user].username, true, parse.nick); | |
CTS.UserList[user].nick = parse.nick; | |
if (CTS.Me.handle == parse.handle) CTS.Me.nick = parse.nick; | |
} | |
}, | |
stream_connected: function() { | |
debug(); | |
}, | |
stream_closed: function() { | |
debug(); | |
}, | |
ping: function() { | |
debug(); | |
}, | |
quit: function(parse) { | |
if (CTS.ScriptInit) { | |
let user = User(parse.handle); | |
if (user != -1) { | |
AddUserNotification(2, CTS.UserList[user].namecolor, CTS.UserList[user].nick, CTS.UserList[user].username, true); | |
CTS.UserList.splice(user, 1); | |
} | |
RoomUsers(); | |
if (CTS.Host == parse.handle && CTS.Me.mod && CTS.Bot) { | |
setTimeout(function() { | |
if (parse.handle == CTS.Host) { | |
SetBot(); | |
} | |
}, RandomNumber(50, 6000), parse.handle); | |
} | |
} | |
}, | |
msg: function(parse) { | |
if (CTS.ScriptInit) { | |
let user = User(parse.handle); | |
if (user != -1) { | |
let text = Sanitize(parse.text); | |
if (CTS.Me.mod) { | |
if (text.match(/^!play$/)) YouTubePlayList(); | |
if (CTS.Host == CTS.Me.handle) { | |
if (text.match(/^!yt\s/)) BotOperator(1, user, text); | |
if (text.match(/^!ytclear$/)) BotOperator(2, user); | |
if (text.match(/^!ytskip$/)) BotOperator(3, user); | |
if (text.match(/^!ytqueue$/)) BotOperator(4, user); | |
if (CTS.UserList[user].mod && text.match(/^!whoisbot$/)) Send("msg", "!bot"); | |
} | |
CheckUserKeywordAbuse(parse.handle, parse.text); | |
if (CTS.Host == 0) CheckHost(false, parse.handle, text); | |
} | |
if (!SpamPrevention(parse.text)) { | |
if (CTS.UserList[user].mod && text.match(/^!bot$/)) { | |
CTS.HostWaiting = false; | |
CTS.Host = parse.handle; | |
} | |
if (!CheckUserIgnore(user)) { | |
CTS.Message[0].push({ | |
"time": Time(), | |
"namecolor": CTS.UserList[user].namecolor, | |
"avatar": CTS.UserList[user].avatar, | |
"username": CTS.UserList[user].username, | |
"nick": CTS.UserList[user].nick, | |
"msg": text | |
}); | |
if (GetActiveChat() == 0) { | |
let msg = CTS.Message[0][CTS.Message[0].length - 1]; | |
CreateMessage(msg.time, msg.namecolor, msg.avatar, msg.username, msg.nick, msg.msg, 0); | |
} | |
if (CTS.enableSound == true) CTS.Sound.MSG.play(); | |
if (CTS.Me.handle !== parse.handle) { | |
let len = CTS.MentionList.length; | |
for (let i = 0; i < len; i++) { | |
if (text.toUpperCase().includes(CTS.MentionList[i])) { | |
if (CTS.enableSound == true) { | |
CTS.Sound.mention.play(); | |
} | |
AddUserNotification(3, CTS.UserList[user].namecolor, CTS.UserList[user].nick, CTS.UserList[user].username, true); | |
} | |
} | |
} else { | |
UpdateScroll(1, false); | |
} | |
MessagePopUp(user, text, true, false); | |
} | |
} else { | |
Send("kick", parse.handle); | |
} | |
} | |
} | |
}, | |
pvtmsg: function(parse) { | |
if (CTS.ScriptInit) { | |
if (CTS.enablePMs == true) { | |
if (parse.handle != CTS.Me.handle) { | |
let user = User(parse.handle); | |
if (user != -1) { | |
let text = Sanitize(parse.text); | |
if (CTS.Me.mod) CheckUserKeywordAbuse(parse.handle, parse.text); | |
if (!SpamPrevention(parse.text)) { | |
if (!CheckUserIgnore(user)) { | |
if (!CTS.Message[parse.handle]) CTS.Message[parse.handle] = []; | |
CTS.Message[parse.handle].push({ | |
"time": Time(), | |
"namecolor": CTS.UserList[user].namecolor, | |
"avatar": CTS.UserList[user].avatar, | |
"username": CTS.UserList[user].username, | |
"nick": CTS.UserList[user].nick, | |
"msg": text | |
}); | |
if (parse.handle == GetActiveChat()) { | |
let msg = CTS.Message[parse.handle][CTS.Message[parse.handle].length - 1]; | |
CreateMessage(msg.time, msg.namecolor, msg.avatar, msg.username, msg.nick, msg.msg, parse.handle); | |
} | |
if (CTS.enableSound == true) CTS.Sound.MSG.play(); | |
MessagePopUp(user, text, false, false); | |
} | |
} else { | |
if (CTS.Me.mod) Send("kick", parse.handle); | |
} | |
} | |
} | |
} | |
} | |
}, | |
yut_playlist_add: function(parse) { | |
if (CTS.ScriptInit) { | |
if (!CTS.YouTube.Playing) { | |
if (CTS.PlayListStart == true) CTS.PlayListStart = false; | |
if (CTS.Host != CTS.Me.handle) { | |
Send("msg", "!play"); | |
} | |
YouTubePlayList(); | |
} | |
} | |
}, | |
yut_playlist: function(parse) { | |
if (CTS.ScriptInit) { | |
if (CTS.Me.mod) { | |
if (CTS.YouTube.Clear == true) { | |
if (parse.items != null) { | |
YouTubePlayListRemove(parse.items); | |
} | |
CTS.YouTube.QueueList = []; | |
Send("msg", "🎵YouTube cleared!🎵"); | |
CTS.YouTube.Clear = false; | |
} else { | |
if (parse.items == null) { | |
CTS.PlayListStart = true; | |
} else { | |
CTS.YouTube.PlayListCount = parse.items.length; | |
CTS.PlayListStart = false; | |
if (CTS.YouTube.ShowQueue == true) { | |
let msg = "🎵" + CTS.YouTube.PlayListCount + " track(s) in queue!🎵"; | |
for (let i = 0; i < 3; i++) { | |
if (parse.items[i] == undefined) break; | |
msg = msg + "\n" + (i + 1) + ": " + parse.items[i].title.substring(0, 22) + "\n[" + Math.floor(parse.items[i].duration / 60) + "M" + (parse.items[i].duration % 60) + "S]"; | |
} | |
Send("msg", msg); | |
} | |
} | |
if (parse.items != null && CTS.Host == CTS.Me.handle && CTS.YouTube.Playing == false) CheckYouTube("https://www.youtube.com/watch?v=" + parse.items[0].id, false); | |
} | |
CTS.YouTube.ShowQueue = false; | |
} | |
} | |
}, | |
yut_play: function(parse) { | |
if (CTS.ScriptInit) { | |
if (CTS.YouTube.CurrentTrack.ID != parse.item.id) { | |
CTS.YouTube.CurrentTrack.ID = parse.item.id; | |
CTS.YouTube.CurrentTrack.duration = parse.item.duration; | |
CTS.YouTube.CurrentTrack.title = parse.item.title; | |
CTS.YouTube.CurrentTrack.thumbnail = parse.item.image; | |
MessagePopUp(-1, CTS.YouTube.CurrentTrack.title + " is now playing!", true, true); | |
} | |
CTS.YouTube.Playing = true; | |
YouTubePlayList(); | |
} | |
}, | |
yut_stop: function(parse) { | |
if (CTS.ScriptInit) { | |
CTS.YouTube.CurrentTrack.ID = undefined; | |
CTS.YouTube.CurrentTrack.duration = undefined; | |
CTS.YouTube.CurrentTrack.title = undefined; | |
CTS.YouTube.CurrentTrack.thumbnail = undefined; | |
CTS.YouTube.Playing = false; | |
YouTubePlayList(); | |
} | |
}, | |
publish: function(parse) { | |
if (CTS.ScriptInit) { | |
CheckUserStream(parse.handle, true); | |
} | |
}, | |
unpublish: function(parse) { | |
if (CTS.ScriptInit) { | |
CheckUserStream(parse.handle, false); | |
} | |
} | |
}; | |
let GetList = { | |
pvtmsg: function(parse) { | |
if (CTS.ScriptInit) { | |
Command(parse.text, true); | |
let text = Sanitize(parse.text); | |
if (!CTS.Message[parse.handle]) CTS.Message[parse.handle] = []; | |
CTS.Message[parse.handle].push({ | |
"time": Time(), | |
"namecolor": CTS.Me.namecolor, | |
"avatar": CTS.Me.avatar, | |
"username": CTS.Me.username, | |
"nick": CTS.Me.nick, | |
"msg": text | |
}); | |
if (parse.handle == GetActiveChat()) { | |
let msg = CTS.Message[parse.handle][CTS.Message[parse.handle].length - 1]; | |
CreateMessage(msg.time, CTS.Me.namecolor, CTS.Me.avatar, CTS.Me.username, CTS.Me.nick, msg.msg, parse.handle); | |
UpdateScroll(1, false); | |
} | |
} | |
}, | |
msg: function(parse) { | |
if (CTS.ScriptInit) { | |
Command(parse.text, false); | |
} | |
} | |
}; | |
// Misc Functions | |
let TimeToDate = (time, date = new Date()) => { | |
let match = time.trim().match(/(\d+):(\d+)\s?((am|AM|aM|Am)|(pm|PM|pM|Pm))/); | |
let t = { | |
hours: parseInt(match[1]), | |
minutes: parseInt(match[2]), | |
period: match[3].toLowerCase() | |
}; | |
if (t.hours === 12) { | |
if (t.period === "am") date.setHours(t.hours - 12, t.minutes, 0); | |
if (t.period === "pm") date.setHours(t.hours, t.minutes, 0); | |
} else { | |
if (t.period === "am") date.setHours(t.hours, t.minutes, 0); | |
if (t.period === "pm") date.setHours(t.hours + 12, t.minutes, 0); | |
} | |
return date; | |
}; | |
function debug(e, parse) { | |
if (CTS.DebugClear == false) { | |
if (e != undefined) { | |
let msg = "%cCTS::" + e; | |
if (parse) msg = msg + "\n%c" + JSON.stringify(parse); | |
console.log(msg, "background: #000000; color: #53b6ef;", "color:#FFF;"); | |
} | |
} else { | |
console.clear(); | |
console.log(" ( \n ( * ))\ ) \n )\ \` ) /(()/( \n (((_) ( )(_)/(_)) \n )\___(_(_()(_)) \n((/ __|_ _/ __| \n | (__ | | \__ \ /\n \___| |_| |___/ \nCosmosisT's TinyChat Script\nCREATOR: COSMOSIST\nVERSION: " + CTS.Version + "\nCONSOLE DEBUG: FALSE\n\nJoin the discord today!\nhttps://discord.gg/84xqc6r"); | |
} | |
} | |
function Remove(query, element) { | |
return (element != undefined) ? query.querySelector(element).parentNode.removeChild(query.querySelector(element)) : query.parentNode.removeChild(query); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment