1.7.3 - key, value of x instead of key of x

This commit is contained in:
James Campos 2010-11-03 17:28:20 -07:00
parent 70cb09fba3
commit 3d4380494f
4 changed files with 11 additions and 6 deletions

View File

@ -330,9 +330,10 @@ options = ->
div = AEOS.makeDialog 'options', 'center' div = AEOS.makeDialog 'options', 'center'
hiddenNum = hiddenReplies.length + hiddenThreads.length hiddenNum = hiddenReplies.length + hiddenThreads.length
html = '<div class="move">Options <a class=pointer>X</a></div><div>' html = '<div class="move">Options <a class=pointer>X</a></div><div>'
for option of config for option, value of config
description = value[1]
checked = if getConfig option then "checked" else "" checked = if getConfig option then "checked" else ""
html += "<label title=\"#{option[1]}\">#{option}<input #{checked} name=\"#{option}\" type=\"checkbox\"></label><br>" html += "<label title=\"#{description}\">#{option}<input #{checked} name=\"#{option}\" type=\"checkbox\"></label><br>"
html += "<div><a class=sauce>Edit Sauce</a></div>" html += "<div><a class=sauce>Edit Sauce</a></div>"
html += "<div><textarea cols=50 rows=4 style=\"display: none;\"></textarea></div>" html += "<div><textarea cols=50 rows=4 style=\"display: none;\"></textarea></div>"
html += "<input type=\"button\" value=\"hidden: #{hiddenNum}\"><br>" html += "<input type=\"button\" value=\"hidden: #{hiddenNum}\"><br>"

View File

@ -370,7 +370,7 @@
return ta.style.display ? show(ta) : hide(ta); return ta.style.display ? show(ta) : hide(ta);
}; };
options = function() { options = function() {
var _i, _ref2, checked, div, hiddenNum, option; var _ref2, checked, description, div, hiddenNum, option, value;
if (div = $('#options')) { if (div = $('#options')) {
return remove(div); return remove(div);
} else { } else {
@ -380,9 +380,10 @@
_ref2 = config; _ref2 = config;
for (option in _ref2) { for (option in _ref2) {
if (!__hasProp.call(_ref2, option)) continue; if (!__hasProp.call(_ref2, option)) continue;
_i = _ref2[option]; value = _ref2[option];
description = value[1];
checked = getConfig(option) ? "checked" : ""; checked = getConfig(option) ? "checked" : "";
html += ("<label title=\"" + (option[1]) + "\">" + (option) + "<input " + (checked) + " name=\"" + (option) + "\" type=\"checkbox\"></label><br>"); html += ("<label title=\"" + (description) + "\">" + (option) + "<input " + (checked) + " name=\"" + (option) + "\" type=\"checkbox\"></label><br>");
} }
html += "<div><a class=sauce>Edit Sauce</a></div>"; html += "<div><a class=sauce>Edit Sauce</a></div>";
html += "<div><textarea cols=50 rows=4 style=\"display: none;\"></textarea></div>"; html += "<div><textarea cols=50 rows=4 style=\"display: none;\"></textarea></div>";

View File

@ -1,3 +1,6 @@
1.7.3
- fixed descriptions
1.7.2 1.7.2
- add option descriptions - add option descriptions

2
readme
View File

@ -2,7 +2,7 @@
// @name 4chan x // @name 4chan x
// @namespace aeosynth // @namespace aeosynth
// @description Adds various features. // @description Adds various features.
// @version 1.7.2 // @version 1.7.3
// @copyright 2009, 2010 James Campos // @copyright 2009, 2010 James Campos
// @license MIT; http://en.wikipedia.org/wiki/Mit_license // @license MIT; http://en.wikipedia.org/wiki/Mit_license
// @include http://boards.4chan.org/* // @include http://boards.4chan.org/*