if("youtube"==n.type)t="<b>YouTube: "+s.sanitize(n.title)+"</b><hr>",t+="Channel: "+s.sanitize(n.channel)+" | "+s.time_to_string(n.duration)+"<br>",t+=s.number_commas(n.views||0)+" Views | 👍 "+s.number_commas(n.likes||0)+" 👎 "+s.number_commas(n.dislikes||0);elseif("strawpoll"==n.type){t="<b>Strawpoll: "+s.sanitize(n.title)+"</b><hr><table><tbody>";for(variinn.items){{varo=n.items[i];Math.floor(o/n.total*100)}t+='<tr><td style="text-align:left">'+s.sanitize(i)+'</td><td style="text-align:right">'+s.number_commas(o)+"</td></tr>"}t+="</tbody></table><hr>Total: "+s.number_commas(n.total);vara=s.parse_date(n.fetched);if(a){varr=Math.floor((a.getTime()-Date.now())/1e3);r>60&&(t+="<br><small>Data was cached "+s.time_to_string(r)+" ago.</small>")}}elseif("twitch"==n.type){t="<b>Twitch: "+s.sanitize(n.display_name)+"</b><hr>";varc=s.parse_date(n.since);c&&(t+="Member Since: "+s.date_string(c)+"<br>"),t+="<nobr>Views: "+s.number_commas(n.views)+"</nobr> | <nobr>Followers: "+s.number_commas(n.followers)+"</nobr>"}elseif("twitch_vod"==n.type)t="<b>Twitch "+("highlight"==n.broadcast_type?"Highlight":"Broadcast")+": "+s.sanitize(n.title)+"</b><hr>",t+="By: "+s.sanitize(n.display_name)+(n.game?" | Playing: "+s.sanitize(n.game):" | Not Playing")+"<br>",t+="Views: "+s.number_commas(n.views)+" | "+s.time_to_string(n.length);elseif("twitter"==n.type)t="<b>Tweet By: "+s.sanitize(n.user)+"</b><hr>",t+=s.sanitize(n.tweet);elseif("reputation"==n.type){if(t='<span style="word-wrap: break-word">'+s.sanitize(n.full.toLowerCase())+"</span>",n.trust<50||n.safety<50||n.tags&&n.tags.length>0){t+="<hr>";varl=!1;(n.trust<50||n.safety<50)&&(n.unsafe=!0,t+="<b>Potentially Unsafe Link</b><br>",t+="Trust: "+n.trust+"% | Child Safety: "+n.safety+"%",l=!0),n.tags&&n.tags.length>0&&(t+=(l?"<br>":"")+"Tags: "+n.tags.join(", ")),t+="<br>Data Source: WOT"}}elsen.full&&(t='<span style="word-wrap: break-word">'+s.sanitize(n.full.toLowerCase())+"</span>");returnt||(t='<span style="word-wrap: break-word">'+s.sanitize(e.toLowerCase())+"</span>"),n.tooltip=t,t},f=function(e,t,n){if(t){this._link_data[e]=n,n.unsafe=!1;vars,i=d.bind(this)(e),o="/"==e.charAt(e.length-1)?e.substr(0,e.length-1):null;if(s=document.querySelectorAll(o?'span.message a[href="'+e+'"], span.message a[href="'+o+'"], span.message a[data-url="'+e+'"], span.message a[data-url="'+o+'"]':'span.message a[href="'+e+'"], span.message a[data-url="'+e+'"]'),this.settings.link_info)for(vara=0;a<s.length;a++)n.unsafe&&s[a].classList.add("unsafe-link"),s[a].classList.contains("deleted-link")||(s[a].title=i)}};n.settings_info.banned_words={type:"button",value:[],category:"Chat",no_bttv:!0,name:"Banned Words",help:"Set a list of words that will be locally removed from chat messages.",method:function(){vare=this.settings.banned_words.join(", "),t=prompt("Banned Words\n\nPlease enter a comma-separated list of words that you would like to be removed from chat messages.",e);if(null!==t&&void0!==t){t=t.trim().split(o);for(varn=[],s=0;s<t.length;s++)t[s]&&n.push(t[s]);1==n.length&&"disable"==n[0]&&(n=[]),this.settings.set("banned_words",n)}}},n.settings_info.keywords={type:"button",value:[],category:"Chat",no_bttv:!0,name:"Highlight Keywords",help:"Set additional keywords that will be highlighted in chat.",method:function(){vare=this.settings.keywords.join(", "),t=prompt("Highlight Keywords\n\nPlease enter a comma-separated list of words that you would like to be highlighted in chat.",e);if(null!==t&&void0!==t){t=t.trim().split(o);for(varn=[],s=0;s<t.length;s++)t[s]&&n.push(t[s]);1==n.length&&"disable"==n[0]&&(n=[]),this.settings.set("keywords",n)}}},n.settings_info.fix_color={type:"boolean",value:!0,category:"Chat",no_bttv:!0,name:"Adjust Username Colors",help:"Ensure that username colors contrast with the background enough to be readable.",on_update:function(e){this.has_bttv||document.body.classList.toggle("ffz-chat-colors",e)}},n.settings_info.link_info={type:"boolean",value:!0,category:"Chat",no_bttv:!0,name:"Link Tooltips <span>Beta</span>",help:"Checklinksagainstknownb
},t.prototype.setup_emote_menu=function(e){this.log("Emote Menu for Twitch was detected after "+e+"ms. Registering emote enumerator."),emoteMenu.registerEmoteGetter("FrankerFaceZ",this._emote_menu_enumerator.bind(this))},t.prototype._emote_menu_enumerator=function(){for(vare=this.get_user(),n=e?e.login:null,s=App.__container__.lookup("controller:chat"),i=s?s.get("currentRoom.id"):null,o=this.getEmotes(n,i),a=[],r=0;r<o.length;r++){varc=this.emote_sets[o[r]];if(c&&c.emoticons)for(varlinc.emoticons)if(c.emoticons.hasOwnProperty(l)){varu=c.emoticons[l];if(!u.hidden){varh=c.title,d=c.icon||null;h=h?"FrankerFaceZ: "+h:"global"==c.id?"FrankerFaceZ Global Emotes":"globalevent"==c.id?"FrankerFaceZ Event Emotes":this.feature_friday&&c.id==this.feature_friday.set?"FrankerFaceZ "+this.feature_friday.title+": "+this.feature_friday.display_name:"FrankerFaceZ Set: "+t.get_capitalization(c.id),a.push({text:u.name,url:u.urls[1],hidden:!1,channel:h,badge:d})}}}returna}},{}],14:[function(t){varn=e.FrankerFaceZ=function(){n.instance=this,this._log_data=[],this.initialize()};n.get=function(){returnn.instance};vars=n.version_info={major:3,minor:4,revision:2,toString:function(){return[s.major,s.minor,s.revision].join(".")+(s.extra||"")}};n.prototype.log=function(e,t,n,s){e="FFZ: "+e+(n?" -- "+JSON.stringify(t):""),this._log_data.push(e+(!n&&s?" -- "+JSON.stringify(t):"")),void0!==t&&console.groupCollapsed&&console.dir?(console.groupCollapsed(e),-1!==navigator.userAgent.indexOf("Firefox/")?console.log(t):console.dir(t),console.groupEnd(e)):console.log(e)},n.prototype.error=function(e,t,n){e="FFZ Error: "+e+(n?" -- "+JSON.stringify(t):""),this._log_data.push(e),void0!==t&&console.groupCollapsed&&console.dir?(console.groupCollapsed(e),-1!==navigator.userAgent.indexOf("Firefox/")?console.log(t):console.dir(t),console.groupEnd(e)):console.assert(!1,e)},n.prototype.paste_logs=function(){this._pastebin(this._log_data.join("\n"),function(e){returne?voidconsole.log("FFZ: Your FrankerFaceZ log has been pasted to: "+e):console.log("FFZ Error: Unable to upload log to pastebin.")})},n.prototype._pastebin=function(e,t){jQuery.ajax({url:"http://putco.de/",type:"PUT",data:e,context:this}).success(function(e){t.bind(this)(e.trim()+".log")}).fail(function(){t.bind(this)(null)})},n.prototype.get_user=function(){if(e.PP&&PP.login)returnPP;if(e.App){vart=App.__container__.lookup("controller:login");returnt?t.get("userData"):void0}},t("./ui/menu"),t("./settings"),t("./socket"),t("./emoticons"),t("./badges"),t("./tokenize"),t("./ember/channel"),t("./ember/room"),t("./ember/line"),t("./ember/chatview"),t("./ember/viewers"),t("./ember/moderation-card"),t("./debug"),t("./ext/betterttv"),t("./ext/emote_menu"),t("./featurefriday"),t("./ui/styles"),t("./ui/dark"),t("./ui/notifications"),t("./ui/viewer_count"),t("./ui/sub_count"),t("./ui/menu_button"),t("./ui/races"),t("./ui/my_emotes"),t("./ui/about_page"),t("./commands"),n.prototype.initialize=function(t,n){if(/^\/(?:settings|m\/|messages?\/)/.test(location.pathname))returnvoidthis.setup_normal(n);if(/\/[A-Za-z_-]+\/dashboard/.test(location.pathname)&&!/bookmarks$/.test(location.pathname))returnvoidthis.setup_dashboard(n);vars=void0!=e.App&&void0!=App.__container__&&void0!=App.__container__.resolve("model:room");returns?voidthis.setup_ember(n):(t=t||10,void(n>=6e4?this.log('Twitch application not detected in "'+location.toString()+'". Aborting.'):setTimeout(this.initialize.bind(this,t,(n||0)+t),t)))},n.prototype.setup_normal=function(t){vars=e.performance&&performance.now?performance.now():Date.now();this.log("Found non-Ember Twitch after "+(t||0)+' ms in "'+location+'". Initializing FrankerFaceZ version '+n.version_info),this.users={},this.load_settings(),this.setup_dark(),this.ws_create(),this.setup_emoticons(),this.setup_badges(),this.setup_notifications(),this.setup_css(),this.setup_menu(),this.find_bttv(10);vari=e.performance&&performance.now?performance.now():Date.now(),o=i-s;this.log("Initialization complete in "+o+"ms")},n.prototype.is_dashboard=!1,n.prototype.setup_dashboard=func
if(d&&d.emoticons)for(var_ind.emoticons)d.emoticons.hasOwnProperty(_)&&!d.emoticons[_].hidden&&u.push(d.emoticons[_])}u.sort(function(e,t){varn=e.name.toLowerCase(),s=t.name.toLowerCase();returns>n?-1:n>s?1:0});for(varh=0;h<u.length;h++){varf=u[h],m=null;(f.urls[2]||f.urls[4])&&(m='url("'+f.urls[1]+'") 1x',f.urls[2]&&(m+=', url("'+f.urls[2]+'") 2x'),f.urls[4]&&(m+=', url("'+f.urls[4]+'") 4x')),r++;varl=document.createElement("span");if(l.className="emoticon tooltip",l.style.backgroundImage='url("'+f.urls[1]+'")',m){varp="image-set("+m+")";l.style.backgroundImage="-webkit-"+p,l.style.backgroundImage="-moz-"+p,l.style.backgroundImage="-ms-"+p,l.style.backgroundImage=p}l.style.width=f.width+"px",l.style.height=f.height+"px",l.title=this._emote_tooltip(f),l.addEventListener("click",this._add_emote.bind(this,t,f.name)),a.appendChild(l)}r||(a.innerHTML+="This channel has no emoticons.",a.className="emoticon-grid ffz-no-emotes center"),e.appendChild(a)},n.prototype._add_emote=function(e,t){varn,s,i;this.has_bttv?(n=e.get("element").querySelector("textarea"),s=n.value):(i=e.get("controller.currentRoom"),s=i.get("messageToSend")||""),s+=(s&&" "!==s.substr(-1)?" ":"")+(t.name||t),n?n.value=s:i.set("messageToSend",s)}},{"../constants":3,"../utils":29}],22:[function(t){varn=e.FrankerFaceZ,s=t("../constants");n.prototype.build_ui_link=function(e){vart=document.createElement("a");returnt.className="ffz-ui-toggle",t.innerHTML=s.CHAT_BUTTON,t.addEventListener("click",this.build_ui_popup.bind(this,e)),this.update_ui_link(t),t},n.prototype.update_ui_link=function(t){varn=e.App&&App.__container__.lookup("controller:chat");if(t=t||document.querySelector("a.ffz-ui-toggle"),t&&n){vars=n.get("currentRoom.id"),i=this.rooms[s],o=!1,a=this.has_bttv?BetterTTV.settings.get("darkenedMode"):!1,r=this.has_bttv?BetterTTV.settings.get("showBlueButtons"):!1,c=this.feature_friday&&this.feature_friday.live;if(i&&i.set){varl=this.emote_sets[i.set];l&&l.count>0&&(o=!0)}t.classList.toggle("no-emotes",!o),t.classList.toggle("live",c),t.classList.toggle("dark",a),t.classList.toggle("blue",r)}}},{"../constants":3}],23:[function(t){varn=e.FrankerFaceZ,s=t("../constants"),i=t("../utils"),o="http://static-cdn.jtvnw.net/emoticons/v1/",a={"#-?[\\\\/]":"#-/",":-?(?:7|L)":":-7","\\<\\;\\]":"<]","\\:-?(S|s)":":-S","\\:-?\\\\":":-\\","\\:\\>\\;":":>","B-?\\)":"B-)","\\:-?[z|Z|\\|]":":-Z","\\:-?\\)":":-)","\\:-?\\(":":-(","\\:-?(p|P)":":-P","\\;-?(p|P)":";-P","\\<\\;3":"<3","\\:-?[\\\\/]":":-/","\\;-?\\)":";-)","R-?\\)":"R-)","[o|O](_|\\.)[o|O]":"O.o","\\:-?D":":-D","\\:-?(o|O)":":-O","\\>\\;\\(":">(","Gr(a|e)yFace":"GrayFace"},r=function(e){vart=App.__container__.lookup("controller:chat"),n=t.get("currentRoom.id"),s=e.rooms[n],i=s?s.room.tmiSession:null,o=i&&i._emotesParser&&i._emotesParser.emoticonSetIds||"0",a=e.get_user(),r=a&&e.users[a.login]&&e.users[a.login].sets||[];returno=o.split(",").removeObject("0"),e.settings.global_emotes_in_menu&&(o.push("0"),r=_.union(r,e.default_sets)),[o,r]};n.settings_info.global_emotes_in_menu={type:"boolean",value:!1,name:"Display Global Emotes in My Emotes",help:"Display the global Twitch emotes in the My Emoticons menu."},n.prototype.setup_my_emotes=function(){if(this._twitch_set_to_channel={},this._twitch_badges={},localStorage.ffzTwitchSets)try{this._twitch_set_to_channel=JSON.parse(localStorage.ffzTwitchSets),this._twitch_badges=JSON.parse(localStorage.ffzTwitchBadges)}catch(e){}this._twitch_set_to_channel[0]="global",this._twitch_set_to_channel[33]="tfaces",this._twitch_set_to_channel[42]="tfaces",this._twitch_badges.global="//cdn.frankerfacez.com/script/twitch_logo.png",this._twitch_badges.tfaces=this._twitch_badges.turbo="//cdn.frankerfacez.com/script/turbo_badge.png"},n.menu_pages.my_emotes={name:"My Emoticons",icon:s.EMOTE,visible:function(){vare=r(this);returne[0].length>0||e[1].length>0},render:function(e,t){vars=e.get("controller.currentRoom.tmiSession"),i=(s&&s.getEmotes()||{emoticon_sets:{}}).emoticon_sets,o=[];for(varaini)i.hasOwnProperty(a)&&!this._twitch_set_to_channel.hasOwnPropert