/* * style-select.js * https://github.com/savetheinternet/Tinyboard/blob/master/js/style-select.js * * Changes the stylesheet chooser links to a '); var i = 1; stylesDiv.children().each(function() { stylesSelect.append( $('') .text(this.innerText.replace(/(^\[|\]$)/g, '')) .val(i) ); $(this).attr('id', 'style-select-' + i); i++; }); stylesSelect.change(function() { $('#style-select-' + $(this).val()).click(); }); stylesDiv.hide(); stylesDiv.after( $('
') .text(_('Style: ')) .append(stylesSelect) ); });