1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-07-27 21:18:30 +00:00

Refactored colors. Fixed scrolling on mobile. Added image preview on hover.

This commit is contained in:
SirStendec 2015-07-18 21:10:27 -04:00
parent 2bc2b7003b
commit 02b0a95bd0
22 changed files with 2121 additions and 425 deletions

View file

@ -21,6 +21,7 @@ FFZ.settings_info.highlight_notifications = {
category: "Chat Filtering",
no_bttv: true,
no_mobile: true,
//visible: function() { return ! this.has_bttv },
name: "Highlight Notifications",
@ -51,6 +52,33 @@ FFZ.settings_info.highlight_notifications = {
};
FFZ.settings_info.notification_timeout = {
type: "button",
value: 60,
category: "Chat Filtering",
no_bttv: true,
no_mobile: true,
name: "Notification Timeout",
help: "Specify how long notifications should be displayed before automatically closing.",
method: function() {
var old_val = this.settings.notification_timeout,
new_val = prompt("Notification Timeout\n\nPlease enter the time you'd like notifications to be displayed before automatically closing, in seconds.\n\nDefault is: 60", old_val);
if ( new_val === null || new_val === undefined )
return;
var parsed = parseInt(new_val);
if ( parsed === NaN || parsed < 1 )
parsed = 60;
this.settings.set("notification_timeout", parsed);
}
};
// ---------------------
// Socket Commands
// ---------------------
@ -88,7 +116,7 @@ FFZ.prototype.show_notification = function(message, title, tag, timeout, on_clic
if ( perm === "granted" ) {
title = title || "FrankerFaceZ";
timeout = timeout || 10000;
timeout = timeout || (this.settings.notification_timeout*1000);
var options = {
lang: "en-US",