1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-07-26 04:28:31 +00:00

I really need to remember to commit more frequently.

This commit is contained in:
SirStendec 2016-03-23 19:28:22 -04:00
parent 800553c602
commit d55af32b4e
45 changed files with 4777 additions and 2913 deletions

View file

@ -14,7 +14,7 @@ var FFZ = window.FrankerFaceZ,
// API Constructor
// ---------------------
var API = FFZ.API = function(instance, name, icon) {
var API = FFZ.API = function(instance, name, icon, version) {
this.ffz = instance || FFZ.get();
// Check for a known API!
@ -54,12 +54,13 @@ var API = FFZ.API = function(instance, name, icon) {
this.name = name || ("Extension#" + this.id);
this.icon = icon || null;
this.version = version || null;
this.ffz.log('Registered New Extension #' + this.id + ': ' + this.name);
};
FFZ.prototype.api = function(name, icon) {
FFZ.prototype.api = function(name, icon, version) {
// Load the known APIs list.
if ( ! this._known_apis ) {
this._known_apis = {};
@ -71,7 +72,7 @@ FFZ.prototype.api = function(name, icon) {
}
}
return new API(this, name, icon);
return new API(this, name, icon, version);
}
@ -163,6 +164,15 @@ API.prototype._load_set = function(real_id, set_id, data) {
else
new_emote.regex = new RegExp("(^|\\W|\\b)(" + utils.escape_regex(emote.name) + ")(?=\\W|$)", "g");
new_emote.token = {
type: "emoticon",
srcSet: new_emote.srcSet,
imgSrc: new_emote.urls[1],
ffzEmote: id,
ffzEmoteSet: real_id,
altText: new_emote.hidden ? '???' : new_emote.name
};
output_css += build_css(new_emote);
emote_set.count++;
emoticons[id] = new_emote;