diff --git a/build/manifest.json b/build/manifest.json index b0ca7f9..ea0f80b 100644 --- a/build/manifest.json +++ b/build/manifest.json @@ -1,6 +1,6 @@ { "name": "turnStyles for turntable.fm", - "version": "11.0.1", + "version": "11.0.2", "description": "Apply tweaks to turntable.fm - autobop, autodj, themes, styles, and more!", "manifest_version": 2, "icons": { diff --git a/build/turnStyles.js b/build/turnStyles.js index c2fcba4..36f12c1 100644 --- a/build/turnStyles.js +++ b/build/turnStyles.js @@ -1 +1 @@ -!function(){var t=function(t){var e;return function(n){return e||t(e={exports:{},parent:n},e.exports),e.exports}},e=t((function(t,e){t.exports=t=>{t.checkSuggest=function(t){if(!this.config.emojis)return;let e=$("#chat-input").val().split(" "),n=e[e.length-1],i=n.length>1&&":"==n[0];":"==n[n.length-1]&&(i=!1),i?this.suggestEmotes(n):$("#tsTyping").remove()},t.suggestEmotes=function(t){let e=[],n=t.split(":").join("").toLowerCase(),i=t=>0===t.indexOf(n),o=Object.keys(this.twitchIcons),s=Object.keys(this.bttvIcons);for(let a of o)i(a)&&e.push(a);for(let a of s)i(a)&&e.push(a);$("#tsTyping").remove(),this.bindSuggest(e.sort())},t.suggestThis=function(t){let e=t.target.dataset.icon,n=$("#chat-input").val().split(" ");n[n.length-1]=e+" ",$("#chat-input").val(n.join(" ")),$("#tsTyping").remove()},t.bindSuggest=function(t){if(!t.length)return!1;let e=this.emoteParse.bind(this),i=this.suggestThis.bind(this);$("body").append(n(e,t)),$("#tsTyping .icon").on("click",i)}};const n=(t,e)=>`\n\t
\n\t\t
\n\t\t\t${e.map(e=>i(t,e)).join("")}\n\t\t
\n\t
\n`,i=(t,e)=>`\n\t
\n\t\t${t(e)} :${e}:\n\t
`})),n=t((function(t,e){t.exports=t=>{t.checkEmote=function(t){if(!this.config.emojis)return;let e=t.text.split(" "),n={};for(var i=e.length-1;i>=0;i--){let t=this.emoteFind(e[i]);t&&(n[e[i]]=t)}let o=Object.keys(n);o.length&&this.emoteRender(n,o)},t.emoteFind=function(t){if(":"!=t[0]||":"!=t[t.length-1])return;let e=t.split(":").join("").toLowerCase();return this.emoteParse(e)},t.emoteParse=function(t){return this.emoteTwitch(t)||this.emoteBttv(t)},t.emoteBttv=function(t){let e=this.bttvIcons[t];return!!e&&``},t.emoteTwitch=function(t){let e=this.twitchIcons[t];return!!e&&``},t.emoteRender=function(t,e){let i=e[0].split(":p").join("").split(":P").join("");$(`.chat .text:contains("${i}")`).each((function(){let e=this.innerHTML;for(let n in t){let i=n.split(":p").join("").split(":P").join("");e=e.split(i).join(t[n])}this.innerHTML=e.split(n).join("")}))},t.bindEmotes=function(){this.Bind("speak",this.checkEmote),this.Bind("typeahead",this.checkSuggest);let t=this.checkSuggest.bind(this);$("#chat-input").on("input",t)}};const n=''})),i=t((function(t,e){t.exports=t=>{t.attemptDJ=function(e){let{nextdj:n,auto_q:i}=this.config;if(!n&&!i)return!1;if($(".become-dj").length?this.takeSpot():this.Ran("[ondeck] no spot"),!this.current_djs[this.User().id]&&e){let n=e-1;return setTimeout((()=>t.attemptDJ(n)).bind(this),250)}},t.takeSpot=function(){this.Ran("[ondeck]: jumping..."),this.View().becomeDj()},t.tryNextDJ=function(){this.config.nextdj&&(this.Ran("[nextdj] running..."),this.attemptDJ())},t.autoQueue=function(t){this.config.auto_q&&t.text.indexOf(this.config.q_text)>-1&&(this.Ran("[autoqueue] running..."),this.attemptDJ(3))},t.wasNextDJ=function(t){this.config.nextdj&&this.User().id==t.user[0].userid&&(this.setConfig("nextdj",!1),this.Bully(n))},t.escortMe=function(t){this.config.escort&&(this.setConfig("escort",!1),this.View().quitDj())},t.escorting=function(t){this.config.escort&&this.Bully(i)},t.bindDecks=function(){this.Bind("add_dj",this.wasNextDJ),this.Bind("rem_dj",this.tryNextDJ),this.Bind("update",this.tryNextDJ),this.Bind("speak",this.autoQueue),this.Bind("pmmed",this.autoQueue)}};const n={head:"You've hopped on deck!",body:"NextDJ has been disabled."},i={head:"You've started spinning!",body:"(turnStyles will escort you after this song)",type:"action"}})),o=t((function(t,e){t.exports=t=>{t.sendReminder=function(t){if(!this.config.timing.text)return;let e=parseInt(this.config.timing.post||0),n=`[${this.Room().name}] ${this.config.timing.text}`;t%e==0&&this.config.timing.text&&this.Chat(n)},t.bindReminder=function(){this.Bind("loop",this.sendReminder)}}})),s=t((function(t,e){t.exports=t=>{t.isAway=function(t){let e=!t||t.$self;if(e&&(this.idleTimer=0),!this.config.is_afk)return!1;let n=this.config.afkstr;if(t&&t.$ping&&!t.$self&&!e||!t)return this.Batch(n);let o=n.split(";;").map(t=>t.trim()),s=!!t&&!o.includes(t.text);return e&&s?(this.setConfig("is_afk",!1),this.Post(i)):void 0},t.goAway=function(t,e,n){if(n||"is_afk"!=t)return!1;e&&this.isAway()},t.goIdle=function(){if(!this.config.idling)return;this.idleTimer+=1;let t=this.config.afkmax;this.config.is_afk||this.idleTimer{t.songStats=function(t){let e=this.last_played;this.config.alerts.song&&t&&this.Post({head:t,body:`${e.song} by ${e.artist}`,type:"stat"})},t.djStats=function(t,e){this.config.alerts.spun&&this.Post({head:`${t} - ${e}`,body:" - is done spinning!",type:"stat"})},t.userStats=function(t){$(".profile.modal .statslink").length||($(".profile.modal .section.web-links").show(),$(".profile.modal .website").append(n(t)))},t.bindStats=function(){this.Bind("tracked",this.songStats),this.Bind("dropped",this.djStats),this.Bind("profile",this.userStats)}};const n=t=>`\n \n Leaderboard\n \n`})),l=t((function(t,e){t.exports=t=>{t.notifyPMs=function(t){let e=this.config.notify.chat,n="New PM "+(t.$from?"from: "+t.$from:""),i=t.text;e&&this.Notify({head:n,body:i,type:"pm_ping"})},t.notifyDing=function(t){let e=this.config.notify.ding,n=`[${this.View().roomData.name}] @${t.name}`,i=t.text;e&&t.$ping&&this.Notify({head:n,body:i,type:"chat_ping "})},t.notifyText=function(t){let e=this.config.notify.text;if(e.length<3)return!1;let i=t.text.toLowerCase(),o=e.toLowerCase().split(",").map(t=>t.trim());for(let s of o)if(i.indexOf(s)>-1){$(n).addClass("mention");let e=`Hot Word: "${s}"`,i=t.text;return this.Notify({head:e,body:i,type:"text_ping"})}},t.notifySong=function(){let t=this.now_playing;if(!t||!t.song)return;let e=this.config.notify.song,n="Now Playing: "+t.song,i="By: "+t.artist;e&&this.Notify({head:n,body:i},"new_song")},t.alertSnag=function(t){let e=this.config.alerts.snag,n=t.$name;e&&this.Post({head:n,body:"has snagged this track!",type:"snag"})},t.alertJoin=function(t){if(this.config.alerts.join)for(let e of t.user)this.Post({head:e.name,body:"joined.",type:"join"})},t.alertLeft=function(t){if(this.config.alerts.left)for(let e of t.user)this.Post({head:e.name,body:"left.",type:"left"})},t.bindAlerts=function(){this.Bind("pmmed",this.notifyPMs),this.Bind("speak",this.notifyText),this.Bind("speak",this.notifyDing),this.Bind("tracked",this.notifySong),this.Bind("snagged",this.alertSnag),this.Bind("registered",this.alertJoin),this.Bind("deregistered",this.alertLeft)}};const n=".chat .messages .message:last-of-type"})),r=t((function(t,e){t.exports=t=>{t.autoBop=function(){if(this.bop&&clearTimeout(this.bop),!this.config.auto_b)return!1;const t=Math.floor(7*Math.random()*100);this.Log(`[autobop] in ${t/100} seconds`),this.bop=setTimeout(()=>n(".awesome-button"),t)},t.bindAutobop=function(){this.autoBop(),this.Bind("newsong",this.autoBop)}};const n=t=>{$(window).focus();const e={bubbles:!0,cancelable:!0,view:window},n=document.querySelectorAll(t)[0],i=new MouseEvent("click",e);return!n.dispatchEvent(i)}})),d=t((function(t,e){t.exports=t=>{t.countPlaylist=function(){let t=$("#playlist-header .text")[0],e=window.playlist.fileids.length,n=t.innerHTML.split("")[0];t.innerHTML=`${n} ${e}`},t.checkPlaylist=function(){this.waitForPlaylist&&(clearTimeout(this.waitForPlaylist),delete this.waitForPlaylist);let t=this.searchPlaylist;this.waitForPlaylist=setTimeout(t.bind(this),250)},t.searchPlaylist=function(){if($(".song.ts-recent").removeClass("ts-recent"),!this.config.played)return;let t=this.Room().metadata.songlog;$("#queue .songs .song").each((function(){let e=$(this),n=e.find(".title").text(),i=e.find(".details").text().split(" \u2022 ")[0];for(let o of t){let{song:t,artist:s}=o.metadata;t==n&&s==i&&e.addClass("ts-recent")}}))},t.updatePlaylist=function(t,e){this.checkPlaylist(),"played"==t&&this.bodyClass("ts-played",e)},t.bindPlaylist=function(){this.countPlaylist(),this.checkPlaylist(),this.bodyClass("ts-played",this.config.played),this.Bind("update",this.updatePlaylist),this.Bind("tracked",this.checkPlaylist),this.Bind("playlist",this.checkPlaylist),this.Bind("playlist",this.countPlaylist)}}})),c=t((function(t,e){t.exports=t=>{t.addTimeStamp=function(t){if(!this.config.stamps)return;let e=$(n),i=0===e[0].innerText.indexOf(t.name),o=e.has(".timestamp").length;if(i&&!o){let t=this.time().split(":").slice(0,2).join(":");e.prepend(`
${t}
`)}},t.fadeNewSong=function(t){let e=$(t).children(".message").last(),n=e.has(".avatar").length,i=e[0].innerText.includes("started playing");!n&&i&&e.addClass("stat")},t.quickText=function(t){let e=this.config.qtbtns[t];e&&(e.indexOf("||")>-1&&(e=e.split("||")[1].trim()),this.Batch(e))},t.bindChat=function(){this.Bind("speak",this.addTimeStamp),this.Bind("newchat",this.fadeNewSong),this.qtbtn1=function(){this.quickText("qtbtn1")},this.qtbtn2=function(){this.quickText("qtbtn2")},this.qtbtn3=function(){this.quickText("qtbtn3")}}};const n=".chat .messages .message:last-of-type"})),h=t((function(t,e){t.exports=t=>{t.loadVolume=function(){let t=this.config.volume,e=$("body").hasClass("ts-volume");if(e&&!t&&($("#tsVolWrap").remove(),window.turntablePlayer.realVolume=this.realVolume,this.Log("[volume] removed")),t&&!e){let t="DOMMouseScroll mousewheel";$(".header-content").append(s()),$("#tsMuteBtn").on("click",this.toggleMute.bind(this)),$("#tsVolSlide").on("input",this.saveVolume.bind(this)),$("#tsVolSlide").on(t,this.rollVolume.bind(this)),this.Log("[volume] added")}this.bodyClass("ts-volume",t)},t.saveVolume=function(t){let e=(t=t.target?t.target.value:t)>0?n(t):-7,o=e<7?i:this.realVolume;window.turntablePlayer.realVolume=o,window.turntablePlayer.setVolume(e),window.util.setSetting("volume",e)},t.rollVolume=function(t){let e=i(),n=t.originalEvent.deltaY>0,o=t.originalEvent.shiftKey?1:5,s=n?e-o:e+o;return $("#tsVolSlide")[0].value=s,this.saveVolume(s),!1},t.toggleMute=function(){this.muted=!this.muted,this.bodyClass("ts-muted",this.muted);let t=this.muted?-7:o();window.turntablePlayer.setVolume(t),this.Ran("[mute] "+(this.muted?"on":"off"))},t.checkMuted=function(){this.muted&&this.toggleMute()},t.bindVolume=function(){let t=window.turntablePlayer.realVolume;this.realVolume||(this.realVolume=t),this.Bind("update",this.loadVolume),this.Bind("nosong",this.checkMuted),this.Bind("newsong",this.checkMuted),this.loadVolume()}};const n=t=>Math.log(t/100)/Math.LN2+4,i=t=>{let e=t||window.util.getSetting("volume");return 100*Math.pow(2,e-4)},o=()=>n(i()),s=()=>`\n
\n \n \n Muted For One Song\n
\n`})),f=t((function(t,e){t.exports=t=>{t.loadClass=function(t){this.bodyClass("ts-logger",t.logger),this.bodyClass("ts-no-bub",!t.bubble),this.bodyClass("ts-no-ppl",!t.people),this.bodyClass("ts-no-vid",!t.player),this.bodyClass("hb-is-afk",!t.hotbar.is_afk),this.bodyClass("hb-auto-b",!t.hotbar.auto_b),this.bodyClass("hb-auto-q",!t.hotbar.auto_q),this.bodyClass("hb-nextdj",!t.hotbar.nextdj),this.bodyClass("hb-escort",!t.hotbar.escort),this.bodyClass("hb-bubble",!t.hotbar.bubble),this.bodyClass("hb-people",!t.hotbar.people),this.bodyClass("hb-shared",!t.hotbar.shared),this.bodyClass("hb-player",!t.hotbar.player),this.bodyClass("hb-qtbtn1",!t.hotbar.qtbtn1),this.bodyClass("hb-qtbtn2",!t.hotbar.qtbtn2),this.bodyClass("hb-qtbtn3",!t.hotbar.qtbtn3)},t.bindClass=function(){this.Bind("update",(function(t,e,n){"bubble"==t&&this.bodyClass("ts-no-bub",!e),"player"==t&&this.bodyClass("ts-no-vid",!e),"people"==t&&this.bodyClass("ts-no-ppl",!e),"logger"==t&&this.bodyClass("ts-logger",e),"hotbar"==n&&("is_afk"==t&&this.bodyClass("hb-is-afk",!e),"auto_b"==t&&this.bodyClass("hb-auto-b",!e),"auto_q"==t&&this.bodyClass("hb-auto-q",!e),"nextdj"==t&&this.bodyClass("hb-nextdj",!e),"escort"==t&&this.bodyClass("hb-escort",!e),"bubble"==t&&this.bodyClass("hb-bubble",!e),"people"==t&&this.bodyClass("hb-people",!e),"shared"==t&&this.bodyClass("hb-shared",!e),"player"==t&&this.bodyClass("hb-player",!e),"qtbtn1"==t&&this.bodyClass("hb-qtbtn1",!e),"qtbtn2"==t&&this.bodyClass("hb-qtbtn2",!e),"qtbtn3"==t&&this.bodyClass("hb-qtbtn3",!e)),"hotbar"!=n&&"qtbtns"!=n||this.bindHotBar()}))}}})),u=t((function(t,e){t.exports=t=>{t.insert=function(t,e){let o="ts_"+(e||"core"),s=$("#"+o),a=n(this.__base,t,e);s.length?s.attr("href",a):document.head.append(i(o,a)),"#"!=a&&this.Log("[visual] inject: "+t,a)},t.inject=function(t){let e=$("#ts_css");e.length?e[0].innerHTML=t:document.head.append(o(t)),t&&this.Log("[user css] injected",t)},t.themed=function(t){this.bodyClass("th-none",!t);let e=$("body").data("theme");e&&$("body").removeClass("th-"+e),t&&$("body").addClass("th-"+t),$("body").data("theme",t)},t.loadTheme=function(t){$("#ts_core, #ts_themes, #ts_styles, #ts_css").remove(),this.insert("turnStyles"),this.insert(t.theme,"themes"),this.insert(t.style,"styles"),this.inject(t.u_css),this.themed(t.theme)},t.bindTheme=function(){this.Bind("update",(function(t,e){"theme"==t&&this.themed(e),"theme"==t&&this.insert(e,"themes"),"style"==t&&this.insert(e,"styles"),"u_css"==t&&this.inject(e)}))}};const n=(t,e,n)=>e?`${t}${n?"/"+n:""}/${e}.css?v=${Math.random()}`:"#",i=(t,e)=>{let n=document.createElement("link");return n.id=t,n.type="text/css",n.rel="stylesheet",n.href=e,n},o=t=>{let e=document.createElement("style");return e.id="ts_css",e.type="text/css",e.innerHTML=t,e}})),b=t((function(t,e){t.exports=t=>{t.bindPanels=function(){$("#tsWindow").remove(),$("body").append(e()),$("#tsWindow").on("click",o),$("#tsPanels .ts-tab").on("click",s),$("#tsCloseBtn").on("click",this.closePanels),$("#tsBackup input").on("change",this.uploadData),$("#tsPanels *[data-for]").on("click",this.saveConfig.bind(this)),$("#tsPanels *[data-opt]").on("change",this.saveConfig.bind(this))};const e=()=>`\n
\n
\n

\u2716turnStyles options

\n \n ${t.tabs.map(i).join("")}\n
\n
\n `};const n=function(t){let e=t.name,n="ts-tab";return"General"==e&&(n+=" active"),`
${e}
`},i=function(t){let e=t.name,n="ts-tabbed";return"General"==e&&(n+=" active"),`
${t.body()}
`},o=function(t){t.target==this&&$("#tsWindow").removeClass("active")},s=function(t){let e=t.target.dataset.tab;$("#tsPanels .active").removeClass("active"),$(`*[data-tab="${e}"]`).addClass("active")}})),p=t((function(t,e){t.exports=t=>{t.tabs=[{name:"General",body:()=>`\n
\n

${t.$toggle("auto_b","Enable Autobop")}

\n

Do you forget to vote when a new song starts? turnStyles will attempt to vote "awesome" for you, after every new song starts. It will only happen once, so feel free to change your vote!

\n
\n
\n

${t.$toggle("nextdj","Enable Next DJ")}

\n

Don't want to miss your chance to hop on deck? When you enable Next DJ, turnStyles will attempt to grab the next available spot - as soon as a DJ drops, it will attempt to jump you up!

\n
\n
\n

${t.$toggle("escort","Escort After Next")}

\n

Gotta run but need to play your next track? No worries, turnStyles can take care of you! With this enabled, you'll automatically jump down when your next track finishes!

\n
\n
\n

${t.$toggle("is_afk","Currently AFK")}

\n

Do you need to step away for a second? When you enable AFK, it will send your AFK Response to the room chat, and will send it again to remind anyone who pings you while you're away!

\n ${t.$string("afkstr","Save AFK Response")}\n
\n
\n

${t.$toggle("auto_q","Enable AutoQueue")}

\n

Does your room have a bot, and does that bot have a queue? When it's your turn, turnStyles can check for your bot's ping message and attempt to throw you on deck!

\n ${t.$string("q_text","Save Queue Ping")}\n
\n
\n

${t.$toggle("idling","Auto-AFK Timer")}

\n

Sometimes we get distracted and sit idle in the background, confusing members who think you're still there! turnStyles can detect your activity and mark you afk automatically!

\n ${t.$select("afkmax",!1,"Idle Timer Duration")}\n
\n
\n

${t.$toggle("volume","Override Volume")}

\n

Let turnStyles take control of the volume settings. Moves the slider to the main header, and adds temporary mute - automatically unmutes after the current song is over!

\n
\n `},{name:"Visual",body:()=>`\n

Active Theme

${t.$select("theme")}
\n

Active Color Scheme

${t.$select("style")}
\n
\n

UI Modifications

\n ${t.$toggle("played","Show Recently Played")}\n

No one wants to be a repeat - this will highlight songs in your playlist that were recently played in the room.

\n ${t.$toggle("stamps","Add Chat Timestamps")}\n

We all get distracted - turnStyles will add timestamps to all user messages in chat so you know when a message was sent.

\n ${t.$toggle("emojis","Enable Twitch/BTTV Emojis")}\n

Adds more emojis to the :emoji: syntax. Note: Only visible to other turnStyles users, and disables the :P emoji!

\n
\n
\n

Visibility Options

\n

The following options have the tiniest potential to reduce the load on your PC, arguably speeding up turntable.

\n ${t.$toggle("bubble","Show Chat Bubbles")}\n

Toggles speech bubbles from the audience.

\n ${t.$toggle("people","Show Room Audience")}\n

Toggles the avatars on the room floor.

\n ${t.$toggle("player","Show Video Player")}\n

Toggles the video player in the background.

\n
\n
\n

Custom CSS

\n ${t.$field("u_css","Save & Apply Styles")}\n
\n `},{name:"Hotbar",body:()=>`\n
\n

QuickText Buttons

\n

Send a message often? Do it with a button on the HotBar (under the turntable logo)!

\n ${t.$toggle("qtbtn1","Enable QT1 Button","hotbar")}\n ${t.$string("qtbtn1","Save QT1 Text","qtbtns")}\n

QuickText Buttons send to chat automatically!

\n ${t.$toggle("qtbtn2","Enable QT2 Button","hotbar")}\n ${t.$string("qtbtn2","Save QT2 Text","qtbtns")}\n

Tip: Add a label with the prefix: label ||

\n ${t.$toggle("qtbtn3","Enable QT3 Button","hotbar")}\n ${t.$string("qtbtn3","Save QT3 Text","qtbtns")}\n

Tip: Send up to 3 messages by separating them with ;;

\n
\n
\n

HotBar Buttons

\n

Control which buttons show up in the HotBar when you hover over the turntable header.

\n ${t.$toggle("is_afk","AFK Button","hotbar")}\n ${t.$toggle("auto_b","Autobop Button","hotbar")}\n ${t.$toggle("auto_q","AutoQueue Button","hotbar")}\n ${t.$toggle("nextdj","Next DJ Button","hotbar")}\n ${t.$toggle("escort","Escort Button","hotbar")}\n ${t.$toggle("bubble","Chat Bubble Toggle","hotbar")}\n ${t.$toggle("people","Audience Toggle","hotbar")}\n ${t.$toggle("player","Player Toggle","hotbar")}\n ${t.$toggle("shared","Share turnStyles","hotbar")}\n
\n `},{name:"Alerts",body:()=>`\n
\n

Desktop Notifications

\n ${t.$toggle("chat","On New PMs","notify")}\n ${t.$toggle("ding","On New Mentions","notify")}\n ${t.$toggle("song","On New Songs","notify")}\n
\n
\n

Hot Words

\n

Mention/Notify on word/phrase match in chat. Use multiple phrases in a , separated list

\n ${t.$string("text","Save Hot Words","notify")}\n
\n
\n

Alerts In Chat

\n

Shown in chat, but only visible to you.

\n ${t.$toggle("song","Last Song Stats","alerts")}\n ${t.$toggle("spun","Last DJ's Stats","alerts")}\n ${t.$toggle("snag","On Song Snags","alerts")}\n ${t.$toggle("join","On User Join","alerts")}\n ${t.$toggle("left","On User Leave","alerts")}\n
\n
\n

Room Reminder

\n

Frequently send the same message over and over? Use a reminder! Send your text to the room and your selected interval!

\n ${t.$select("post","timing","Don't Remind")}\n ${t.$string("text","Save Reminder","timing")}\n

Useful for posting recurring information like rules, themes, or whatever!

\n
\n `},{name:"Support",body:()=>`\n
\n

Debugging

\n ${t.$toggle("debug","Print Logs In Console")}\n ${t.$toggle("logger","Show Logbook In Room Tab")}\n

\n ${t.$button("Reload turnStyles",0,0,"Reload")}\n ${t.$button("Reload Players",0,0,"reloadMusic")}\n
\n
\n

turnStyles Data

\n ${t.$button("Backup Data",0,0,"backupData")}\n \n ${t.$button("Reset To Default",0,0,"resetData")}\n ${t.$button("Delete All Data",0,0,"deleteData")}\n
\n
\n

Getting Help

\n ${t.$linkto("turnStyles Discord",t.static.tsDiscord)}\n ${t.$linkto("turntable.fm Discord",t.static.ttDiscord)}\n

You can find the author and active users in the above discords.

\n
\n
\n

The Author

\n

Goes by @crisis on Discords and turntable.fm.

\n ${t.$linkto("Patreon",t.static.patreon)}\n

I have a full time job and do this as a hobby, if you want to support turnStyles, consider joining the Patreon!

\n
\n `},{name:"Share",body:()=>`\n
\n

Install Links

\n ${t.$linkto("Install via Bookmarklet",t.static.website)}\n ${t.$linkto("Install For Firefox",t.static.firefox)}\n ${t.$linkto("Install For Chrome / Opera",t.static.chrome)}\n
\n
\n

Share turnStyles v${t.config.version}

\n

This will send a message to the room chat with a little description and a link to the turnStyles website! Use this to quickly share if someone wants to install the extension!

\n ${t.$button("Share turnStyles in chat!",0,0,"Share")}\n
\n `}]}})),g=t((function(t,e){t.exports=t=>{t.bindHotBar=function(){$("#tsHotBar").remove(),$(".header-bar").append(e()),$("#tsOpenBtn").on("click",this.openPanels),$("#tsHotBar *[data-for]").on("click",this.saveConfig.bind(this)),$("#tsHotBar *[data-opt]").on("change",this.saveConfig.bind(this))};const e=()=>`\n
\n ${t.$button("\u2630",!1,"tsOpenBtn")}\n ${t.$toggle("is_afk","AFK",!1,"hbIsAfk")}\n ${t.$toggle("auto_b","Autobop",!1,"hbAutoB")}\n ${t.$toggle("auto_q","AutoQueue",!1,"hbAutoQ")}\n ${t.$toggle("nextdj","Next DJ",!1,"hbNextDJ")}\n ${t.$toggle("escort","Escort",!1,"hbEscort")}\n\n ${t.$qtbtn("1")} ${t.$qtbtn("2")} ${t.$qtbtn("3")}\n\n ${t.$toggle("bubble","Bubbles",!1,"hbBubbles")}\n ${t.$toggle("people","People",!1,"hbPeople")}\n ${t.$toggle("player","Player",!1,"hbPlayer")}\n ${t.$button("Share",!1,"hbShare","Share")}\n
\n `}})),m=t((function(t,e){t.exports=t=>{t.$button=function(t,e,n,i){return``},t.$linkto=function(t,e){return`${t}`},t.$toggle=function(t,e,n="",i){return``},t.$string=function(t,e,n=""){let i=this.$button(e,t);return` ${i}`},t.$field=function(t,e,n=""){let i=this.$button(e,t);return` ${i}`},t.$select=function(t,e="",n){let i=this.options[t],o=this.getConfig(t,e);return``},t.$option=function(t,e,n){return``},t.$qtbtn=function(t){let e="qtbtn"+t,n="QT"+t,i=this.config.qtbtns[e];return i.indexOf("||")>-1&&(n=(i=i.split("||")).shift(),i=i.join(" ")),this.$button(n,!1,e,e)}}})),y=t((function(t,e){t.exports=t=>{t.backupData=function(){let t=JSON.stringify(this.config),e=new Blob([t],{type:"text/json"});return n(e)},t.uploadData=function(){let e=$("#tsBackup input")[0].files[0];if(!e)return alert("Select Backup File First!");let n=new FileReader;n.onload=t.restoreData,n.readAsText(e)},t.restoreData=function(e){let n=JSON.parse(e.target.result);n.hotbar&&n.people?t.updateData(n):alert("Error Reading Backup File!")},t.updateData=function(t={}){for(let n in t)this.config[n]=t[n];let e=JSON.stringify(this.config);return window.localStorage.setItem("tsdb",e),this.Reload()},t.resetData=function(){window.confirm(i)&&this.updateData(this.default)},t.deleteData=function(){window.confirm(o)&&(window.localStorage.removeItem("tsdb"),window.localStorage.setItem("ts-reset",!0),window.location.reload())}};const n=t=>{let e=window.navigator.msSaveBlob;if(e)return e(t);let n=window.document.createElement("a");n.href=window.URL.createObjectURL(t),n.download="tsdb.json",document.body.appendChild(n),n.click(),document.body.removeChild(n)},i='WARNING: You\'re about to reset your turnStyles Data! \nClicking "OK" will reset turnStyles to default and reload the extension!\nClick "CANCEL" if this is not what you intended to do!',o='WARNING: You\'re about to DELETE the turnStyles DATABASE!\nTHIS WILL RELOAD THE WEB PAGE! USE AS A LAST RESORT!\nClick "OK" to delete the turnStyles DB and start over!\nClick "CANCEL" to go back to turntable!'})),w=t((function(t,e){t.exports=t=>{t.cacheDJ=function(t){let e=t.user?t.user[0].userid:t;this.current_djs[e]||(this.current_djs[e]=n())},t.updateDJ=function(t){if(!t.song||!t.djid)return;let e=this.current_djs[t.djid],i=n(e,{...t,spun:1});this.current_djs[t.djid]=i,t.djid==this.User().id&&this.escortMe()},t.resetDJ=function(t){let e=t.user[0].userid,n=i(this.current_djs[e]);delete this.current_djs[e],this.Emit("dropped",t.user[0].name,n)},t.cacheSong=function(t){let e=t&&t.room?t.room.metadata.current_song:t,n=t&&t.upvoters?t.upvoters.length:0,o=!!e&&e.djid,s={...this.now_playing},a={djid:o,love:n,hate:0,snag:0},l=e?{...e.metadata,...a}:{};this.now_playing=l,this.last_played=s,this.updateDJ(s),o==this.User().id&&this.escorting();let r=l.song||"none";this.Log("[new song] "+r),this.Emit("tracked",i(s))},t.cacheVote=function(t){this.now_playing.love=t.room.metadata.upvotes,this.now_playing.hate=t.room.metadata.downvotes},t.cacheSnag=function(){this.now_playing.snag+=1},t.bindSession=function(t){this.current_djs={},this.now_playing={},this.last_played={},this.Bind("add_dj",this.cacheDJ),this.Bind("rem_dj",this.resetDJ),this.Bind("nosong",this.cacheSong),this.Bind("newsong",this.cacheSong),this.Bind("snagged",this.cacheSnag),this.Bind("update_votes",this.cacheVote);for(let e of t.djids)this.cacheDJ(e);this.cacheSong(t.currentSong)}};const n=(t,e)=>{let n={spun:0,love:0,hate:0,snag:0};for(let i in t||{})i in n&&(n[i]+=t[i]);for(let i in e||{})i in n&&(n[i]+=e[i]);return n},i=(t={},e="")=>("love"in t&&(e+=t.love+"\u2764\ufe0f"),"hate"in t&&(e+=t.hate+"\ud83d\udc94"),"snag"in t&&(e+=t.snag+"\ud83d\udc96"),"spun"in t&&(e+=t.spun+"\u25b6\ufe0f"),e)})),k=t((function(t,e){t.exports=t=>{t.readConfig=function(){let t=this.__sync,e=window.localStorage.getItem("tsdb");return e=e?JSON.parse(e):{},(t=t?JSON.parse(t):{})&&t.theme&&this.Log("[loaded] addon db"),e&&e.theme&&this.Log("[loaded] local db"),{...t,...e}},t.writeConfig=function(){let t=JSON.stringify(this.config);window.localStorage.setItem("tsdb",t),window.postMessage({tsdb:this.config})},t.saveConfig=function(t){let e=t.target.dataset;if(!e.opt&&!e.for)return;let n=e.for||e.opt,i="checkbox"==t.target.type?t.target.checked:t.target.value;e.for&&(i=$(`*[data-opt="${n}"]`).val()),this.setConfig(n,i,e.cat),(!this.lobby||["style","theme","u_css","hotbar","macros"].includes(n))&&this.Emit("update",n,i,e.cat)},t.setConfig=function(t,e,n){n?this.config[n][t]=e:this.config[t]=e,this.writeConfig();let i="boolean"==typeof e;$(`*[data-opt="${t}"][data-cat="${n||""}"]`).prop(i?"checked":"value",e)},t.getConfig=function(t,e){return e?this.config[e][t]:this.config[t]}}})),v=t((function(t,e){t.exports={default:{debug:!1,theme:"dark",style:"",u_css:"",is_afk:!1,afkstr:"I'm AFK - Back in a sec!",idling:!1,afkmax:0,people:!0,player:!0,bubble:!0,logger:!1,volume:!1,played:!1,stamps:!1,emojis:!0,auto_b:!0,nextdj:!1,escort:!1,auto_q:!1,q_text:"Hey @user - it's your turn!",notify:{song:!1,ding:!1,chat:!1,text:""},alerts:{song:!1,spun:!1,snag:!1,join:!1,left:!1},hotbar:{is_afk:!0,auto_b:!0,auto_q:!0,nextdj:!0,escort:!1,shared:!0,bubble:!1,people:!1,player:!1,qtbtn1:!1,qtbtn2:!1,qtbtn3:!1},qtbtns:{qtbtn1:"",qtbtn2:"",qtbtn3:""},timing:{beat:0,post:0,text:"Today's theme is: Cool."}},options:{theme:{dark:"Dark Mode",night:"Night Mode",cosmic:"Cosmic",forest:"Forest",midnight:"Midnight"},style:{blue:"Blue",pink:"Pink",green:"Green",purple:"Purple",teal:"Teal"},post:{15:"Every 15m",30:"Every 30m",60:"Every 1h",120:"Every 2h"},afkmax:{5:"After 5 Minutes",15:"After 15 Minutes",30:"After 30 Minutes",60:"After 60 Minutes",90:"After 90 Minutes",120:"After 120 Minutes"}}}})),x=t((function(t,e){t.exports={tf:"54fa8f1401e468494b85b537",cigrip:"54fa8fce01e468494b85b53c",datsauce:"54fa903b01e468494b85b53f",foreveralone:"54fa909b01e468494b85b542",gaben:"54fa90ba01e468494b85b543",hailhelix:"54fa90f201e468494b85b545",shoopdawhoop:"54fa932201e468494b85b555","m&mjc":"54fab45f633595ca4c713abc",bttvnice:"54fab7d2633595ca4c713abf",twat:"54fa935601e468494b85b557",watchusay:"54fa99b601e468494b85b55d",tehpolecat:"566ca11a65dbbdab32ec0558",angelthump:"566ca1a365dbbdab32ec055b",taxibro:"54fbefeb01abde735115de5b",brobalt:"54fbf00a01abde735115de5c",candianrage:"54fbf09c01abde735115de61",vislaud:"550352766f86a5b26c281ba2",karappa:"550b344bff8ecee922d2a3c1",fishmoley:"566ca00f65dbbdab32ec0544",hhhehehe:"566ca02865dbbdab32ec0547",kkona:"566ca04265dbbdab32ec054a",poledoge:"566ca09365dbbdab32ec0555",sosgame:"553b48a21f145f087fc15ca6",cruw:"55471c2789d53f2d12781713",rarepepe:"555015b77676617e17dd2e8e",hahaa:"555981336ba1901877765555",feelsbirthdayman:"55b6524154eefd53777b2580",ronsmug:"55f324c47f08be9f0a63cce0",kappacool:"560577560874de34757d2dc0",feelsbadman:"566c9fc265dbbdab32ec053b",burself:"566c9f3b65dbbdab32ec052e",concerndoge:"566c9f6365dbbdab32ec0532",feelsgoodman:"566c9fde65dbbdab32ec053e",firespeed:"566c9ff365dbbdab32ec0541",nam:"566ca06065dbbdab32ec054e",sourpls:"566ca38765dbbdab32ec0560",feelssnowman:"566dde0e65dbbdab32ec068f",feelssnowyman:"566decae65dbbdab32ec0699",sosnowy:"567b5b520e984428652809b6",saltycorn:"56901914991f200c34ffa656",monkas:"56e9f494fff3cc5c35e5287e",vapenation:"56f5be00d48006ba34f530a4",ariw:"56fa09f18eff3b595e93ac26",notsquishy:"5709ab688eff3b595e93c595",feelsamazingman:"5733ff12e72c3c0814233e20",duckerz:"573d38b50ffbf6cc5cc38dc9",icecold:"5849c9a4f52be01a7ee5f79d",sqshy:"59cf182fcbe2693d59d7bf46",wowee:"58d2e73058d8950a875ad027",wubtf:"5dc36a8db537d747e37ac187",cvr:"5e76d2ab8c0f5c3723a9a87d",cvl:"5e76d2d2d112fc372574d222",cvhazmat:"5e76d338d6581c3724c0f0b2",cvmask:"5e76d399d6581c3724c0f0b8",dogchamp:"5ffdf28dc96152314ad63960",fubaldi:"5f1caf2d713a6144748a2372",baomn:"5f30ac02fe85fb4472d27d16",crawlers:"5f30ae9e6f37824466029865",checkers:"5f30afaa65fe924464efae58",kissapregomie:"5f30b03d6f37824466029880",pettheeddie:"5f30b0eacf6d2144653e6f92",solarflare:"5f30b6c865fe924464efaec9",petthebaldie:"5f30b844cf6d2144653e6fef",raremoon:"5f30b90ffe85fb4472d27dce",eddieknead:"5f30ba4ffe85fb4472d27dda",baldfloss:"5f30c16f6f37824466029992",coomtime:"5f30c24ccf6d2144653e70a1",humpers:"5f30cfc2713a6144748b5028",balddab:"5f30d8791ab9be446c4eb078",baldflick:"5f30d8e1cf6d2144653e71b8",eddiespin:"5f30df5b65fe924464efb0dd",feelsayayaman:"5f30e087713a6144748b50ce",bropls:"5f30e22865fe924464efb100",eddiebaldmansmash:"5f30ebbacf6d2144653e725a",moon2bass:"5f31e0f68abf185d76c680cf",sneakers:"5f3c69a6afb6965d6e7c100d",catjam:"5f41c91bf93bbe5d717f8a09",peepoboom:"5f4ef4c1aa6fe06bfb5f8df4",doubters:"5f5ad9080b77be6bfcad897e",eekum:"5f5c0dc468d9d86c020e58ec",moon2scoots:"5f6145b16084af6c171a58f9",baldyikes:"5f6937288d3e1b709d8e731c",speeders:"5f6e01ec239b210b0de66bca",baners:"5f76b04eccde1f4a870bf570",mariorun:"5f79098897f70a4a9be7f410",peeponarusprint:"5f790a01e016be4a882f04f5",flappers:"5f791fe1e9c9344a8f34f563",twerkers:"5f8a6c38473f4802fe4713c6",vibers:"5f8a6cdf710f8302f0c87068",baldspin:"5f8a6d0d6f583802e38905dd",pettheqynoa:"5fae06b5f32aa26441c89258",qynoalurks:"5fae06df4dfba1644029ccef",ayayajam:"5fb639f72d6c386f224a0679",notsure:"5fb640fc2d6c386f224a06cc",pepemetal:"5fb6414ff096f76f0d1bd1c0",peepogolfclap:"5fb64523f096f76f0d1bd1f6",soulshroom:"5fbc901de2900c6f07df72e6",pepelepsy:"5fc1a3660d141d6f06d87397",tanties:"5ff0e2539d7d952e405a1e7c",shushers:"5ff0e27bbe65982e48cf1431",baldyappp:"5ff0e2c1be65982e48cf143e",monaks:"5ff0e34c3edf1a2e56b7af2a",deskchan:"5ff0e4299d7d952e405a1ec3",pepw:"5ff0e4c5f58a572e54214737",lgiggle:"5ff0e4faf58a572e54214743",shruggers:"5ff0e50f3edf1a2e56b7af83",pukers:"5ff0e51f5ae5852e41549e31",peepocheering:"5ff0e545f58a572e5421474e",prayge:"5ff0e5a1f58a572e5421475b",yappp:"5ff0e6a35ae5852e41549e5f",geckw:"5ff0e704be65982e48cf14dc",komodochomp:"5ff0e76cbe65982e48cf14e9",omegapoggers:"5ff120aaf58a572e54214def",peepeegachat:"5ff66346644cbf2fc687bff4",tinyteeth:"5ffd116a30e9273179cdc63f",feelsgoogman:"5ffd143ac12abd316340578a",hypernopers:"60016b8dc96152314ad671e5",hypernodders:"6001f12a3928fb3152de23a7",hyperpeepod:"60037536c96152314ad6956d",pepephoner:"600f796f6c75a765d463bdd4",peepersd:"60172c8b8a320865dcf41961",gamba:"60172ffbf1cfbf65dbe14586",vanish:"6032f4bf7c74605395f31f2b",copege:"6032fa797c74605395f31f5f",wicked:"6032fab47c74605395f31f61",hard:"603301507c74605395f31fa1",kissabrother:"603306de7c74605395f31fbb",teatime:"60333b0d7c74605395f320ea",teatime2:"60333b377c74605395f320ec",guitartime:"6033439f7c74605395f3210f",okayge:"603349ea7c74605395f32129",click:"60334fb57c74605395f32152",easy:"603461887c74605395f329e6",peeposteer:"6035a63a7c74605395f33357",gawkgawk:"605008f0306b602acc59dbb9",mahalo:"605a6e997493072efdeb3476",wowers:"6063a39fa407570b72f282c7",aaugh:"6063aa98a407570b72f28321",peepees:"6063b0c3a407570b72f2837a",noted:"60665f35a407570b72f296a0",robpls:"606fc2ce39b5010444cfbb8c",refracting:"609f0faf67644f1d67e86529",grumpge:"60a7548f67644f1d67e8a27f",eato:"60b44a3ff8b3f62601c35f26",deadlole:"60e10bf58ed8b373e421d4a8",corpa:"6121e47e76ea4e2b9f78a35f",peeposhy:"6126e9e8af28e956864a23bf",borpau:"612d6dc1af28e956864b0fac",slap:"6132f9c3af28e956864bd1b2",kachorpa:"6136f959af28e956864c563f",geckpog:"615b961fb63cc97ee6d4dc42",elyouel:"61871d291f8ff7628e6cc518",hunger:"61eb460806fd6a9f5be1a098",potl:"6222a4be06fd6a9f5be6348a"}})),S=t((function(t,e){t.exports={jkanstyle:15,optimizeprime:16,stonelightning:17,theringer:18,redcoat:22,kappa:25,joncarnage:26,mrdestructoid:28,bcwarrior:30,gingerpower:32,dansgame:33,swiftrage:34,pjsalt:36,kevinturtle:40,kreygasm:41,ssssss:46,punchtrees:47,arsonnosexy:50,smorc:52,frankerz:65,onehand:66,bloodtrail:69,dbstyle:73,asianglow:74,biblethump:86,shazbotstix:87,pmstwin:92,fungineer:244,residentsleeper:245,"4head":354,hotpokket:357,failfish:360,daesuppy:973,wholewheat:1896,thunbeast:1898,tf2john:1899,ralpherz:1900,kippa:1901,keepo:1902,bigbrother:1904,sobayed:1906,peopleschamp:3412,grammarking:3632,panicvis:3668,anele:3792,brokeback:4057,pipehype:4240,youwhy:4337,ritzmitz:4338,elegiggle:4339,thething:7427,hassaanchop:20225,babyrage:22639,panicbasket:22998,permasmug:27509,buddhabar:27602,wutface:28087,prchase:28328,mau5:30134,heyguys:30259,notatk:34875,mcat:35063,ttours:38436,praiseit:38586,corgiderp:49106,argieb8:51838,shadylulu:52492,kappapride:55338,coolcat:58127,dendiface:58135,notlikethis:58765,ripepperonis:62833,dududu:62834,bleedpurple:62835,twitchraid:62836,seemsgood:64138,minglee:68856,kappaross:70433,kappaclaus:74510,ohmydog:81103,osfrog:81248,serioussloth:81249,komodohype:81273,vohiyo:81274,mikehogu:81636,kappawealth:81997,cmonbruh:84608,smoocherz:89945,nomnom:90075,stinkycheese:90076,cheffrank:90129,futureman:98562,opieop:100590,doritoschip:102242,pjsugar:102556,voteyea:106293,votenay:106294,rulefive:107030,dxcat:110734,drinkpurple:110785,tinyface:111119,picomause:111300,thetarfu:111351,datsheffy:111700,unsane:111792,copythis:112288,pastathat:112289,imglitch:112290,giveplz:112291,takenrg:112292,blargnaut:114738,dogface:114835,jebaited:114836,toospicy:114846,wtruck:114847,unclenox:114856,raccattack:114870,strawbeary:114876,primeme:115075,brainslug:115233,batchest:115234,curselit:116625,poooound:117484,freakinstinkin:117701,supervinlin:118772,trihard:120232,coolstorybob:123171,itsboshytime:133468,kapow:133537,youdontsay:134254,uwot:134255,rlytho:134256,partytime:135393,ninjagrumpy:138325,mvgame:142140,tbangel:143490,theilluminati:145315,morphintime:156787,thankegg:160392,begwan:160394,bigphish:160395,inuyoface:160396,kappu:160397,koncha:160400,punoko:160401,sabaping:160402,tearglove:160403,tehepelo:160404,twitchlit:166263,carlsmile:166266,crreamawk:191313,squid1:191762,squid2:191763,squid3:191764,squid4:191767,twitchunity:196892,tpcrunchyroll:323914,entropywins:376765,lul:425618,powerupr:425671,powerupl:425688,hscheers:444572,hswp:446979,darkmode:461298,twitchvotes:479745,tpfufun:508650,redteam:530888,greenteam:530890,purplestar:624501,fbtouchdown:626795,popcorn:724216,tombraid:864205,earthday:959018,partyhat:965738,mercywing1:1003187,mercywing2:1003189,pinkmercy:1003190,bisexualpride:1064987,lesbianpride:1064988,gaypride:1064991,transgenderpride:1064995,asexualpride:1130348,pansexualpride:1130349,twitchrpg:1220086,intersexpride:1221184,maxlol:1290325,nonbinarypride:1297279,genderfluidpride:1297281,fbrun:1441261,fbpass:1441271,fbspiral:1441273,fbblock:1441276,fbcatch:1441281,fbchallenge:1441285,fbpenalty:1441289,pixelbob:1547903,gunrun:1584743,holidaycookie:1713813,holidaylog:1713816,holidayornament:1713818,holidaypresent:1713819,holidaysanta:1713822,holidaytree:1713825,soonerlater:2113050,twitchsings:300116344,singsmic:300116349,singsnote:300116350,porschewin:300745158,bop:301428702,virtualhug:301696583,extralife:302426269,blacklivesmatter:302537250,football:302628600,footyellow:302628613,footgoal:302628617,showofhands:303564554,glitchcat:304486301,stinkyglitch:304486324,glitchlit:304489128,glitchnrg:304489309,pogchamp:305954156}})),C=t((function(t,e){t.exports={patreon:"https://patreon.com/pixelcrisis",ttDiscord:"https://discord.gg/jnRs4WnPjM",tsDiscord:"https://discord.gg/wqmAVvgSbE",chrome:"https://chrome.google.com/webstore/detail/turntable-tweaks/pmlkackfnbbnjfejpddpakallilkbdme",firefox:"https://addons.mozilla.org/en-US/firefox/addon/turnstyles-for-turntable-fm/",website:"https://ts.pixelcrisis.co"}})),B=t((function(t,e){t.exports=t=>{t.initConfig=function(){this.__logo=this.__base+"/images/icon128.png";let t=this.readConfig();this.config={...this.default,...t},this.config.version=j({}).version,this.config.is_afk=!1,this.Emit("loaded",this.config)},t.Attach=function(){this.config||this.initConfig();const e=window.turntable;if(!e)return this.Err("no room");if(this.lobby=$("#turntable #topBG").length,this.lobby)return this.Emit("lobby");const i=()=>setTimeout(t.Attach.bind(this),150);if(!window.turntable.user)return i();let o=n(e,"roomId");return o&&n(o,"roomData")?(this.listener=this.listen.bind(this),window.turntable.addEventListener("message",this.listener),this.Emit("attach",o),void this.Ran("[turnStyles] attached!")):i()}};const n=(t,e)=>{for(let i in t)if(null!=(n=t[i])&&n[e])return t[i];var n}})),j=t((function(t,e){t.exports={version:"11.0.1"}})),_=t((function(t,e){t.exports=t=>{t.Reload=function(){clearInterval(this.looping),$('script[src*="turnStyles.js"]').remove(),window.turntable.removeEventListener("message",this.listener);let t=document.createElement("script");t.src=`${this.__base}/turnStyles.js?v=${Math.random()}`,t.type="text/javascript",this.Ran("reloading turnStyles"),document.body.append(t)},t.reloadMusic=function(){let t=window.youtube,e=window.soundcloudplayer;e.song&&(e.songTime=e.player.currentTime()/1e3,e.previewStartTime=Date.now()-1e3,e.resumeSong(e.song)),t.song&&(t.songTime=t.player[0].getCurrentTime(),t.previewStartTime=Date.now()-3e3,t.resumeSong(t.song)),$("#tsPanel").removeClass("active")}}})),T=t((function(t,e){t.exports=t=>{t.Notify=function(t){if(!this.canNotify()||document.hasFocus())return;let{head:e,body:n,type:i}=t,o=()=>{let t=this.__logo,i=new Notification(e,{icon:t,body:n});i.onclick=()=>{window.focus(),i.close()}};i?this.Delay(o,i):o()},t.canNotify=function(){let t=this.config.notify;return!(!(t.chat||t.song||t.ding)||!("Notification"in window)||"denied"===Notification.permission||"default"===Notification.permission&&(this.Ran("[notify] asking permission"),Notification.requestPermission(),1))},t.bindNotify=function(){this.Bind("update",this.canNotify),this.canNotify()}}})),D=t((function(t,e){t.exports=t=>{t.Post=function(t){$(".chat .messages").append(n(t)),this.View().updateChatScroll()},t.Chat=function(t){window.turntable.sendMessage({text:t,api:"room.speak",roomid:this.View().roomId,section:this.View().section})},t.Batch=function(t){if(!t)return!1;if((t=t.split(";;")).length>3)this.Post(i);else for(let e of t)this.Chat(e.trim())},t.Bully=function(t){this.Post(t),this.Notify(t)},t.Share=()=>{window.confirm(o)&&(t.Batch(s.join(";;")),$("#tsWindow").removeClass("active"))}};const n=t=>`\n
\n ${t.head||""}\n ${t.body||""}\n
\n`,i={head:"Too Many Messages!",body:"Can only send up to 3 messages at a time!"},o="Share turnStyles in the room chat?",s=["Check out turnStyles!","Autobop, Emotes, Themes, & More!","Get it @ https://ts.pixelcrisis.co"]})),q=t((function(t,e){t.exports=t=>{t.logJoin=function(t){for(let e of t.user)this.Log("[join] "+e.name,e.userid)},t.logLeft=function(t){for(let e of t.user)this.Log("[left] "+e.name,e.userid)},t.logNewDJ=function(t){let e=t.user[0].userid,n=this.findName(e);this.Log("[new dj] "+n,e)},t.logOldDJ=function(t){let e=t.user[0].userid,n=this.findName(e);this.Log("[old dj] "+n,e)},t.logVote=function(t){let e=t.room.metadata.votelog,n=e[e.length-1],i=(n[0],n[1]),o=this.findName(n[0]);this.Log(`[vote] ${o}: ${i}`)},t.logConfig=function(t,e){this.Log(`[config] ${t}: ${e}`)},t.bindDebugs=function(){this.Bind("add_dj",this.logNewDJ),this.Bind("rem_dj",this.logOldDJ),this.Bind("update",this.logConfig),this.Bind("registered",this.logJoin),this.Bind("deregistered",this.logLeft),this.Bind("update_votes",this.logVote)}}})),P=t((function(t,e){t.exports=t=>{t.Log=(e,n)=>t.Logger("log",e,n),t.Ran=(e,n)=>t.Logger("ran",e,n),t.Err=(e,n)=>t.Logger("err",e,n),t.Logger=function(t,e,n){let i=!this.config||this.config.debug,o=i||"log"!=t,s=`tS [${this.time()}] ${e} ${n||""}`;i&&console.info(s),o&&this.postLog(t,e,n)},t.postLog=function(t,e,n){this.logBook=this.logBook||[],this.logBook.length>49&&this.logBook.shift();let o={type:t,text:e,info:n,time:this.time()};this.logBook.push(i(o));let s=$("#tsLogs")[0]||{},a=[...this.logBook].reverse();s.innerHTML=a.join(""),s.scrollTop=s.scrollHeight},t.bindLogger=function(){$("#tsLogBook").remove(),$(".room-info-nav").after(n)}};const n='\n\t
\n\t\t

tS Room Logs

\n\t\t
\n\t
',i=t=>`\n\t
\n\t\t
${o(t.text)}
\n\t\t
\n\t\t\t${t.time}\n\t\t\t${t.info||""}\n\t\t
\n\t
`,o=t=>t})),L=t((function(t,e){t.exports=t=>{t.Loop=function(){let t=this.config.timing.beat,e=parseInt(t)+1;this.config.timing.beat=e,this.Emit("loop",e)},t.bindLoop=function(){let t=this.Loop.bind(this);this.looping=setInterval(t,6e4)},t.Delay=function(t,e){if(this.holding||(this.holding={}),this.holding[e])return!1;this.holding[e]=setTimeout((()=>{delete this.holding[e]}).bind(this),5e3),t&&t()}}})),A=t((function(t,e){t.exports=t=>{t.Bind=function(t,e){this.events||(this.events={}),this.events[t]||(this.events[t]=[]),this.events[t].push(e.bind(this))},t.Emit=function(t,...e){let n=this.events[t];if(n)for(let i of n)i(...e)},t.listen=function(t){t.command&&(t.$ping=this.findPing(t.text),t.$name=this.findName(t.userid),t.$from=this.findName(t.senderid),t.$self=this.User().id==t.userid,this.Emit(t.command,t))},t.watcher=function(e){for(let n of e){let e=n.target,i=e.className,o="TITLE"==e.nodeName;if("songs"==i&&t.Emit("playlist"),"messages"==i&&t.Emit("newchat",e),"typeahead"==i&&t.Emit("typeahead"),o&&e.baseURI.indexOf("profile/")>-1){let n=e.baseURI.split("profile/")[1];t.Emit("profile",n)}}},t.bindWatcher=function(){let t=window.MutationObserver;t||(t=window.WebKitMutationObserver),new t(this.watcher).observe(document,{subtree:!0,childList:!0})}}})),N=t((function(t,e){t.exports=t=>{t.User=()=>window.turntable.user,t.View=()=>window.turntable.topViewController,t.Chat=()=>window.turntable.buddyList.pmWindows,t.Room=()=>window.turntable.topViewController.roomData,t.time=function(t){let e=(new Date).toLocaleTimeString("en-us"),n=e.split(":").slice(0,2).join(":");return t?n:e},t.cap=t=>t[0].toUpperCase()+t.substring(1),t.findName=function(t="Unknown"){let e=this.View().userMap[t];if(e)return e.attributes.name;let n=!!this.Chat()&&this.Chat()[t];return n?n.otherUser.attributes.name:t},t.findPing=function(t=""){let e="@"+this.User().attributes.name;return t.toLowerCase().indexOf(e.toLowerCase())>-1},t.bodyClass=function(t,e){let n=$("body").hasClass(t);e&&!n&&$("body").addClass(t),!e&&n&&$("body").removeClass(t)}}}));let E=window.$tS={};var M;M=E,N({})(M),A({})(M),L({})(M),P({})(M),q({})(M),D({})(M),T({})(M),_({})(M),B({})(M),M.Bind("lobby",(function(){this.bindLogger(),this.bindDebugs()})),M.Bind("attach",(function(t){this.bindWatcher(t),this.bindLoop(t),this.bindLogger(t),this.bindDebugs(t),this.bindNotify(t)})),(t=>{t.static=C({}),t.twitchIcons=S({}),t.bttvIcons=x({});let e=v({});t.default=e.default,t.options=e.options,k({})(t),w({})(t),y({})(t),t.Bind("attach",(function(t){this.bindSession(t)}))})(E),(t=>{m({})(t),g({})(t),p({})(t),b({})(t),t.openPanels=()=>$("#tsWindow").addClass("active"),t.closePanels=()=>$("#tsWindow").removeClass("active"),t.bindInputs=function(){this.bindHotBar(),this.bindPanels()},t.Bind("lobby",t.bindInputs),t.Bind("attach",t.bindInputs)})(E),(t=>{u({})(t),f({})(t),h({})(t),c({})(t),d({})(t),r({})(t),l({})(t),a({})(t),s({})(t),o({})(t),i({})(t),n({})(t),e({})(t),t.Bind("loaded",(function(t){this.loadTheme(t),this.loadClass(t)})),t.Bind("lobby",(function(){this.bindTheme(),this.bindClass()})),t.Bind("attach",(function(t){this.bindTheme(t),this.bindClass(t),this.bindVolume(t),this.bindChat(t),this.bindPlaylist(t),this.bindAutobop(t),this.bindAlerts(t),this.bindStats(t),this.bindAway(t),this.bindReminder(t),this.bindDecks(t),this.bindEmotes(t)}))})(E);const I="https://ts.pixelcrisis.co",R=`Oops! Something went wrong with turnStyles! \nIf this is a bookmarklet, you may need to update it.\nTo update, view the ts website at ${I} \nClicking OK will attempt to open the turnStyles website in a new tab.`;(()=>{if(E.__base=window.localStorage.getItem("tsBase"),E.__sync=window.localStorage.getItem("tsSync"),"undefined"===E.__sync&&(E.__sync="{}"),window.localStorage.removeItem("tsBase"),window.localStorage.removeItem("tsSync"),!E.__base){let t=()=>window.open(I,"_blank");return window.confirm(R)&&t(),!1}E.Attach()})()}(); \ No newline at end of file +!function(){var t=function(t){var e;return function(n){return e||t(e={exports:{},parent:n},e.exports),e.exports}},e=t((function(t,e){t.exports=t=>{t.checkSuggest=function(t){if(!this.config.emojis)return;let e=$("#chat-input").val().split(" "),n=e[e.length-1],i=n.length>1&&":"==n[0];":"==n[n.length-1]&&(i=!1),i?this.suggestEmotes(n):$("#tsTyping").remove()},t.suggestEmotes=function(t){let e=[],n=t.split(":").join("").toLowerCase(),i=t=>0===t.indexOf(n),o=Object.keys(this.twitchIcons),s=Object.keys(this.bttvIcons);for(let a of o)i(a)&&e.push(a);for(let a of s)i(a)&&e.push(a);$("#tsTyping").remove(),this.bindSuggest(e.sort())},t.suggestThis=function(t){let e=t.target.dataset.icon,n=$("#chat-input").val().split(" ");n[n.length-1]=e+" ",$("#chat-input").val(n.join(" ")),$("#tsTyping").remove()},t.bindSuggest=function(t){if(!t.length)return!1;let e=this.emoteParse.bind(this),i=this.suggestThis.bind(this);$("body").append(n(e,t)),$("#tsTyping .icon").on("click",i)}};const n=(t,e)=>`\n\t
\n\t\t
\n\t\t\t${e.map(e=>i(t,e)).join("")}\n\t\t
\n\t
\n`,i=(t,e)=>`\n\t
\n\t\t${t(e)} :${e}:\n\t
`})),n=t((function(t,e){t.exports=t=>{t.checkEmote=function(t){if(!this.config.emojis)return;let e=t.text.split(" "),n={};for(var i=e.length-1;i>=0;i--){let t=this.emoteFind(e[i]);t&&(n[e[i]]=t)}let o=Object.keys(n);o.length&&this.emoteRender(n,o)},t.emoteFind=function(t){if(":"!=t[0]||":"!=t[t.length-1])return;let e=t.split(":").join("").toLowerCase();return this.emoteParse(e)},t.emoteParse=function(t){return this.emoteTwitch(t)||this.emoteBttv(t)},t.emoteBttv=function(t){let e=this.bttvIcons[t];return!!e&&``},t.emoteTwitch=function(t){let e=this.twitchIcons[t];return!!e&&``},t.emoteRender=function(t,e){let i=e[0].split(":p").join("").split(":P").join("");$(`.chat .text:contains("${i}")`).each((function(){let e=this.innerHTML;for(let n in t){let i=n.split(":p").join("").split(":P").join("");e=e.split(i).join(t[n])}this.innerHTML=e.split(n).join("")}))},t.bindEmotes=function(){this.Bind("speak",this.checkEmote),this.Bind("typeahead",this.checkSuggest);let t=this.checkSuggest.bind(this);$("#chat-input").on("input",t)}};const n=''})),i=t((function(t,e){t.exports=t=>{t.attemptDJ=function(e){let{nextdj:n,auto_q:i}=this.config;if(!n&&!i)return!1;if($(".become-dj").length?this.takeSpot():this.Ran("[ondeck] no spot"),!this.current_djs[this.User().id]&&e){let n=e-1;return setTimeout((()=>t.attemptDJ(n)).bind(this),250)}},t.takeSpot=function(){this.Ran("[ondeck]: jumping..."),this.View().becomeDj()},t.tryNextDJ=function(){this.config.nextdj&&(this.Ran("[nextdj] running..."),this.attemptDJ())},t.autoQueue=function(t){this.config.auto_q&&t.text.indexOf(this.config.q_text)>-1&&(this.Ran("[autoqueue] running..."),this.attemptDJ(3))},t.wasNextDJ=function(t){this.config.nextdj&&this.User().id==t.user[0].userid&&(this.setConfig("nextdj",!1),this.Bully(n))},t.escortMe=function(t){this.config.escort&&(this.setConfig("escort",!1),this.View().quitDj())},t.escorting=function(t){this.config.escort&&this.Bully(i)},t.bindDecks=function(){this.Bind("add_dj",this.wasNextDJ),this.Bind("rem_dj",this.tryNextDJ),this.Bind("update",this.tryNextDJ),this.Bind("speak",this.autoQueue),this.Bind("pmmed",this.autoQueue)}};const n={head:"You've hopped on deck!",body:"NextDJ has been disabled."},i={head:"You've started spinning!",body:"(turnStyles will escort you after this song)",type:"action"}})),o=t((function(t,e){t.exports=t=>{t.sendReminder=function(t){if(!this.config.timing.text)return;let e=parseInt(this.config.timing.post||0),n=`[${this.Room().name}] ${this.config.timing.text}`;t%e==0&&this.config.timing.text&&this.Chat(n)},t.bindReminder=function(){this.Bind("loop",this.sendReminder)}}})),s=t((function(t,e){t.exports=t=>{t.isAway=function(t){let e=!t||t.$self;if(e&&(this.idleTimer=0),!this.config.is_afk)return!1;let n=this.config.afkstr;if(t&&t.$ping&&!t.$self&&!e||!t)return this.Batch(n);let o=n.split(";;").map(t=>t.trim()),s=!!t&&!o.includes(t.text);return e&&s?(this.setConfig("is_afk",!1),this.Post(i)):void 0},t.goAway=function(t,e,n){if(n||"is_afk"!=t)return!1;e&&this.isAway()},t.goIdle=function(){if(!this.config.idling)return;this.idleTimer+=1;let t=this.config.afkmax;this.config.is_afk||this.idleTimer{t.songStats=function(t){let e=this.last_played;this.config.alerts.song&&t&&this.Post({head:t,body:`${e.song} by ${e.artist}`,type:"stat"})},t.djStats=function(t,e){this.config.alerts.spun&&this.Post({head:`${t} - ${e}`,body:" - is done spinning!",type:"stat"})},t.userStats=function(t){$(".profile.modal .statslink").length||($(".profile.modal .section.web-links").show(),$(".profile.modal .website").append(n(t)))},t.bindStats=function(){this.Bind("tracked",this.songStats),this.Bind("dropped",this.djStats),this.Bind("profile",this.userStats)}};const n=t=>`\n \n Leaderboard\n \n`})),l=t((function(t,e){t.exports=t=>{t.notifyPMs=function(t){let e=this.config.notify.chat,n="New PM "+(t.$from?"from: "+t.$from:""),i=t.text;e&&this.Notify({head:n,body:i,type:"pm_ping"})},t.notifyDing=function(t){let e=this.config.notify.ding,n=`[${this.View().roomData.name}] @${t.name}`,i=t.text;e&&t.$ping&&this.Notify({head:n,body:i,type:"chat_ping "})},t.notifyText=function(t){let e=this.config.notify.text;if(e.length<3)return!1;let i=t.text.toLowerCase(),o=e.toLowerCase().split(",").map(t=>t.trim());for(let s of o)if(i.indexOf(s)>-1){$(n).addClass("mention");let e=`Hot Word: "${s}"`,i=t.text;return this.Notify({head:e,body:i,type:"text_ping"})}},t.notifySong=function(){let t=this.now_playing;if(!t||!t.song)return;let e=this.config.notify.song,n="Now Playing: "+t.song,i="By: "+t.artist;e&&this.Notify({head:n,body:i},"new_song")},t.alertSnag=function(t){let e=this.config.alerts.snag,n=t.$name;e&&this.Post({head:n,body:"has snagged this track!",type:"snag"})},t.alertJoin=function(t){if(this.config.alerts.join)for(let e of t.user)this.Post({head:e.name,body:"joined.",type:"join"})},t.alertLeft=function(t){if(this.config.alerts.left)for(let e of t.user)this.Post({head:e.name,body:"left.",type:"left"})},t.bindAlerts=function(){this.Bind("pmmed",this.notifyPMs),this.Bind("speak",this.notifyText),this.Bind("speak",this.notifyDing),this.Bind("tracked",this.notifySong),this.Bind("snagged",this.alertSnag),this.Bind("registered",this.alertJoin),this.Bind("deregistered",this.alertLeft)}};const n=".chat .messages .message:last-of-type"})),r=t((function(t,e){t.exports=t=>{t.autoBop=function(){if(this.bop&&clearTimeout(this.bop),!this.config.auto_b)return!1;const t=Math.floor(7*Math.random()*100);this.Log(`[autobop] in ${t/100} seconds`),this.bop=setTimeout(()=>n(".awesome-button"),t)},t.bindAutobop=function(){this.autoBop(),this.Bind("newsong",this.autoBop)}};const n=t=>{$(window).focus();const e={bubbles:!0,cancelable:!0,view:window},n=document.querySelectorAll(t)[0],i=new MouseEvent("click",e);return!n.dispatchEvent(i)}})),d=t((function(t,e){t.exports=t=>{t.countPlaylist=function(){let t=$("#playlist-header .text")[0],e=window.playlist.fileids.length,n=t.innerHTML.split("")[0];t.innerHTML=`${n} ${e}`},t.checkPlaylist=function(){this.waitForPlaylist&&(clearTimeout(this.waitForPlaylist),delete this.waitForPlaylist);let t=this.searchPlaylist;this.waitForPlaylist=setTimeout(t.bind(this),250)},t.searchPlaylist=function(){if($(".song.ts-recent").removeClass("ts-recent"),!this.config.played)return;let t=this.Room().metadata.songlog;$("#queue .songs .song").each((function(){let e=$(this),n=e.find(".title").text(),i=e.find(".details").text().split(" \u2022 ")[0];for(let o of t){let{song:t,artist:s}=o.metadata;t==n&&s==i&&e.addClass("ts-recent")}}))},t.updatePlaylist=function(t,e){this.checkPlaylist(),"played"==t&&this.bodyClass("ts-played",e)},t.bindPlaylist=function(){this.countPlaylist(),this.checkPlaylist(),this.bodyClass("ts-played",this.config.played),this.Bind("update",this.updatePlaylist),this.Bind("tracked",this.checkPlaylist),this.Bind("playlist",this.checkPlaylist),this.Bind("playlist",this.countPlaylist)}}})),c=t((function(t,e){t.exports=t=>{t.addTimeStamp=function(t){if(!this.config.stamps)return;let e=$(n),i=0===e[0].innerText.indexOf(t.name),o=e.has(".timestamp").length;if(i&&!o){let t=this.time().split(":").slice(0,2).join(":");e.prepend(`
${t}
`)}},t.fadeNewSong=function(t){let e=$(t).children(".message").last(),n=e.has(".avatar").length,i=e[0].innerText.includes("started playing");!n&&i&&e.addClass("stat")},t.quickText=function(t){let e=this.config.qtbtns[t];e&&(e.indexOf("||")>-1&&(e=e.split("||")[1].trim()),this.Batch(e))},t.bindChat=function(){this.Bind("speak",this.addTimeStamp),this.Bind("newchat",this.fadeNewSong),this.qtbtn1=function(){this.quickText("qtbtn1")},this.qtbtn2=function(){this.quickText("qtbtn2")},this.qtbtn3=function(){this.quickText("qtbtn3")}}};const n=".chat .messages .message:last-of-type"})),h=t((function(t,e){t.exports=t=>{t.loadVolume=function(){let t=this.config.volume,e=$("body").hasClass("ts-volume");if(e&&!t&&($("#tsVolWrap").remove(),window.turntablePlayer.realVolume=this.realVolume,this.Log("[volume] removed")),t&&!e){let t="DOMMouseScroll mousewheel";$(".header-content").append(s()),$("#tsMuteBtn").on("click",this.toggleMute.bind(this)),$("#tsVolSlide").on("input",this.saveVolume.bind(this)),$("#tsVolSlide").on(t,this.rollVolume.bind(this)),this.Log("[volume] added")}this.bodyClass("ts-volume",t)},t.saveVolume=function(t){let e=(t=t.target?t.target.value:t)>0?n(t):-7,o=e<7?i:this.realVolume;window.turntablePlayer.realVolume=o,window.turntablePlayer.setVolume(e),window.util.setSetting("volume",e)},t.rollVolume=function(t){let e=i(),n=t.originalEvent.deltaY>0,o=t.originalEvent.shiftKey?1:5,s=n?e-o:e+o;return $("#tsVolSlide")[0].value=s,this.saveVolume(s),!1},t.toggleMute=function(){this.muted=!this.muted,this.bodyClass("ts-muted",this.muted);let t=this.muted?-7:o();window.turntablePlayer.setVolume(t),this.Ran("[mute] "+(this.muted?"on":"off"))},t.checkMuted=function(){this.muted&&this.toggleMute()},t.bindVolume=function(){let t=window.turntablePlayer.realVolume;this.realVolume||(this.realVolume=t),this.Bind("update",this.loadVolume),this.Bind("nosong",this.checkMuted),this.Bind("newsong",this.checkMuted),this.loadVolume()}};const n=t=>Math.log(t/100)/Math.LN2+4,i=t=>{let e=t||window.util.getSetting("volume");return 100*Math.pow(2,e-4)},o=()=>n(i()),s=()=>`\n
\n \n \n Muted For One Song\n
\n`})),f=t((function(t,e){t.exports=t=>{t.loadClass=function(t){this.bodyClass("ts-logger",t.logger),this.bodyClass("ts-no-bub",!t.bubble),this.bodyClass("ts-no-ppl",!t.people),this.bodyClass("ts-no-vid",!t.player),this.bodyClass("hb-is-afk",!t.hotbar.is_afk),this.bodyClass("hb-auto-b",!t.hotbar.auto_b),this.bodyClass("hb-auto-q",!t.hotbar.auto_q),this.bodyClass("hb-nextdj",!t.hotbar.nextdj),this.bodyClass("hb-escort",!t.hotbar.escort),this.bodyClass("hb-bubble",!t.hotbar.bubble),this.bodyClass("hb-people",!t.hotbar.people),this.bodyClass("hb-shared",!t.hotbar.shared),this.bodyClass("hb-player",!t.hotbar.player),this.bodyClass("hb-qtbtn1",!t.hotbar.qtbtn1),this.bodyClass("hb-qtbtn2",!t.hotbar.qtbtn2),this.bodyClass("hb-qtbtn3",!t.hotbar.qtbtn3)},t.bindClass=function(){this.Bind("update",(function(t,e,n){"bubble"==t&&this.bodyClass("ts-no-bub",!e),"player"==t&&this.bodyClass("ts-no-vid",!e),"people"==t&&this.bodyClass("ts-no-ppl",!e),"logger"==t&&this.bodyClass("ts-logger",e),"hotbar"==n&&("is_afk"==t&&this.bodyClass("hb-is-afk",!e),"auto_b"==t&&this.bodyClass("hb-auto-b",!e),"auto_q"==t&&this.bodyClass("hb-auto-q",!e),"nextdj"==t&&this.bodyClass("hb-nextdj",!e),"escort"==t&&this.bodyClass("hb-escort",!e),"bubble"==t&&this.bodyClass("hb-bubble",!e),"people"==t&&this.bodyClass("hb-people",!e),"shared"==t&&this.bodyClass("hb-shared",!e),"player"==t&&this.bodyClass("hb-player",!e),"qtbtn1"==t&&this.bodyClass("hb-qtbtn1",!e),"qtbtn2"==t&&this.bodyClass("hb-qtbtn2",!e),"qtbtn3"==t&&this.bodyClass("hb-qtbtn3",!e)),"hotbar"!=n&&"qtbtns"!=n||this.bindHotBar()}))}}})),u=t((function(t,e){t.exports=t=>{t.insert=function(t,e){let o="ts_"+(e||"core"),s=$("#"+o),a=n(this.__base,t,e);s.length?s.attr("href",a):document.head.append(i(o,a)),"#"!=a&&this.Log("[visual] inject: "+t,a)},t.inject=function(t){let e=$("#ts_css");e.length?e[0].innerHTML=t:document.head.append(o(t)),t&&this.Log("[user css] injected",t)},t.themed=function(t){this.bodyClass("th-none",!t);let e=$("body").data("theme");e&&$("body").removeClass("th-"+e),t&&$("body").addClass("th-"+t),$("body").data("theme",t)},t.loadTheme=function(t){$("#ts_core, #ts_themes, #ts_styles, #ts_css").remove(),this.insert("turnStyles"),this.insert(t.theme,"themes"),this.insert(t.style,"styles"),this.inject(t.u_css),this.themed(t.theme)},t.bindTheme=function(){this.Bind("update",(function(t,e){"theme"==t&&this.themed(e),"theme"==t&&this.insert(e,"themes"),"style"==t&&this.insert(e,"styles"),"u_css"==t&&this.inject(e)}))}};const n=(t,e,n)=>e?`${t}${n?"/"+n:""}/${e}.css?v=${Math.random()}`:"#",i=(t,e)=>{let n=document.createElement("link");return n.id=t,n.type="text/css",n.rel="stylesheet",n.href=e,n},o=t=>{let e=document.createElement("style");return e.id="ts_css",e.type="text/css",e.innerHTML=t,e}})),b=t((function(t,e){t.exports=t=>{t.bindPanels=function(){$("#tsWindow").remove(),$("body").append(e()),$("#tsWindow").on("click",o),$("#tsPanels .ts-tab").on("click",s),$("#tsCloseBtn").on("click",this.closePanels),$("#tsBackup input").on("change",this.uploadData),$("#tsPanels *[data-for]").on("click",this.saveConfig.bind(this)),$("#tsPanels *[data-opt]").on("change",this.saveConfig.bind(this))};const e=()=>`\n
\n
\n

\u2716turnStyles options

\n \n ${t.tabs.map(i).join("")}\n
\n
\n `};const n=function(t){let e=t.name,n="ts-tab";return"General"==e&&(n+=" active"),`
${e}
`},i=function(t){let e=t.name,n="ts-tabbed";return"General"==e&&(n+=" active"),`
${t.body()}
`},o=function(t){t.target==this&&$("#tsWindow").removeClass("active")},s=function(t){let e=t.target.dataset.tab;$("#tsPanels .active").removeClass("active"),$(`*[data-tab="${e}"]`).addClass("active")}})),p=t((function(t,e){t.exports=t=>{t.tabs=[{name:"General",body:()=>`\n
\n

${t.$toggle("auto_b","Enable Autobop")}

\n

Do you forget to vote when a new song starts? turnStyles will attempt to vote "awesome" for you, after every new song starts. It will only happen once, so feel free to change your vote!

\n
\n
\n

${t.$toggle("nextdj","Enable Next DJ")}

\n

Don't want to miss your chance to hop on deck? When you enable Next DJ, turnStyles will attempt to grab the next available spot - as soon as a DJ drops, it will attempt to jump you up!

\n
\n
\n

${t.$toggle("escort","Escort After Next")}

\n

Gotta run but need to play your next track? No worries, turnStyles can take care of you! With this enabled, you'll automatically jump down when your next track finishes!

\n
\n
\n

${t.$toggle("is_afk","Currently AFK")}

\n

Do you need to step away for a second? When you enable AFK, it will send your AFK Response to the room chat, and will send it again to remind anyone who pings you while you're away!

\n ${t.$string("afkstr","Save AFK Response")}\n
\n
\n

${t.$toggle("auto_q","Enable AutoQueue")}

\n

Does your room have a bot, and does that bot have a queue? When it's your turn, turnStyles can check for your bot's ping message and attempt to throw you on deck!

\n ${t.$string("q_text","Save Queue Ping")}\n
\n
\n

${t.$toggle("idling","Auto-AFK Timer")}

\n

Sometimes we get distracted and sit idle in the background, confusing members who think you're still there! turnStyles can detect your activity and mark you afk automatically!

\n ${t.$select("afkmax",!1,"Idle Timer Duration")}\n
\n
\n

${t.$toggle("volume","Override Volume")}

\n

Let turnStyles take control of the volume settings. Moves the slider to the main header, and adds temporary mute - automatically unmutes after the current song is over!

\n
\n `},{name:"Visual",body:()=>`\n

Active Theme

${t.$select("theme")}
\n

Active Color Scheme

${t.$select("style")}
\n
\n

UI Modifications

\n ${t.$toggle("played","Show Recently Played")}\n

No one wants to be a repeat - this will highlight songs in your playlist that were recently played in the room.

\n ${t.$toggle("stamps","Add Chat Timestamps")}\n

We all get distracted - turnStyles will add timestamps to all user messages in chat so you know when a message was sent.

\n ${t.$toggle("emojis","Enable Twitch/BTTV Emojis")}\n

Adds more emojis to the :emoji: syntax. Note: Only visible to other turnStyles users, and disables the :P emoji!

\n
\n
\n

Visibility Options

\n

The following options have the tiniest potential to reduce the load on your PC, arguably speeding up turntable.

\n ${t.$toggle("bubble","Show Chat Bubbles")}\n

Toggles speech bubbles from the audience.

\n ${t.$toggle("people","Show Room Audience")}\n

Toggles the avatars on the room floor.

\n ${t.$toggle("player","Show Video Player")}\n

Toggles the video player in the background.

\n
\n
\n

Custom CSS

\n ${t.$field("u_css","Save & Apply Styles")}\n
\n `},{name:"Hotbar",body:()=>`\n
\n

QuickText Buttons

\n

Send a message often? Do it with a button on the HotBar (under the turntable logo)!

\n ${t.$toggle("qtbtn1","Enable QT1 Button","hotbar")}\n ${t.$string("qtbtn1","Save QT1 Text","qtbtns")}\n

QuickText Buttons send to chat automatically!

\n ${t.$toggle("qtbtn2","Enable QT2 Button","hotbar")}\n ${t.$string("qtbtn2","Save QT2 Text","qtbtns")}\n

Tip: Add a label with the prefix: label ||

\n ${t.$toggle("qtbtn3","Enable QT3 Button","hotbar")}\n ${t.$string("qtbtn3","Save QT3 Text","qtbtns")}\n

Tip: Send up to 3 messages by separating them with ;;

\n
\n
\n

HotBar Buttons

\n

Control which buttons show up in the HotBar when you hover over the turntable header.

\n ${t.$toggle("is_afk","AFK Button","hotbar")}\n ${t.$toggle("auto_b","Autobop Button","hotbar")}\n ${t.$toggle("auto_q","AutoQueue Button","hotbar")}\n ${t.$toggle("nextdj","Next DJ Button","hotbar")}\n ${t.$toggle("escort","Escort Button","hotbar")}\n ${t.$toggle("bubble","Chat Bubble Toggle","hotbar")}\n ${t.$toggle("people","Audience Toggle","hotbar")}\n ${t.$toggle("player","Player Toggle","hotbar")}\n ${t.$toggle("shared","Share turnStyles","hotbar")}\n
\n `},{name:"Alerts",body:()=>`\n
\n

Desktop Notifications

\n ${t.$toggle("chat","On New PMs","notify")}\n ${t.$toggle("ding","On New Mentions","notify")}\n ${t.$toggle("song","On New Songs","notify")}\n
\n
\n

Hot Words

\n

Mention/Notify on word/phrase match in chat. Use multiple phrases in a , separated list

\n ${t.$string("text","Save Hot Words","notify")}\n
\n
\n

Alerts In Chat

\n

Shown in chat, but only visible to you.

\n ${t.$toggle("song","Last Song Stats","alerts")}\n ${t.$toggle("spun","Last DJ's Stats","alerts")}\n ${t.$toggle("snag","On Song Snags","alerts")}\n ${t.$toggle("join","On User Join","alerts")}\n ${t.$toggle("left","On User Leave","alerts")}\n
\n
\n

Room Reminder

\n

Frequently send the same message over and over? Use a reminder! Send your text to the room and your selected interval!

\n ${t.$select("post","timing","Don't Remind")}\n ${t.$string("text","Save Reminder","timing")}\n

Useful for posting recurring information like rules, themes, or whatever!

\n
\n `},{name:"Support",body:()=>`\n
\n

Debugging

\n ${t.$toggle("debug","Print Logs In Console")}\n ${t.$toggle("logger","Show Logbook In Room Tab")}\n

\n ${t.$button("Reload turnStyles",0,0,"Reload")}\n ${t.$button("Reload Players",0,0,"reloadMusic")}\n
\n
\n

turnStyles Data

\n ${t.$button("Backup Data",0,0,"backupData")}\n \n ${t.$button("Reset To Default",0,0,"resetData")}\n ${t.$button("Delete All Data",0,0,"deleteData")}\n
\n
\n

Getting Help

\n ${t.$linkto("turnStyles Discord",t.static.tsDiscord)}\n ${t.$linkto("turntable.fm Discord",t.static.ttDiscord)}\n

You can find the author and active users in the above discords.

\n
\n
\n

The Author

\n

Goes by @crisis on Discords and turntable.fm.

\n ${t.$linkto("Patreon",t.static.patreon)}\n

I have a full time job and do this as a hobby, if you want to support turnStyles, consider joining the Patreon!

\n
\n `},{name:"Share",body:()=>`\n
\n

Install Links

\n ${t.$linkto("Install via Bookmarklet",t.static.website)}\n ${t.$linkto("Install For Firefox",t.static.firefox)}\n ${t.$linkto("Install For Chrome / Opera",t.static.chrome)}\n
\n
\n

Share turnStyles v${t.config.version}

\n

This will send a message to the room chat with a little description and a link to the turnStyles website! Use this to quickly share if someone wants to install the extension!

\n ${t.$button("Share turnStyles in chat!",0,0,"Share")}\n
\n `}]}})),g=t((function(t,e){t.exports=t=>{t.bindHotBar=function(){$("#tsHotBar").remove(),$(".header-bar").append(e()),$("#tsOpenBtn").on("click",this.openPanels),$("#tsHotBar *[data-for]").on("click",this.saveConfig.bind(this)),$("#tsHotBar *[data-opt]").on("change",this.saveConfig.bind(this))};const e=()=>`\n
\n ${t.$button("\u2630",!1,"tsOpenBtn")}\n ${t.$toggle("is_afk","AFK",!1,"hbIsAfk")}\n ${t.$toggle("auto_b","Autobop",!1,"hbAutoB")}\n ${t.$toggle("auto_q","AutoQueue",!1,"hbAutoQ")}\n ${t.$toggle("nextdj","Next DJ",!1,"hbNextDJ")}\n ${t.$toggle("escort","Escort",!1,"hbEscort")}\n\n ${t.$qtbtn("1")} ${t.$qtbtn("2")} ${t.$qtbtn("3")}\n\n ${t.$toggle("bubble","Bubbles",!1,"hbBubbles")}\n ${t.$toggle("people","People",!1,"hbPeople")}\n ${t.$toggle("player","Player",!1,"hbPlayer")}\n ${t.$button("Share",!1,"hbShare","Share")}\n
\n `}})),m=t((function(t,e){t.exports=t=>{t.$button=function(t,e,n,i){return``},t.$linkto=function(t,e){return`${t}`},t.$toggle=function(t,e,n="",i){return``},t.$string=function(t,e,n=""){let i=this.$button(e,t);return` ${i}`},t.$field=function(t,e,n=""){let i=this.$button(e,t);return` ${i}`},t.$select=function(t,e="",n){let i=this.options[t],o=this.getConfig(t,e);return``},t.$option=function(t,e,n){return``},t.$qtbtn=function(t){let e="qtbtn"+t,n="QT"+t,i=this.config.qtbtns[e];return i.indexOf("||")>-1&&(n=(i=i.split("||")).shift(),i=i.join(" ")),this.$button(n,!1,e,e)}}})),y=t((function(t,e){t.exports=t=>{t.backupData=function(){let t=JSON.stringify(this.config),e=new Blob([t],{type:"text/json"});return n(e)},t.uploadData=function(){let e=$("#tsBackup input")[0].files[0];if(!e)return alert("Select Backup File First!");let n=new FileReader;n.onload=t.restoreData,n.readAsText(e)},t.restoreData=function(e){let n=JSON.parse(e.target.result);n.hotbar&&n.people?t.updateData(n):alert("Error Reading Backup File!")},t.updateData=function(t={}){for(let n in t)this.config[n]=t[n];let e=JSON.stringify(this.config);return window.localStorage.setItem("tsBase",this.__base),window.localStorage.setItem("tsdb",e),this.Reload()},t.resetData=function(){window.confirm(i)&&this.updateData(this.default)},t.deleteData=function(){window.confirm(o)&&(window.localStorage.removeItem("tsdb"),window.localStorage.setItem("ts-reset",!0),window.location.reload())}};const n=t=>{let e=window.navigator.msSaveBlob;if(e)return e(t);let n=window.document.createElement("a");n.href=window.URL.createObjectURL(t),n.download="tsdb.json",document.body.appendChild(n),n.click(),document.body.removeChild(n)},i='WARNING: You\'re about to reset your turnStyles Data! \nClicking "OK" will reset turnStyles to default and reload the extension!\nClick "CANCEL" if this is not what you intended to do!',o='WARNING: You\'re about to DELETE the turnStyles DATABASE!\nTHIS WILL RELOAD THE WEB PAGE! USE AS A LAST RESORT!\nClick "OK" to delete the turnStyles DB and start over!\nClick "CANCEL" to go back to turntable!'})),w=t((function(t,e){t.exports=t=>{t.cacheDJ=function(t){let e=t.user?t.user[0].userid:t;this.current_djs[e]||(this.current_djs[e]=n())},t.updateDJ=function(t){if(!t.song||!t.djid)return;let e=this.current_djs[t.djid],i=n(e,{...t,spun:1});this.current_djs[t.djid]=i,t.djid==this.User().id&&this.escortMe()},t.resetDJ=function(t){let e=t.user[0].userid,n=i(this.current_djs[e]);delete this.current_djs[e],this.Emit("dropped",t.user[0].name,n)},t.cacheSong=function(t){let e=t&&t.room?t.room.metadata.current_song:t,n=t&&t.upvoters?t.upvoters.length:0,o=!!e&&e.djid,s={...this.now_playing},a={djid:o,love:n,hate:0,snag:0},l=e?{...e.metadata,...a}:{};this.now_playing=l,this.last_played=s,this.updateDJ(s),o==this.User().id&&this.escorting();let r=l.song||"none";this.Log("[new song] "+r),this.Emit("tracked",i(s))},t.cacheVote=function(t){this.now_playing.love=t.room.metadata.upvotes,this.now_playing.hate=t.room.metadata.downvotes},t.cacheSnag=function(){this.now_playing.snag+=1},t.bindSession=function(t){this.current_djs={},this.now_playing={},this.last_played={},this.Bind("add_dj",this.cacheDJ),this.Bind("rem_dj",this.resetDJ),this.Bind("nosong",this.cacheSong),this.Bind("newsong",this.cacheSong),this.Bind("snagged",this.cacheSnag),this.Bind("update_votes",this.cacheVote);for(let e of t.djids)this.cacheDJ(e);this.cacheSong(t.currentSong)}};const n=(t,e)=>{let n={spun:0,love:0,hate:0,snag:0};for(let i in t||{})i in n&&(n[i]+=t[i]);for(let i in e||{})i in n&&(n[i]+=e[i]);return n},i=(t={},e="")=>("love"in t&&(e+=t.love+"\u2764\ufe0f"),"hate"in t&&(e+=t.hate+"\ud83d\udc94"),"snag"in t&&(e+=t.snag+"\ud83d\udc96"),"spun"in t&&(e+=t.spun+"\u25b6\ufe0f"),e)})),k=t((function(t,e){t.exports=t=>{t.readConfig=function(){let t=this.__sync,e=window.localStorage.getItem("tsdb");return e=e?JSON.parse(e):{},(t=t?JSON.parse(t):{})&&t.theme&&this.Log("[loaded] addon db"),e&&e.theme&&this.Log("[loaded] local db"),{...t,...e}},t.writeConfig=function(){let t=JSON.stringify(this.config);window.localStorage.setItem("tsdb",t),window.postMessage({tsdb:this.config})},t.saveConfig=function(t){let e=t.target.dataset;if(!e.opt&&!e.for)return;let n=e.for||e.opt,i="checkbox"==t.target.type?t.target.checked:t.target.value;e.for&&(i=$(`*[data-opt="${n}"]`).val()),this.setConfig(n,i,e.cat),(!this.lobby||["style","theme","u_css","hotbar","macros"].includes(n))&&this.Emit("update",n,i,e.cat)},t.setConfig=function(t,e,n){n?this.config[n][t]=e:this.config[t]=e,this.writeConfig();let i="boolean"==typeof e;$(`*[data-opt="${t}"][data-cat="${n||""}"]`).prop(i?"checked":"value",e)},t.getConfig=function(t,e){return e?this.config[e][t]:this.config[t]}}})),v=t((function(t,e){t.exports={default:{debug:!1,theme:"dark",style:"",u_css:"",is_afk:!1,afkstr:"I'm AFK - Back in a sec!",idling:!1,afkmax:0,people:!0,player:!0,bubble:!0,logger:!1,volume:!1,played:!1,stamps:!1,emojis:!0,auto_b:!0,nextdj:!1,escort:!1,auto_q:!1,q_text:"Hey @user - it's your turn!",notify:{song:!1,ding:!1,chat:!1,text:""},alerts:{song:!1,spun:!1,snag:!1,join:!1,left:!1},hotbar:{is_afk:!0,auto_b:!0,auto_q:!0,nextdj:!0,escort:!1,shared:!0,bubble:!1,people:!1,player:!1,qtbtn1:!1,qtbtn2:!1,qtbtn3:!1},qtbtns:{qtbtn1:"",qtbtn2:"",qtbtn3:""},timing:{beat:0,post:0,text:"Today's theme is: Cool."}},options:{theme:{dark:"Dark Mode",night:"Night Mode",cosmic:"Cosmic",forest:"Forest",midnight:"Midnight"},style:{blue:"Blue",pink:"Pink",green:"Green",purple:"Purple",teal:"Teal"},post:{15:"Every 15m",30:"Every 30m",60:"Every 1h",120:"Every 2h"},afkmax:{5:"After 5 Minutes",15:"After 15 Minutes",30:"After 30 Minutes",60:"After 60 Minutes",90:"After 90 Minutes",120:"After 120 Minutes"}}}})),x=t((function(t,e){t.exports={tf:"54fa8f1401e468494b85b537",cigrip:"54fa8fce01e468494b85b53c",datsauce:"54fa903b01e468494b85b53f",foreveralone:"54fa909b01e468494b85b542",gaben:"54fa90ba01e468494b85b543",hailhelix:"54fa90f201e468494b85b545",shoopdawhoop:"54fa932201e468494b85b555","m&mjc":"54fab45f633595ca4c713abc",bttvnice:"54fab7d2633595ca4c713abf",twat:"54fa935601e468494b85b557",watchusay:"54fa99b601e468494b85b55d",tehpolecat:"566ca11a65dbbdab32ec0558",angelthump:"566ca1a365dbbdab32ec055b",taxibro:"54fbefeb01abde735115de5b",brobalt:"54fbf00a01abde735115de5c",candianrage:"54fbf09c01abde735115de61",vislaud:"550352766f86a5b26c281ba2",karappa:"550b344bff8ecee922d2a3c1",fishmoley:"566ca00f65dbbdab32ec0544",hhhehehe:"566ca02865dbbdab32ec0547",kkona:"566ca04265dbbdab32ec054a",poledoge:"566ca09365dbbdab32ec0555",sosgame:"553b48a21f145f087fc15ca6",cruw:"55471c2789d53f2d12781713",rarepepe:"555015b77676617e17dd2e8e",hahaa:"555981336ba1901877765555",feelsbirthdayman:"55b6524154eefd53777b2580",ronsmug:"55f324c47f08be9f0a63cce0",kappacool:"560577560874de34757d2dc0",feelsbadman:"566c9fc265dbbdab32ec053b",burself:"566c9f3b65dbbdab32ec052e",concerndoge:"566c9f6365dbbdab32ec0532",feelsgoodman:"566c9fde65dbbdab32ec053e",firespeed:"566c9ff365dbbdab32ec0541",nam:"566ca06065dbbdab32ec054e",sourpls:"566ca38765dbbdab32ec0560",feelssnowman:"566dde0e65dbbdab32ec068f",feelssnowyman:"566decae65dbbdab32ec0699",sosnowy:"567b5b520e984428652809b6",saltycorn:"56901914991f200c34ffa656",monkas:"56e9f494fff3cc5c35e5287e",vapenation:"56f5be00d48006ba34f530a4",ariw:"56fa09f18eff3b595e93ac26",notsquishy:"5709ab688eff3b595e93c595",feelsamazingman:"5733ff12e72c3c0814233e20",duckerz:"573d38b50ffbf6cc5cc38dc9",icecold:"5849c9a4f52be01a7ee5f79d",sqshy:"59cf182fcbe2693d59d7bf46",wowee:"58d2e73058d8950a875ad027",wubtf:"5dc36a8db537d747e37ac187",cvr:"5e76d2ab8c0f5c3723a9a87d",cvl:"5e76d2d2d112fc372574d222",cvhazmat:"5e76d338d6581c3724c0f0b2",cvmask:"5e76d399d6581c3724c0f0b8",dogchamp:"5ffdf28dc96152314ad63960",fubaldi:"5f1caf2d713a6144748a2372",baomn:"5f30ac02fe85fb4472d27d16",crawlers:"5f30ae9e6f37824466029865",checkers:"5f30afaa65fe924464efae58",kissapregomie:"5f30b03d6f37824466029880",pettheeddie:"5f30b0eacf6d2144653e6f92",solarflare:"5f30b6c865fe924464efaec9",petthebaldie:"5f30b844cf6d2144653e6fef",raremoon:"5f30b90ffe85fb4472d27dce",eddieknead:"5f30ba4ffe85fb4472d27dda",baldfloss:"5f30c16f6f37824466029992",coomtime:"5f30c24ccf6d2144653e70a1",humpers:"5f30cfc2713a6144748b5028",balddab:"5f30d8791ab9be446c4eb078",baldflick:"5f30d8e1cf6d2144653e71b8",eddiespin:"5f30df5b65fe924464efb0dd",feelsayayaman:"5f30e087713a6144748b50ce",bropls:"5f30e22865fe924464efb100",eddiebaldmansmash:"5f30ebbacf6d2144653e725a",moon2bass:"5f31e0f68abf185d76c680cf",sneakers:"5f3c69a6afb6965d6e7c100d",catjam:"5f41c91bf93bbe5d717f8a09",peepoboom:"5f4ef4c1aa6fe06bfb5f8df4",doubters:"5f5ad9080b77be6bfcad897e",eekum:"5f5c0dc468d9d86c020e58ec",moon2scoots:"5f6145b16084af6c171a58f9",baldyikes:"5f6937288d3e1b709d8e731c",speeders:"5f6e01ec239b210b0de66bca",baners:"5f76b04eccde1f4a870bf570",mariorun:"5f79098897f70a4a9be7f410",peeponarusprint:"5f790a01e016be4a882f04f5",flappers:"5f791fe1e9c9344a8f34f563",twerkers:"5f8a6c38473f4802fe4713c6",vibers:"5f8a6cdf710f8302f0c87068",baldspin:"5f8a6d0d6f583802e38905dd",pettheqynoa:"5fae06b5f32aa26441c89258",qynoalurks:"5fae06df4dfba1644029ccef",ayayajam:"5fb639f72d6c386f224a0679",notsure:"5fb640fc2d6c386f224a06cc",pepemetal:"5fb6414ff096f76f0d1bd1c0",peepogolfclap:"5fb64523f096f76f0d1bd1f6",soulshroom:"5fbc901de2900c6f07df72e6",pepelepsy:"5fc1a3660d141d6f06d87397",tanties:"5ff0e2539d7d952e405a1e7c",shushers:"5ff0e27bbe65982e48cf1431",baldyappp:"5ff0e2c1be65982e48cf143e",monaks:"5ff0e34c3edf1a2e56b7af2a",deskchan:"5ff0e4299d7d952e405a1ec3",pepw:"5ff0e4c5f58a572e54214737",lgiggle:"5ff0e4faf58a572e54214743",shruggers:"5ff0e50f3edf1a2e56b7af83",pukers:"5ff0e51f5ae5852e41549e31",peepocheering:"5ff0e545f58a572e5421474e",prayge:"5ff0e5a1f58a572e5421475b",yappp:"5ff0e6a35ae5852e41549e5f",geckw:"5ff0e704be65982e48cf14dc",komodochomp:"5ff0e76cbe65982e48cf14e9",omegapoggers:"5ff120aaf58a572e54214def",peepeegachat:"5ff66346644cbf2fc687bff4",tinyteeth:"5ffd116a30e9273179cdc63f",feelsgoogman:"5ffd143ac12abd316340578a",hypernopers:"60016b8dc96152314ad671e5",hypernodders:"6001f12a3928fb3152de23a7",hyperpeepod:"60037536c96152314ad6956d",pepephoner:"600f796f6c75a765d463bdd4",peepersd:"60172c8b8a320865dcf41961",gamba:"60172ffbf1cfbf65dbe14586",vanish:"6032f4bf7c74605395f31f2b",copege:"6032fa797c74605395f31f5f",wicked:"6032fab47c74605395f31f61",hard:"603301507c74605395f31fa1",kissabrother:"603306de7c74605395f31fbb",teatime:"60333b0d7c74605395f320ea",teatime2:"60333b377c74605395f320ec",guitartime:"6033439f7c74605395f3210f",okayge:"603349ea7c74605395f32129",click:"60334fb57c74605395f32152",easy:"603461887c74605395f329e6",peeposteer:"6035a63a7c74605395f33357",gawkgawk:"605008f0306b602acc59dbb9",mahalo:"605a6e997493072efdeb3476",wowers:"6063a39fa407570b72f282c7",aaugh:"6063aa98a407570b72f28321",peepees:"6063b0c3a407570b72f2837a",noted:"60665f35a407570b72f296a0",robpls:"606fc2ce39b5010444cfbb8c",refracting:"609f0faf67644f1d67e86529",grumpge:"60a7548f67644f1d67e8a27f",eato:"60b44a3ff8b3f62601c35f26",deadlole:"60e10bf58ed8b373e421d4a8",corpa:"6121e47e76ea4e2b9f78a35f",peeposhy:"6126e9e8af28e956864a23bf",borpau:"612d6dc1af28e956864b0fac",slap:"6132f9c3af28e956864bd1b2",kachorpa:"6136f959af28e956864c563f",geckpog:"615b961fb63cc97ee6d4dc42",elyouel:"61871d291f8ff7628e6cc518",hunger:"61eb460806fd6a9f5be1a098",potl:"6222a4be06fd6a9f5be6348a"}})),S=t((function(t,e){t.exports={jkanstyle:15,optimizeprime:16,stonelightning:17,theringer:18,redcoat:22,kappa:25,joncarnage:26,mrdestructoid:28,bcwarrior:30,gingerpower:32,dansgame:33,swiftrage:34,pjsalt:36,kevinturtle:40,kreygasm:41,ssssss:46,punchtrees:47,arsonnosexy:50,smorc:52,frankerz:65,onehand:66,bloodtrail:69,dbstyle:73,asianglow:74,biblethump:86,shazbotstix:87,pmstwin:92,fungineer:244,residentsleeper:245,"4head":354,hotpokket:357,failfish:360,daesuppy:973,wholewheat:1896,thunbeast:1898,tf2john:1899,ralpherz:1900,kippa:1901,keepo:1902,bigbrother:1904,sobayed:1906,peopleschamp:3412,grammarking:3632,panicvis:3668,anele:3792,brokeback:4057,pipehype:4240,youwhy:4337,ritzmitz:4338,elegiggle:4339,thething:7427,hassaanchop:20225,babyrage:22639,panicbasket:22998,permasmug:27509,buddhabar:27602,wutface:28087,prchase:28328,mau5:30134,heyguys:30259,notatk:34875,mcat:35063,ttours:38436,praiseit:38586,corgiderp:49106,argieb8:51838,shadylulu:52492,kappapride:55338,coolcat:58127,dendiface:58135,notlikethis:58765,ripepperonis:62833,dududu:62834,bleedpurple:62835,twitchraid:62836,seemsgood:64138,minglee:68856,kappaross:70433,kappaclaus:74510,ohmydog:81103,osfrog:81248,serioussloth:81249,komodohype:81273,vohiyo:81274,mikehogu:81636,kappawealth:81997,cmonbruh:84608,smoocherz:89945,nomnom:90075,stinkycheese:90076,cheffrank:90129,futureman:98562,opieop:100590,doritoschip:102242,pjsugar:102556,voteyea:106293,votenay:106294,rulefive:107030,dxcat:110734,drinkpurple:110785,tinyface:111119,picomause:111300,thetarfu:111351,datsheffy:111700,unsane:111792,copythis:112288,pastathat:112289,imglitch:112290,giveplz:112291,takenrg:112292,blargnaut:114738,dogface:114835,jebaited:114836,toospicy:114846,wtruck:114847,unclenox:114856,raccattack:114870,strawbeary:114876,primeme:115075,brainslug:115233,batchest:115234,curselit:116625,poooound:117484,freakinstinkin:117701,supervinlin:118772,trihard:120232,coolstorybob:123171,itsboshytime:133468,kapow:133537,youdontsay:134254,uwot:134255,rlytho:134256,partytime:135393,ninjagrumpy:138325,mvgame:142140,tbangel:143490,theilluminati:145315,morphintime:156787,thankegg:160392,begwan:160394,bigphish:160395,inuyoface:160396,kappu:160397,koncha:160400,punoko:160401,sabaping:160402,tearglove:160403,tehepelo:160404,twitchlit:166263,carlsmile:166266,crreamawk:191313,squid1:191762,squid2:191763,squid3:191764,squid4:191767,twitchunity:196892,tpcrunchyroll:323914,entropywins:376765,lul:425618,powerupr:425671,powerupl:425688,hscheers:444572,hswp:446979,darkmode:461298,twitchvotes:479745,tpfufun:508650,redteam:530888,greenteam:530890,purplestar:624501,fbtouchdown:626795,popcorn:724216,tombraid:864205,earthday:959018,partyhat:965738,mercywing1:1003187,mercywing2:1003189,pinkmercy:1003190,bisexualpride:1064987,lesbianpride:1064988,gaypride:1064991,transgenderpride:1064995,asexualpride:1130348,pansexualpride:1130349,twitchrpg:1220086,intersexpride:1221184,maxlol:1290325,nonbinarypride:1297279,genderfluidpride:1297281,fbrun:1441261,fbpass:1441271,fbspiral:1441273,fbblock:1441276,fbcatch:1441281,fbchallenge:1441285,fbpenalty:1441289,pixelbob:1547903,gunrun:1584743,holidaycookie:1713813,holidaylog:1713816,holidayornament:1713818,holidaypresent:1713819,holidaysanta:1713822,holidaytree:1713825,soonerlater:2113050,twitchsings:300116344,singsmic:300116349,singsnote:300116350,porschewin:300745158,bop:301428702,virtualhug:301696583,extralife:302426269,blacklivesmatter:302537250,football:302628600,footyellow:302628613,footgoal:302628617,showofhands:303564554,glitchcat:304486301,stinkyglitch:304486324,glitchlit:304489128,glitchnrg:304489309,pogchamp:305954156}})),C=t((function(t,e){t.exports={patreon:"https://patreon.com/pixelcrisis",ttDiscord:"https://discord.gg/jnRs4WnPjM",tsDiscord:"https://discord.gg/wqmAVvgSbE",chrome:"https://chrome.google.com/webstore/detail/turntable-tweaks/pmlkackfnbbnjfejpddpakallilkbdme",firefox:"https://addons.mozilla.org/en-US/firefox/addon/turnstyles-for-turntable-fm/",website:"https://ts.pixelcrisis.co"}})),B=t((function(t,e){t.exports=t=>{t.initConfig=function(){this.__logo=this.__base+"/images/icon128.png";let t=this.readConfig();this.config={...this.default,...t},this.config.version=j({}).version,this.config.is_afk=!1,this.Emit("loaded",this.config)},t.Attach=function(){this.config||this.initConfig();const e=window.turntable;if(!e)return this.Err("no room");if(this.lobby=$("#turntable #topBG").length,this.lobby)return this.Emit("lobby");const i=()=>setTimeout(t.Attach.bind(this),150);if(!window.turntable.user)return i();let o=n(e,"roomId");return o&&n(o,"roomData")?(this.listener=this.listen.bind(this),window.turntable.addEventListener("message",this.listener),this.Emit("attach",o),void this.Ran("[turnStyles] attached!")):i()}};const n=(t,e)=>{for(let i in t)if(null!=(n=t[i])&&n[e])return t[i];var n}})),j=t((function(t,e){t.exports={version:"11.0.2"}})),_=t((function(t,e){t.exports=t=>{t.Reload=function(){clearInterval(this.looping),$('script[src*="turnStyles.js"]').remove(),window.turntable.removeEventListener("message",this.listener);let t=document.createElement("script");t.src=`${this.__base}/turnStyles.js?v=${Math.random()}`,t.type="text/javascript",this.Ran("reloading turnStyles"),document.body.append(t)},t.reloadMusic=function(){let t=window.youtube,e=window.soundcloudplayer;e.song&&(e.songTime=e.player.currentTime()/1e3,e.previewStartTime=Date.now()-1e3,e.resumeSong(e.song)),t.song&&(t.songTime=t.player[0].getCurrentTime(),t.previewStartTime=Date.now()-3e3,t.resumeSong(t.song)),$("#tsPanel").removeClass("active")}}})),T=t((function(t,e){t.exports=t=>{t.Notify=function(t){if(!this.canNotify()||document.hasFocus())return;let{head:e,body:n,type:i}=t,o=()=>{let t=this.__logo,i=new Notification(e,{icon:t,body:n});i.onclick=()=>{window.focus(),i.close()}};i?this.Delay(o,i):o()},t.canNotify=function(){let t=this.config.notify;return!(!(t.chat||t.song||t.ding)||!("Notification"in window)||"denied"===Notification.permission||"default"===Notification.permission&&(this.Ran("[notify] asking permission"),Notification.requestPermission(),1))},t.bindNotify=function(){this.Bind("update",this.canNotify),this.canNotify()}}})),D=t((function(t,e){t.exports=t=>{t.Post=function(t){$(".chat .messages").append(n(t)),this.View().updateChatScroll()},t.Chat=function(t){window.turntable.sendMessage({text:t,api:"room.speak",roomid:this.View().roomId,section:this.View().section})},t.Batch=function(t){if(!t)return!1;if((t=t.split(";;")).length>3)this.Post(i);else for(let e of t)this.Chat(e.trim())},t.Bully=function(t){this.Post(t),this.Notify(t)},t.Share=()=>{window.confirm(o)&&(t.Batch(s.join(";;")),$("#tsWindow").removeClass("active"))}};const n=t=>`\n
\n ${t.head||""}\n ${t.body||""}\n
\n`,i={head:"Too Many Messages!",body:"Can only send up to 3 messages at a time!"},o="Share turnStyles in the room chat?",s=["Check out turnStyles!","Autobop, Emotes, Themes, & More!","Get it @ https://ts.pixelcrisis.co"]})),q=t((function(t,e){t.exports=t=>{t.logJoin=function(t){for(let e of t.user)this.Log("[join] "+e.name,e.userid)},t.logLeft=function(t){for(let e of t.user)this.Log("[left] "+e.name,e.userid)},t.logNewDJ=function(t){let e=t.user[0].userid,n=this.findName(e);this.Log("[new dj] "+n,e)},t.logOldDJ=function(t){let e=t.user[0].userid,n=this.findName(e);this.Log("[old dj] "+n,e)},t.logVote=function(t){let e=t.room.metadata.votelog,n=e[e.length-1],i=(n[0],n[1]),o=this.findName(n[0]);this.Log(`[vote] ${o}: ${i}`)},t.logConfig=function(t,e){this.Log(`[config] ${t}: ${e}`)},t.bindDebugs=function(){this.Bind("add_dj",this.logNewDJ),this.Bind("rem_dj",this.logOldDJ),this.Bind("update",this.logConfig),this.Bind("registered",this.logJoin),this.Bind("deregistered",this.logLeft),this.Bind("update_votes",this.logVote)}}})),P=t((function(t,e){t.exports=t=>{t.Log=(e,n)=>t.Logger("log",e,n),t.Ran=(e,n)=>t.Logger("ran",e,n),t.Err=(e,n)=>t.Logger("err",e,n),t.Logger=function(t,e,n){let i=!this.config||this.config.debug,o=i||"log"!=t,s=`tS [${this.time()}] ${e} ${n||""}`;i&&console.info(s),o&&this.postLog(t,e,n)},t.postLog=function(t,e,n){this.logBook=this.logBook||[],this.logBook.length>49&&this.logBook.shift();let o={type:t,text:e,info:n,time:this.time()};this.logBook.push(i(o));let s=$("#tsLogs")[0]||{},a=[...this.logBook].reverse();s.innerHTML=a.join(""),s.scrollTop=s.scrollHeight},t.bindLogger=function(){$("#tsLogBook").remove(),$(".room-info-nav").after(n)}};const n='\n\t
\n\t\t

tS Room Logs

\n\t\t
\n\t
',i=t=>`\n\t
\n\t\t
${o(t.text)}
\n\t\t
\n\t\t\t${t.time}\n\t\t\t${t.info||""}\n\t\t
\n\t
`,o=t=>t})),L=t((function(t,e){t.exports=t=>{t.Loop=function(){let t=this.config.timing.beat,e=parseInt(t)+1;this.config.timing.beat=e,this.Emit("loop",e)},t.bindLoop=function(){let t=this.Loop.bind(this);this.looping=setInterval(t,6e4)},t.Delay=function(t,e){if(this.holding||(this.holding={}),this.holding[e])return!1;this.holding[e]=setTimeout((()=>{delete this.holding[e]}).bind(this),5e3),t&&t()}}})),A=t((function(t,e){t.exports=t=>{t.Bind=function(t,e){this.events||(this.events={}),this.events[t]||(this.events[t]=[]),this.events[t].push(e.bind(this))},t.Emit=function(t,...e){let n=this.events[t];if(n)for(let i of n)i(...e)},t.listen=function(t){t.command&&(t.$ping=this.findPing(t.text),t.$name=this.findName(t.userid),t.$from=this.findName(t.senderid),t.$self=this.User().id==t.userid,this.Emit(t.command,t))},t.watcher=function(e){for(let n of e){let e=n.target,i=e.className,o="TITLE"==e.nodeName;if("songs"==i&&t.Emit("playlist"),"messages"==i&&t.Emit("newchat",e),"typeahead"==i&&t.Emit("typeahead"),o&&e.baseURI.indexOf("profile/")>-1){let n=e.baseURI.split("profile/")[1];t.Emit("profile",n)}}},t.bindWatcher=function(){let t=window.MutationObserver;t||(t=window.WebKitMutationObserver),new t(this.watcher).observe(document,{subtree:!0,childList:!0})}}})),N=t((function(t,e){t.exports=t=>{t.User=()=>window.turntable.user,t.View=()=>window.turntable.topViewController,t.Chat=()=>window.turntable.buddyList.pmWindows,t.Room=()=>window.turntable.topViewController.roomData,t.time=function(t){let e=(new Date).toLocaleTimeString("en-us"),n=e.split(":").slice(0,2).join(":");return t?n:e},t.cap=t=>t[0].toUpperCase()+t.substring(1),t.findName=function(t="Unknown"){let e=this.View().userMap[t];if(e)return e.attributes.name;let n=!!this.Chat()&&this.Chat()[t];return n?n.otherUser.attributes.name:t},t.findPing=function(t=""){let e="@"+this.User().attributes.name;return t.toLowerCase().indexOf(e.toLowerCase())>-1},t.bodyClass=function(t,e){let n=$("body").hasClass(t);e&&!n&&$("body").addClass(t),!e&&n&&$("body").removeClass(t)}}}));let E=window.$tS={};var M;M=E,N({})(M),A({})(M),L({})(M),P({})(M),q({})(M),D({})(M),T({})(M),_({})(M),B({})(M),M.Bind("lobby",(function(){this.bindLogger(),this.bindDebugs()})),M.Bind("attach",(function(t){this.bindWatcher(t),this.bindLoop(t),this.bindLogger(t),this.bindDebugs(t),this.bindNotify(t)})),(t=>{t.static=C({}),t.twitchIcons=S({}),t.bttvIcons=x({});let e=v({});t.default=e.default,t.options=e.options,k({})(t),w({})(t),y({})(t),t.Bind("attach",(function(t){this.bindSession(t)}))})(E),(t=>{m({})(t),g({})(t),p({})(t),b({})(t),t.openPanels=()=>$("#tsWindow").addClass("active"),t.closePanels=()=>$("#tsWindow").removeClass("active"),t.bindInputs=function(){this.bindHotBar(),this.bindPanels()},t.Bind("lobby",t.bindInputs),t.Bind("attach",t.bindInputs)})(E),(t=>{u({})(t),f({})(t),h({})(t),c({})(t),d({})(t),r({})(t),l({})(t),a({})(t),s({})(t),o({})(t),i({})(t),n({})(t),e({})(t),t.Bind("loaded",(function(t){this.loadTheme(t),this.loadClass(t)})),t.Bind("lobby",(function(){this.bindTheme(),this.bindClass()})),t.Bind("attach",(function(t){this.bindTheme(t),this.bindClass(t),this.bindVolume(t),this.bindChat(t),this.bindPlaylist(t),this.bindAutobop(t),this.bindAlerts(t),this.bindStats(t),this.bindAway(t),this.bindReminder(t),this.bindDecks(t),this.bindEmotes(t)}))})(E);const I="https://ts.pixelcrisis.co",R=`Oops! Something went wrong with turnStyles! \nIf this is a bookmarklet, you may need to update it.\nTo update, view the ts website at ${I} \nClicking OK will attempt to open the turnStyles website in a new tab.`;(()=>{if(E.__base=window.localStorage.getItem("tsBase"),E.__sync=window.localStorage.getItem("tsSync"),"undefined"===E.__sync&&(E.__sync="{}"),window.localStorage.removeItem("tsBase"),window.localStorage.removeItem("tsSync"),!E.__base){let t=()=>window.open(I,"_blank");return window.confirm(R)&&t(),!1}E.Attach()})()}(); \ No newline at end of file diff --git a/chrome/manifest.json b/chrome/manifest.json index b0ca7f9..ea0f80b 100644 --- a/chrome/manifest.json +++ b/chrome/manifest.json @@ -1,6 +1,6 @@ { "name": "turnStyles for turntable.fm", - "version": "11.0.1", + "version": "11.0.2", "description": "Apply tweaks to turntable.fm - autobop, autodj, themes, styles, and more!", "manifest_version": 2, "icons": { diff --git a/package.json b/package.json index 1805fda..fa2510d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "turnStyles", - "version": "11.0.1", + "version": "11.0.2", "main": "turnStyles.js", "repository": "git@github.com:pixelcrisis/turntable-tweaks.git", "author": "pixelcrisis ",