1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-08-20 21:10:54 +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

@ -73,13 +73,22 @@ FFZ.prototype.unload_set = function(set_id) {
}
var build_css = function(emote) {
var build_legacy_css = function(emote) {
var margin = emote.margins;
if ( ! margin )
margin = ((emote.height - 18) / -2) + "px 0";
return ".ffz-emote-" + emote.id + ' { background-image: url("' + emote.url + '"); height: ' + emote.height + "px; width: " + emote.width + "px; margin: " + margin + (emote.extra_css ? "; " + emote.extra_css : "") + "}\n";
}
var build_css = function(emote) {
if ( ! emote.margins && ! emote.extra_css )
return "";
return 'img[src="' + emote.url + '"] { ' + (emote.margins ? "margin: " + emote.margins + ";" : "") + (emote.extra_css || "") + " }\n";
}
FFZ.prototype._load_set_json = function(set_id, callback, data) {
// Store our set.
this.emote_sets[set_id] = data;