diff --git a/js/comment-toolbar.js b/js/comment-toolbar.js index 80993cb0..65bdc529 100644 --- a/js/comment-toolbar.js +++ b/js/comment-toolbar.js @@ -251,74 +251,74 @@ if (active_page == 'thread' || active_page == 'index') { // setup default rules for customizing if (!localStorage.formatText_rules) localStorage.formatText_rules = JSON.stringify(self.rules); - // Add settings to Options panel general tab - if (window.Options && Options.get_tab('general')) { - var s1 = '#formatText_keybinds>input', s2 = '#formatText_toolbar>input', e = 'change'; - Options.extend_tab('general', '\ -
\ - Formatting Options\ - \ - \ -
\ - '); - } else { - var s1 = '#formatText_keybinds', s2 = '#formatText_toolbar', e = 'click'; - $('hr:first').before('
'+ _('Enable formatting keybinds') +'
'); - $('hr:first').before('
'+ _('Show formatting toolbar') +'
'); - } - - // add the tab for customizing the format settings - if (window.Options && !Options.get_tab('formatting')) { - Options.add_tab('formatting', 'angle-right', 'Customize Formatting'); - Options.extend_tab('formatting', '\ - \ - '); - - // Data control row - Options.extend_tab('formatting', '\ - \ - \ - \ - \ - '); - - // Descriptor row - Options.extend_tab('formatting', '\ - Name\ - ML\ - EL\ - Prefix\ - Suffix\ - Key\ - '); + // setup code to be ran when page is ready (work around for main.js compilation). + $(document).ready(function(){ + // Add settings to Options panel general tab + if (window.Options && Options.get_tab('general')) { + var s1 = '#formatText_keybinds>input', s2 = '#formatText_toolbar>input', e = 'change'; + Options.extend_tab('general', '\ +
\ + Formatting Options\ + \ + \ +
\ + '); + } else { + var s1 = '#formatText_keybinds', s2 = '#formatText_toolbar', e = 'click'; + $('hr:first').before('
'+ _('Enable formatting keybinds') +'
'); + $('hr:first').before('
'+ _('Show formatting toolbar') +'
'); + } - // Rule rows - var rules = JSON.parse(localStorage.formatText_rules); - for (var index in rules){ - if (!rules.hasOwnProperty(index)) continue; - self.add_rule(rules[index], index); + // add the tab for customizing the format settings + if (window.Options && !Options.get_tab('formatting')) { + Options.add_tab('formatting', 'angle-right', 'Customize Formatting'); + Options.extend_tab('formatting', '\ + \ + '); + + // Data control row + Options.extend_tab('formatting', '\ + \ + \ + \ + \ + '); + + // Descriptor row + Options.extend_tab('formatting', '\ + Name\ + ML\ + EL\ + Prefix\ + Suffix\ + Key\ + '); + + // Rule rows + var rules = JSON.parse(localStorage.formatText_rules); + for (var index in rules){ + if (!rules.hasOwnProperty(index)) continue; + self.add_rule(rules[index], index); + } } - } - // setup code to be ran when page is ready (work around for main.js compilation). - $(document).ready(function(){ // setting for enabling formatting keybinds $(s1).on(e, function(e) { console.log('Keybind');