Moved the Options tab stuff to be setup after the document is ready.

This commit is contained in:
Forkless 2014-11-08 22:17:33 -06:00 committed by czaks
parent 81daf934fb
commit 4e39262223

View File

@ -251,6 +251,8 @@ if (active_page == 'thread' || active_page == 'index') {
// setup default rules for customizing // setup default rules for customizing
if (!localStorage.formatText_rules) localStorage.formatText_rules = JSON.stringify(self.rules); if (!localStorage.formatText_rules) localStorage.formatText_rules = JSON.stringify(self.rules);
// 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 // Add settings to Options panel general tab
if (window.Options && Options.get_tab('general')) { if (window.Options && Options.get_tab('general')) {
var s1 = '#formatText_keybinds>input', s2 = '#formatText_toolbar>input', e = 'change'; var s1 = '#formatText_keybinds>input', s2 = '#formatText_toolbar>input', e = 'change';
@ -317,8 +319,6 @@ if (active_page == 'thread' || active_page == 'index') {
} }
} }
// setup code to be ran when page is ready (work around for main.js compilation).
$(document).ready(function(){
// setting for enabling formatting keybinds // setting for enabling formatting keybinds
$(s1).on(e, function(e) { $(s1).on(e, function(e) {
console.log('Keybind'); console.log('Keybind');