1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-07-29 14:08:31 +00:00

Attempt to make FrankerFaceZ work with the expected Twitch changes given what I've learned through emails with Twitch staff.

This commit is contained in:
SirStendec 2015-01-12 18:18:23 -05:00
parent 2e37e1970c
commit f554bc8f61
5 changed files with 35 additions and 9 deletions

View file

@ -14,6 +14,8 @@ FFZ.prototype.setup_line = function() {
Line.reopen({
tokenizedMessage: function() {
// Add our own step to the tokenization procedure.
var tokens = f._emoticonize(this, this._super());
f.log("Chat Tokens", tokens);
return f._emoticonize(this, this._super());
}.property("model.message", "isModeratorOrHigher", "controllers.emoticons.emoticons.[]")
@ -80,7 +82,8 @@ FFZ.prototype._emoticonize = function(controller, tokens) {
// with an object telling Twitch's line template how to render the
// emoticon.
_.each(emotes, function(emote) {
var eo = {isEmoticon:true, cls: emote.klass};
//var eo = {isEmoticon:true, cls: emote.klass};
var eo = {emoticonSrc: emote.url, altText: emote.name};
tokens = _.compact(_.flatten(_.map(tokens, function(token) {
if ( _.isObject(token) )