/* NOTE: This file is processed by server/state.js and served by server/server.js (to auth'd users only) */ $('', {rel: 'stylesheet', type: 'text/css', href: mediaURL+'css/mod.css'}).appendTo('head'); var $selectButton, $controls; window.loggedInUser = IDENT.user; window.x_csrf = IDENT.csrf; function show_toolbox() { var specs = [ {name: 'Lewd', kind: 7}, {name: 'Porn', kind: 8}, {name: 'Delete', kind: 9}, {name: 'Lock', kind: 11}, ]; if (IDENT.auth == 'Admin') specs.push({name: 'Panel', kind: 'panel'}); var $toolbox = $('
', {id: 'toolbox', "class": 'mod'}); $selectButton = $('', { type: 'button', val: 'Select', click: function (e) { toggle_multi_selecting(); }, }); $toolbox.append($selectButton, ' '); $controls = $('').hide(); _.each(specs, function (spec) { $controls.append($('', { type: 'button', val: spec.name, data: {kind: spec.kind}, }), ' '); }); $controls.on('click', 'input[type=button]', tool_action); _.each(delayNames, function (when, i) { var id = 'delay-' + when; var $label = $('