mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-10-18 17:02:00 +00:00
Add getEmotes method to simplify getting a list of sets. Make the /ffz command with no arguments display the UI. Add analytics support. Restructured emoticons file. Fix cache bug with Feature Friday. Add massmod and massunmod commands.
This commit is contained in:
parent
2ee748dc6f
commit
2c3af2d51e
12 changed files with 611 additions and 121 deletions
|
@ -105,12 +105,10 @@ FFZ.chat_commands.capitalization.help = "Usage: /ffz capitalization <on|off>\nEn
|
|||
FFZ.prototype._emoticonize = function(controller, tokens) {
|
||||
var room_id = controller.get("parentController.model.id"),
|
||||
user_id = controller.get("model.from"),
|
||||
user = this.users[user_id],
|
||||
room = this.rooms[room_id],
|
||||
f = this;
|
||||
|
||||
// Get our sets.
|
||||
var sets = _.union(user && user.sets || [], room && room.sets || [], f.global_sets),
|
||||
var sets = this.getEmotes(user_id, room_id),
|
||||
emotes = [];
|
||||
|
||||
// Build a list of emotes that match.
|
||||
|
|
|
@ -70,8 +70,14 @@ FFZ.prototype.run_command = function(text, room_id) {
|
|||
if ( ! room || !room.room )
|
||||
return;
|
||||
|
||||
if ( ! text )
|
||||
if ( ! text ) {
|
||||
// Try to pop-up the menu.
|
||||
var link = document.querySelector('a.ffz-ui-toggle');
|
||||
if ( link )
|
||||
return link.click();
|
||||
|
||||
text = "help";
|
||||
}
|
||||
|
||||
var args = text.split(" "),
|
||||
cmd = args.shift().toLowerCase();
|
||||
|
|
17
src/ember/router.js
Normal file
17
src/ember/router.js
Normal file
|
@ -0,0 +1,17 @@
|
|||
var FFZ = window.FrankerFaceZ;
|
||||
|
||||
|
||||
// --------------------
|
||||
// Initialization
|
||||
// --------------------
|
||||
|
||||
FFZ.prototype.setup_router = function() {
|
||||
this.log("Hooking the Ember router.");
|
||||
|
||||
var f = this;
|
||||
App.__container__.lookup('router:main').reopen({
|
||||
ffzTransition: function() {
|
||||
f.track_page();
|
||||
}.on('didTransition')
|
||||
});
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue