diff --git a/www/assets/js/util.js b/www/assets/js/util.js index fe08c592..9daee781 100644 --- a/www/assets/js/util.js +++ b/www/assets/js/util.js @@ -497,7 +497,9 @@ function rebuildPlaylist() { } /* menus */ -function showOpts() { + +/* user settings menu */ +function showOptionsMenu() { hidePlayer(); var modal = $("
").addClass("modal hide fade") .appendTo($("body")); @@ -676,209 +678,39 @@ function showOpts() { $("#uopt-btn-general").click(); $("#uopt-btn-save").click(function () { + USEROPTS.theme = gen_theme.val(); + USEROPTS.layout = gen_layout.val(); + USEROPTS.css = gen_css.val(); + USEROPTS.ignore_channelcss = gen_nocss.prop("checked"); + USEROPTS.ignore_channeljs = gen_nojs.prop("checked"); + USEROPTS.altsocket = gen_altsocket.prop("checked"); + USEROPTS.synch = pl_synch.prop("checked"); + USEROPTS.sync_accuracy = parseFloat(pl_synchacc.val())||2; + USEROPTS.wmode_transparent = pl_wmode.prop("checked"); + USEROPTS.hidevid = pl_hide.prop("checked"); + USEROPTS.qbtn_hide = pl_hidebtn.prop("checked"); + USEROPTS.qbtn_idontlikechange = pl_oldbtn.prop("checked"); + USEROPTS.show_timestamps = chat_time.prop("checked"); + USEROPTS.sort_rank = chat_sort_rank.prop("checked"); + USEROPTS.sort_afk = chat_sort_afk.prop("checked"); + USEROPTS.blink_title = chat_all.prop("checked"); + USEROPTS.boop = chat_boop.prop("checked"); + USEROPTS.chatbtn = chat_sendbtn.prop("checked"); + if (CLIENT.rank >= 2) { + USEROPTS.modhat = mod_flair.prop("checked"); + USEROPTS.joinmessage = mod_joinmsg.prop("checked"); + } + saveOpts(); + modal.modal("hide"); }); }); modal.on("hidden", function () { - unhidePlayer(); - modal.remove(); - }); - - modal.modal(); -} - -function showOptionsMenu() { - hidePlayer(); - var modal = $("
").addClass("modal hide fade") - .appendTo($("body")); - var head = $("
").addClass("modal-header") - .appendTo(modal); - $("