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.
\
- You can use these settings with each regular expression, separate them with semicolons:\
- - \
- Per boards, separate them with commas. It is global if not specified.
\
- For example: boards:a,jp;.\
- \
- - \
- Filter OPs only along with their threads (`only`), replies only (`no`, this is default), or both (`yes`).
\
- For example: op:only;, op:no; or op:yes;.\
- \
- - \
- Overrule the `Show Stubs` setting if specified: create a stub (`yes`) or not (`no`).
\
- For example: stub:yes; or stub:no;\
- \
- - \
- Highlight instead of hiding. You can specify a class name to use with a userstyle.
\
- For example: highlight; or highlight:wallpaper;.\
- \
- - \
- Highlighted OPs will have their threads put on top of board pages by default.
\
- For example: top:yes; or top:no;.\
- \
-
'
- }));
- 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.
\
+ You can use these settings with each regular expression, separate them with semicolons:\
+ - \
+ Per boards, separate them with commas. It is global if not specified.
\
+ For example: boards:a,jp;.\
+ \
+ - \
+ Filter OPs only along with their threads (`only`), replies only (`no`, this is default), or both (`yes`).
\
+ For example: op:only;, op:no; or op:yes;.\
+ \
+ - \
+ Overrule the `Show Stubs` setting if specified: create a stub (`yes`) or not (`no`).
\
+ For example: stub:yes; or stub:no;\
+ \
+ - \
+ Highlight instead of hiding. You can specify a class name to use with a userstyle.
\
+ For example: highlight; or highlight:wallpaper;.\
+ \
+ - \
+ Highlighted OPs will have their threads put on top of board pages by default.
\
+ For example: top:yes; or top:no;.\
+ \
+
'
+ }));
},
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.
- You can use these settings with each regular expression, separate them with semicolons:
- -
- Per boards, separate them with commas. It is global if not specified.
- For example: boards:a,jp;.
-
- -
- Filter OPs only along with their threads (`only`), replies only (`no`, this is default), or both (`yes`).
- For example: op:only;, op:no; or op:yes;.
-
- -
- Overrule the `Show Stubs` setting if specified: create a stub (`yes`) or not (`no`).
- For example: stub:yes; or stub:no;
-
- -
- Highlight instead of hiding. You can specify a class name to use with a userstyle.
- For example: highlight; or highlight:wallpaper;.
-
- -
- Highlighted OPs will have their threads put on top of board pages by default.
- For example: top:yes; or top:no;.
-
-
'
+ 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.
+ You can use these settings with each regular expression, separate them with semicolons:
+ -
+ Per boards, separate them with commas. It is global if not specified.
+ For example: boards:a,jp;.
+
+ -
+ Filter OPs only along with their threads (`only`), replies only (`no`, this is default), or both (`yes`).
+ For example: op:only;, op:no; or op:yes;.
+
+ -
+ Overrule the `Show Stubs` setting if specified: create a stub (`yes`) or not (`no`).
+ For example: stub:yes; or stub:no;
+
+ -
+ Highlight instead of hiding. You can specify a class name to use with a userstyle.
+ For example: highlight; or highlight:wallpaper;.
+
+ -
+ Highlighted OPs will have their threads put on top of board pages by default.
+ For example: top:yes; or top:no;.
+
+
'
time: ->
Time.foo()
Time.date = new Date()