User:Tierrie/Chat.js

function updateCookie { chatOptions.look.backgroundColor = $('#backgroundColourinput').val; chatOptions.look.fontColor = $('#fontColourinput').val; chatOptions.look.fontFamily = $('#fontList').val; chatOptions.look.surroundColor = $('#surroundColourinput').val; chatOptions.look.selfPostColor = $('#selfPostColourinput').val; for (var m in chatOptions.modules) { if ( chatOptions.modules.hasOwnProperty( m ) ) { var module = chatOptions.modules[m]; if (typeof module.element != 'undefined' && $(module.element).attr("checked")) { module.enabled = true; } else { module.enabled = false; }   }  }  // Set the cookies for (var m in chatOptions.modules) { $.setCookie('co_' + m, chatOptions.modules[m].enabled); } for (var l in chatOptions.look) { if(chatOptions.modules[l]) $.setCookie('co_' + l, chatOptions.modules[l]); else $.removeCookie('co_' + l) } updateChatSkin; cancelChanges; }