From 5452d7f46ba6ce8e4e8cb5711fce1167a45bc4a2 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Wed, 4 Jan 2012 16:07:13 +0100 Subject: [PATCH] Make sure to initialize the options UI, in case something goes wrong let the user change his settings. --- 4chan_x.user.js | 4 ++-- script.coffee | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 02c1a285e..4eb7c8201 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -3096,6 +3096,7 @@ $.onLoad(qr.sys); return; } + $.onLoad(options.init); $.on(window, 'message', Main.message); now = Date.now(); if (conf['Check for Updates'] && $.get('lastUpdate', 0) < now - 6 * HOUR) { @@ -3195,8 +3196,7 @@ alert(err); } } - $.on($('form[name=delform]'), 'DOMNodeInserted', Main.node); - return options.init(); + return $.on($('form[name=delform]'), 'DOMNodeInserted', Main.node); }, message: function(e) { var data, origin; diff --git a/script.coffee b/script.coffee index 18951790e..c856e5624 100644 --- a/script.coffee +++ b/script.coffee @@ -2398,6 +2398,8 @@ Main = $.onLoad qr.sys return + $.onLoad options.init + $.on window, 'message', Main.message now = Date.now() @@ -2550,7 +2552,6 @@ Main = catch err alert err $.on $('form[name=delform]'), 'DOMNodeInserted', Main.node - options.init() message: (e) -> {origin, data} = e