1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-07-05 10:38:30 +00:00

3.5.217. Well, this commit is a bit late. Look at changelog.html for details on each version's changes.

This commit is contained in:
SirStendec 2016-06-22 14:23:03 -04:00
parent 2f7dc1d8d3
commit 8cfef363f1
22 changed files with 634 additions and 191 deletions

View file

@ -3,6 +3,7 @@ var FFZ = window.FrankerFaceZ,
constants = require("./constants"),
helpers,
conv_helpers,
emote_helpers,
EXPLANATION_WARN = '<hr>This link has been sent to you via a whisper rather than standard chat, and has not been checked or approved of by any moderators or staff members. Please treat this link with caution and do not visit it if you do not trust the sender.',
@ -160,6 +161,12 @@ FFZ.prototype.setup_tokenization = function() {
this.error("Unable to get conversation helper functions.", err);
}
try {
emote_helpers = window.require && window.require("web-client/utilities/tmi-emotes").default;
} catch(err) {
this.error("Unable to get tmi-emotes helper function.", err);
}
this.log("Hooking Ember chat line helpers.");
var f = this;
@ -395,6 +402,9 @@ FFZ.prototype.tokenize_conversation_line = function(message, prevent_notificatio
if ( conv_helpers && conv_helpers.checkActionMessage )
tokens = conv_helpers.checkActionMessage(tokens);
if ( emote_helpers )
emotes = emote_helpers(emotes);
// Standard Tokenization
if ( helpers && helpers.linkifyMessage )
tokens = helpers.linkifyMessage(tokens);
@ -775,8 +785,8 @@ FFZ.prototype.render_token = function(render_links, warn_links, token) {
}
else if ( token.type === "deleted" )
return '<span class="deleted-word tooltip" title="' + utils.quote_attr(token.text) + '" data-text="' + utils.sanitize(token.text) + '">&times;&times;&times;</span>';
//return `<span class="deleted-word tooltip" title="${utils.quote_attr(token.text)}" data-text="${utils.sanitize(token.text)}">&times;&times;&times;</span>`;
return '<span class="deleted-word html-tooltip" title="' + utils.quote_san(token.text) + '" data-text="' + utils.sanitize(token.text) + '">&times;&times;&times;</span>';
//return `<span class="deleted-word html-tooltip" title="${utils.quote_attr(token.text)}" data-text="${utils.sanitize(token.text)}">&times;&times;&times;</span>`;
else if ( token.type === "mention" )
return '<span class="' + (token.isOwnMessage ? 'mentioning' : 'mentioned') + '">' + utils.sanitize(token.user) + '</span>';