diff --git a/src/ember/viewers.js b/src/ember/viewers.js index fe17fefa..2aab88c0 100644 --- a/src/ember/viewers.js +++ b/src/ember/viewers.js @@ -1,6 +1,20 @@ var FFZ = window.FrankerFaceZ; +// -------------------- +// Settings +// -------------------- + +FFZ.settings_info.sort_viewers = { + type: "boolean", + value: true, + + category: "Chat Appearance", + name: "Sort Viewer List", + help: "Make sure the viewer list is alphabetically sorted and place the Broadcaster in their own category." +}; + + // -------------------- // Initialization // -------------------- @@ -19,6 +33,9 @@ FFZ.prototype._modify_viewers = function(controller) { controller.reopen({ lines: function() { var viewers = this._super(); + if ( ! f.settings.sort_viewers ) + return viewers; + try { var categories = [], data = {}, diff --git a/src/ext/api.js b/src/ext/api.js index 5c720003..83cfb267 100644 --- a/src/ext/api.js +++ b/src/ext/api.js @@ -259,6 +259,11 @@ API.prototype.register_global_set = function(id, emote_set) { throw new Error("Invalid set ID"); + // Make sure the set is still available with FFZ. + if ( ! this.ffz.emote_sets[exact_id] ) + this.ffz.emote_sets[exact_id] = emote_set; + + // It's a valid set if we get here, so make it global. if ( this.global_sets.indexOf(exact_id) === -1 ) this.global_sets.push(exact_id); @@ -323,6 +328,10 @@ API.prototype.register_room_set = function(room_id, id, emote_set) { if ( ! emote_set ) throw new Error("Invalid set ID"); + // Make sure the set is still available with FFZ. + if ( ! this.ffz.emote_sets[exact_id] ) + this.ffz.emote_sets[exact_id] = emote_set; + // Register it on the room. room.ext_sets.push(exact_id); emote_set.users.push(room_id); diff --git a/src/main.js b/src/main.js index df2f440f..655e8d6f 100644 --- a/src/main.js +++ b/src/main.js @@ -22,7 +22,7 @@ FFZ.get = function() { return FFZ.instance; } // Version var VER = FFZ.version_info = { - major: 3, minor: 5, revision: 40, + major: 3, minor: 5, revision: 42, toString: function() { return [VER.major, VER.minor, VER.revision].join(".") + (VER.extra || ""); } diff --git a/src/ui/dark.js b/src/ui/dark.js index 6de8f3bd..a625892e 100644 --- a/src/ui/dark.js +++ b/src/ui/dark.js @@ -211,5 +211,6 @@ FFZ.prototype._load_dark_css = function() { s.id = "ffz-dark-css"; s.setAttribute('rel', 'stylesheet'); s.setAttribute('href', constants.SERVER + "script/dark.css?_=" + (constants.DEBUG ? Date.now() : FFZ.version_info)); + s.onerror = "this.href = this.href + '_';" document.head.appendChild(s); } \ No newline at end of file diff --git a/src/ui/notifications.js b/src/ui/notifications.js index 7e17d95a..6a2b5b37 100644 --- a/src/ui/notifications.js +++ b/src/ui/notifications.js @@ -8,18 +8,6 @@ var FFZ = window.FrankerFaceZ; FFZ.prototype.setup_notifications = function() { this.log("Adding event handler for window focus."); window.addEventListener("focus", this.clear_notifications.bind(this)); - - // Firefox update warning. - if ( navigator.userAgent.toLowerCase().indexOf('firefox/') !== -1 ) { - if ( localStorage.hasOwnProperty('ffz_mozilla_sign_warning') ) - return; - - localStorage.ffz_mozilla_sign_warning = true; - var f = this; - setTimeout(function() { - f.show_message('Firefox users please re-download the add-on from https://www.frankerfacez.com/ to ensure that it continues to function after the upgrade to Firefox 41. You should see version 1.56 in your add-ons listing.'); - }, 1000); - } } diff --git a/src/ui/styles.js b/src/ui/styles.js index b21f008d..d8312d29 100644 --- a/src/ui/styles.js +++ b/src/ui/styles.js @@ -11,6 +11,8 @@ FFZ.prototype.setup_css = function() { s.id = "ffz-ui-css"; s.setAttribute('rel', 'stylesheet'); s.setAttribute('href', constants.SERVER + "script/style.css?_=" + (constants.DEBUG ? Date.now() : FFZ.version_info)); + s.onerror = "this.href = this.href + '_';" + document.head.appendChild(s); if ( window.jQuery && jQuery.noty )