diff --git a/builds/appchan-x.user.js b/builds/appchan-x.user.js
index 891a1fba5..920da5c81 100644
--- a/builds/appchan-x.user.js
+++ b/builds/appchan-x.user.js
@@ -7943,7 +7943,7 @@
if (response) {
response = response.trim();
if (!/\s/.test(response)) {
- response = "" + response + " " + response;
+ response += " " + response;
}
}
return {
@@ -10982,7 +10982,6 @@
editMascot = {};
}
editMascot.name = key || '';
- MascotTools.init(editMascot);
layout = {
name: ["Mascot Name", "", "text"],
image: ["Image", "", "text"],
@@ -11002,6 +11001,7 @@
nodes = [];
for (name in layout) {
item = layout[name];
+ value = editMascot[name] || (editMascot[name] = item[1]);
switch (item[2]) {
case "text":
div = this.input(item, name);
@@ -11051,14 +11051,13 @@
});
break;
case "select":
- value = editMascot[name] || item[1];
optionHTML = "
" + (name.replace(/_/g, " ")) + "
"
});
$.on(mascotEl, 'click', cb.restore);
- nodes.push(mascotEl);
+ $.add(container, mascotEl);
}
- $.add(categories, nodes);
- $.add(suboptions, categories);
+ $.add(suboptions, container);
batchmascots = $.el('div', {
id: "mascots_batch",
innerHTML: "
Return"
@@ -14294,9 +14278,9 @@
return Settings.openSection.apply(mascots);
});
}
- _ref2 = [suboptions, batchmascots, mascotHide];
- for (_m = 0, _len4 = _ref2.length; _m < _len4; _m++) {
- node = _ref2[_m];
+ _ref1 = [suboptions, batchmascots, mascotHide];
+ for (_l = 0, _len3 = _ref1.length; _l < _len3; _l++) {
+ node = _ref1[_l];
Rice.nodes(node);
}
return $.add(section, [suboptions, batchmascots, mascotHide]);
diff --git a/builds/crx/script.js b/builds/crx/script.js
index 458dce20b..4870c9925 100644
--- a/builds/crx/script.js
+++ b/builds/crx/script.js
@@ -7943,7 +7943,7 @@
if (response) {
response = response.trim();
if (!/\s/.test(response)) {
- response = "" + response + " " + response;
+ response += " " + response;
}
}
return {
@@ -10970,7 +10970,6 @@
editMascot = {};
}
editMascot.name = key || '';
- MascotTools.init(editMascot);
layout = {
name: ["Mascot Name", "", "text"],
image: ["Image", "", "text"],
@@ -10990,6 +10989,7 @@
nodes = [];
for (name in layout) {
item = layout[name];
+ value = editMascot[name] || (editMascot[name] = item[1]);
switch (item[2]) {
case "text":
div = this.input(item, name);
@@ -11039,14 +11039,13 @@
});
break;
case "select":
- value = editMascot[name] || item[1];
optionHTML = "
" + item[0] + "
";
+ optionHTML += "
";
div = $.el('div', {
className: "mascotvar",
innerHTML: optionHTML
@@ -11059,7 +11058,6 @@
});
break;
case "checkbox":
- value = editMascot[name] || item[1];
div = $.el("div", {
className: "mascotvar",
innerHTML: "" + (name.replace(/_/g, " ")) + "
"
});
$.on(mascotEl, 'click', cb.restore);
- nodes.push(mascotEl);
+ $.add(container, mascotEl);
}
- $.add(categories, nodes);
- $.add(suboptions, categories);
+ $.add(suboptions, container);
batchmascots = $.el('div', {
id: "mascots_batch",
innerHTML: "
Return"
@@ -14281,9 +14265,9 @@
return Settings.openSection.apply(mascots);
});
}
- _ref2 = [suboptions, batchmascots, mascotHide];
- for (_m = 0, _len4 = _ref2.length; _m < _len4; _m++) {
- node = _ref2[_m];
+ _ref1 = [suboptions, batchmascots, mascotHide];
+ for (_l = 0, _len3 = _ref1.length; _l < _len3; _l++) {
+ node = _ref1[_l];
Rice.nodes(node);
}
return $.add(section, [suboptions, batchmascots, mascotHide]);
diff --git a/src/General/Settings.coffee b/src/General/Settings.coffee
index 325669856..ba214d8f8 100644
--- a/src/General/Settings.coffee
+++ b/src/General/Settings.coffee
@@ -645,7 +645,6 @@ Settings =
mascots: (section, mode) ->
categories = {}
- menu = []
cb = Settings.cb.mascot
if typeof mode isnt 'string'
@@ -676,45 +675,35 @@ Settings =
$.add @, mascotoptions
# Create a keyed Unordered List Element and hide option for each mascot category.
- nodes = {}
for name in MascotTools.categories
- nodes[name] = []
- categories[name] = $.el "div",
+ menu = $ 'div', mascotHide
+ categories[name] = div = $.el "div",
+ id: name
className: "mascots-container"
- id: name
innerHTML: ""
+ hidden: Conf["Hidden Categories"].contains name
- if Conf["Hidden Categories"].contains name
- categories[name].hidden = true
-
- menu.push option = $.el "label",
+ option = $.el "label",
name: name
innerHTML: "
#{name}"
$.on $('input', option), 'change', cb.category
- for name in keys
+ $.add suboptions, div
+ $.add menu, option
+ for name in keys
continue if Conf["Deleted Mascots"].contains name
mascot = Mascots[name]
mascotEl = $.el 'div',
+ id: name
className: if Conf[g.MASCOTSTRING].contains name then 'mascot enabled' else 'mascot'
- id: name
innerHTML: "<%= grunt.file.read('src/General/html/Settings/Mascot.html') %>"
$.on mascotEl, 'click', cb.select
$.on mascotEl, 'mouseover', addoptions
- if MascotTools.categories.contains mascot.category
- nodes[mascot.category].push mascotEl
- else
- nodes[MascotTools.categories[0]].push mascotEl
-
- for name in MascotTools.categories
- $.add categories[name], nodes[name]
- $.add suboptions, categories[name]
-
- $.add $('div', mascotHide), menu
+ $.add (categories[mascot.category] or categories[MascotTools.categories[0]]), mascotEl
batchmascots = $.el 'div',
id: "mascots_batch"
@@ -753,8 +742,7 @@ Settings =
Settings.openSection.apply mascots, ['restore']
else
- nodes = []
- categories = $.el "div",
+ container = $.el "div",
className: "mascots"
for name in keys
@@ -770,15 +758,13 @@ Settings =
$.on mascotEl, 'click', cb.restore
- nodes.push mascotEl
+ $.add container, mascotEl
- $.add categories, nodes
-
- $.add suboptions, categories
+ $.add suboptions, container
batchmascots = $.el 'div',
id: "mascots_batch"
- innerHTML: "
Return"
+ innerHTML: """
Return"""
$.on $('#return', batchmascots), 'click', ->
mascots =
diff --git a/src/Posting/QuickReply.coffee b/src/Posting/QuickReply.coffee
index 93549f1d1..2c7443bdf 100644
--- a/src/Posting/QuickReply.coffee
+++ b/src/Posting/QuickReply.coffee
@@ -827,7 +827,7 @@ QR =
response = response.trim()
# one-word-captcha:
# If there's only one word, duplicate it.
- response = "#{response} #{response}" unless /\s/.test response
+ response += " #{response}" unless /\s/.test response
{challenge, response}
save: ->
diff --git a/src/Theming/Mascots.coffee b/src/Theming/Mascots.coffee
index 4ab01c691..0a6acfc67 100644
--- a/src/Theming/Mascots.coffee
+++ b/src/Theming/Mascots.coffee
@@ -9,9 +9,6 @@ MascotTools =
unless @el
@el = $.el 'div',
id: "mascot"
- # >
![]()
- # >not
![]()
- # >HTML5
innerHTML: "
![]()
"
$.on @el, 'mousedown', MascotTools.click
@@ -72,7 +69,6 @@ MascotTools =
else
editMascot = {}
editMascot.name = key or ''
- MascotTools.init editMascot
layout =
name: [
"Mascot Name"
@@ -142,6 +138,7 @@ MascotTools =
"
nodes = []
for name, item of layout
+ value = editMascot[name] or= item[1]
switch item[2]
@@ -150,7 +147,6 @@ MascotTools =
input = $ 'input', div
if name is 'image'
-
$.on input, 'blur', ->
editMascot[@name] = @value
MascotTools.init editMascot
@@ -192,11 +188,10 @@ MascotTools =
MascotTools.init editMascot
when "select"
- value = editMascot[name] or item[1]
optionHTML = "
#{item[0]}
"
+ optionHTML += "
"
+ optionHTML += "
"
div = $.el 'div',
className: "mascotvar"
innerHTML: optionHTML
@@ -208,7 +203,6 @@ MascotTools =
MascotTools.init editMascot
when "checkbox"
- value = editMascot[name] or item[1]
div = $.el "div",
className: "mascotvar"
innerHTML: "