mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-08-06 14:20:56 +00:00
Convert all files to UNIX line endings. Why do I never pay attention to that when starting a project? ;_;
This commit is contained in:
parent
3d3c1f9716
commit
343a9c927b
21 changed files with 3095 additions and 3087 deletions
|
@ -1,50 +1,50 @@
|
|||
var FFZ = window.FrankerFaceZ,
|
||||
constants = require('../constants');
|
||||
|
||||
// --------------------
|
||||
// Initialization
|
||||
// --------------------
|
||||
|
||||
FFZ.prototype.build_ui_link = function(view) {
|
||||
var link = document.createElement('a');
|
||||
link.className = 'ffz-ui-toggle';
|
||||
link.innerHTML = constants.CHAT_BUTTON;
|
||||
|
||||
link.addEventListener('click', this.build_ui_popup.bind(this, view));
|
||||
|
||||
this.update_ui_link(link);
|
||||
return link;
|
||||
}
|
||||
|
||||
|
||||
FFZ.prototype.update_ui_link = function(link) {
|
||||
var controller = App.__container__.lookup('controller:chat');
|
||||
link = link || document.querySelector('a.ffz-ui-toggle');
|
||||
if ( !link || !controller )
|
||||
return;
|
||||
|
||||
var room_id = controller.get('currentRoom.id'),
|
||||
room = this.rooms[room_id],
|
||||
has_emotes = false,
|
||||
|
||||
dark = (this.has_bttv ? BetterTTV.settings.get('darkenedMode') : false),
|
||||
blue = (this.has_bttv ? BetterTTV.settings.get('showBlueButtons') : false),
|
||||
live = (this.feature_friday && this.feature_friday.live);
|
||||
|
||||
|
||||
// Check for emoticons.
|
||||
if ( room && room.sets.length ) {
|
||||
for(var i=0; i < room.sets.length; i++) {
|
||||
var set = this.emote_sets[room.sets[i]];
|
||||
if ( set && set.count > 0 ) {
|
||||
has_emotes = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
link.classList.toggle('no-emotes', ! has_emotes);
|
||||
link.classList.toggle('live', live);
|
||||
link.classList.toggle('dark', dark);
|
||||
link.classList.toggle('blue', blue);
|
||||
var FFZ = window.FrankerFaceZ,
|
||||
constants = require('../constants');
|
||||
|
||||
// --------------------
|
||||
// Initialization
|
||||
// --------------------
|
||||
|
||||
FFZ.prototype.build_ui_link = function(view) {
|
||||
var link = document.createElement('a');
|
||||
link.className = 'ffz-ui-toggle';
|
||||
link.innerHTML = constants.CHAT_BUTTON;
|
||||
|
||||
link.addEventListener('click', this.build_ui_popup.bind(this, view));
|
||||
|
||||
this.update_ui_link(link);
|
||||
return link;
|
||||
}
|
||||
|
||||
|
||||
FFZ.prototype.update_ui_link = function(link) {
|
||||
var controller = App.__container__.lookup('controller:chat');
|
||||
link = link || document.querySelector('a.ffz-ui-toggle');
|
||||
if ( !link || !controller )
|
||||
return;
|
||||
|
||||
var room_id = controller.get('currentRoom.id'),
|
||||
room = this.rooms[room_id],
|
||||
has_emotes = false,
|
||||
|
||||
dark = (this.has_bttv ? BetterTTV.settings.get('darkenedMode') : false),
|
||||
blue = (this.has_bttv ? BetterTTV.settings.get('showBlueButtons') : false),
|
||||
live = (this.feature_friday && this.feature_friday.live);
|
||||
|
||||
|
||||
// Check for emoticons.
|
||||
if ( room && room.sets.length ) {
|
||||
for(var i=0; i < room.sets.length; i++) {
|
||||
var set = this.emote_sets[room.sets[i]];
|
||||
if ( set && set.count > 0 ) {
|
||||
has_emotes = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
link.classList.toggle('no-emotes', ! has_emotes);
|
||||
link.classList.toggle('live', live);
|
||||
link.classList.toggle('dark', dark);
|
||||
link.classList.toggle('blue', blue);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue