From 54dbf09d868eacbdb07cf935633bcb65223f0697 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Sat, 16 Jun 2012 17:57:17 +0200 Subject: [PATCH] Small reordering. --- 4chan_x.user.js | 74 ++++++++++++++++++++++++------------------------- script.coffee | 68 ++++++++++++++++++++++----------------------- 2 files changed, 71 insertions(+), 71 deletions(-) diff --git a/4chan_x.user.js b/4chan_x.user.js index 6a4684ae8..f4a4d4092 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -2428,46 +2428,46 @@ filter: function() { var el, name, ta; el = this.nextSibling; + if ((name = this.value) !== 'guide') { + ta = $.el('textarea', { + name: name, + className: 'field', + value: $.get(name, Conf[name]) + }); + $.on(ta, 'change', $.cb.value); + $.replace(el, ta); + return; + } if (el) { $.rm(el); } - if ((name = this.value) === 'guide') { - $.after(this, $.el('article', { - innerHTML: '

Use regular expressions, one per line.
\ - Lines starting with a # will be ignored.
\ - For example, /weeaboo/i will filter posts containing the string `weeaboo`, case-insensitive.

\ - ' - })); - return; - } - ta = $.el('textarea', { - name: name, - className: 'field', - value: $.get(name, Conf[name]) - }); - $.on(ta, 'change', $.cb.value); - return $.after(this, ta); + return $.after(this, $.el('article', { + innerHTML: '

Use regular expressions, one per line.
\ + Lines starting with a # will be ignored.
\ + For example, /weeaboo/i will filter posts containing the string `weeaboo`, case-insensitive.

\ + ' + })); }, time: function() { Time.foo(); diff --git a/script.coffee b/script.coffee index a0655ca15..aeebcbe5e 100644 --- a/script.coffee +++ b/script.coffee @@ -1883,43 +1883,43 @@ Options = $.cb.value.call @ filter: -> el = @nextSibling - $.rm el if el - if (name = @value) is 'guide' - $.after @, $.el 'article', - innerHTML: '

Use regular expressions, one per line.
- Lines starting with a # will be ignored.
- For example, /weeaboo/i will filter posts containing the string `weeaboo`, case-insensitive.

- ' + if (name = @value) isnt 'guide' + ta = $.el 'textarea', + name: name + className: 'field' + value: $.get name, Conf[name] + $.on ta, 'change', $.cb.value + $.replace el, ta return - ta = $.el 'textarea', - name: name - className: 'field' - value: $.get name, Conf[name] - $.on ta, 'change', $.cb.value - $.after @, ta + $.rm el if el + $.after @, $.el 'article', + innerHTML: '

Use regular expressions, one per line.
+ Lines starting with a # will be ignored.
+ For example, /weeaboo/i will filter posts containing the string `weeaboo`, case-insensitive.

+ ' time: -> Time.foo() Time.date = new Date()