mirror of
https://github.com/FrankerFaceZ/FrankerFaceZ.git
synced 2025-08-30 18:00:55 +00:00
Replace all the process_value
functions with a helper from utilities. Hide creative tags on the channel page.
This commit is contained in:
parent
7d35b5c8c3
commit
91051d2a11
15 changed files with 197 additions and 339 deletions
|
@ -57,20 +57,7 @@ FFZ.settings_info.fix_color = {
|
|||
name: "Username Colors",
|
||||
help: "Ensure that username colors contrast with the background enough to be readable.",
|
||||
|
||||
process_value: function(val) {
|
||||
// Load legacy setting.
|
||||
if ( val === false )
|
||||
return 0;
|
||||
else if ( val === true )
|
||||
return 1;
|
||||
else if ( typeof val === "string" ) {
|
||||
val = parseInt(val);
|
||||
if ( Number.isNaN(val) || ! Number.isFinite(val) )
|
||||
val = 6;
|
||||
}
|
||||
|
||||
return val;
|
||||
},
|
||||
process_value: utils.process_int(6, 0, 6),
|
||||
|
||||
on_update: function(val) {
|
||||
this.toggle_style('chat-colors-gray', !this.has_bttv && val === -1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue