mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-07-25 03:58:30 +00:00
Removed Firefox update warning. Made styles attempt to re-downlaod with new URLs upon error due to CDN issues. Made viewer list sorting optional. Added safety checks to API for non-global sets.
This commit is contained in:
parent
acc0010247
commit
a7f6e0b63f
6 changed files with 30 additions and 13 deletions
|
@ -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 = {},
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 || "");
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
|
@ -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 <a href="https://www.frankerfacez.com/" target="_new">https://www.frankerfacez.com/</a> 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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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 )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue