diff --git a/4chan_x.user.js b/4chan_x.user.js
index d9b6ff17e..3b7137f0f 100644
--- a/4chan_x.user.js
+++ b/4chan_x.user.js
@@ -1068,7 +1068,7 @@
var arr, checked, description, dialog, hiddenNum, hiddenThreads, hidingul, html, input, key, li, link, main, obj, overlay, ul, _i, _j, _k, _len, _len2, _len3, _ref, _ref2, _ref3, _ref4;
hiddenThreads = $.get("hiddenThreads/" + g.BOARD + "/", {});
hiddenNum = Object.keys(g.hiddenReplies).length + Object.keys(hiddenThreads).length;
- html = "
";
+ html = " | | |
";
dialog = $.el('div', {
id: 'options',
innerHTML: html
@@ -1095,15 +1095,15 @@
$.append(main, ul);
}
li = $.el('li', {
- innerHTML: " : Forget all hidden posts. Useful if you accidentally hide a post and have `show stubs` disabled."
+ innerHTML: " : Forget all hidden posts. Useful if you accidentally hide a post and have `show stubs` disabled."
});
$.append(hidingul, li);
- _ref2 = $$('input[type=checkbox]', dialog);
+ _ref2 = $$('#main input', dialog);
for (_i = 0, _len = _ref2.length; _i < _len; _i++) {
input = _ref2[_i];
$.bind(input, 'click', $.cb.checked);
}
- $.bind($('input[type=button]', dialog), 'click', options.clearHidden);
+ $.bind($('button', dialog), 'click', options.clearHidden);
_ref3 = $$('#floaty a', dialog);
for (_j = 0, _len2 = _ref3.length; _j < _len2; _j++) {
link = _ref3[_j];
@@ -1136,20 +1136,10 @@
return e.stopPropagation();
});
},
- tab: function() {
- var div, _i, _len, _ref, _results;
- _ref = $('#content').children;
- _results = [];
- for (_i = 0, _len = _ref.length; _i < _len; _i++) {
- div = _ref[_i];
- _results.push(div.id === this.name ? $.show(div) : $.hide(div));
- }
- return _results;
- },
clearHidden: function(e) {
$["delete"]("hiddenReplies/" + g.BOARD + "/");
$["delete"]("hiddenThreads/" + g.BOARD + "/");
- this.value = "hidden: 0";
+ this.textContent = "hidden: 0";
return g.hiddenReplies = {};
},
keybind: function(e) {
@@ -3035,9 +3025,15 @@
list-style: none;\
padding: 0;\
}\
+ #options label {\
+ text-decoration: underline;\
+ }\
#floaty {\
float: left;\
}\
+ #options [name=tab]:not(:checked) + * {\
+ display: none;\
+ }\
#content > * {\
height: 450px;\
overflow: auto;\
diff --git a/script.coffee b/script.coffee
index 9a4c545d1..0e0180ccd 100644
--- a/script.coffee
+++ b/script.coffee
@@ -788,7 +788,7 @@ options =
4chan X |
@@ -799,10 +799,12 @@ options =
-
-
-
-
+
+
+
+
+
+
-
+
+
| Actions | Keybinds |
@@ -879,12 +882,12 @@ options =
$.append ul, li
$.append main, ul
li = $.el 'li',
- innerHTML: " : Forget all hidden posts. Useful if you accidentally hide a post and have `show stubs` disabled."
+ innerHTML: " : Forget all hidden posts. Useful if you accidentally hide a post and have `show stubs` disabled."
$.append hidingul, li
- for input in $$ 'input[type=checkbox]', dialog
+ for input in $$ '#main input', dialog
$.bind input, 'click', $.cb.checked
- $.bind $('input[type=button]', dialog), 'click', options.clearHidden
+ $.bind $('button', dialog), 'click', options.clearHidden
$.bind link, 'click', options.tab for link in $$ '#floaty a', dialog
$.bind $('textarea[name=flavors]', dialog), 'change', $.cb.value
$.bind $('input[name=time]', dialog), 'keyup', options.time
@@ -907,19 +910,12 @@ options =
$.bind overlay, 'click', -> $.rm overlay
$.bind dialog.firstElementChild, 'click', (e) -> e.stopPropagation()
- tab: ->
- for div in $('#content').children
- if div.id is @name
- $.show div
- else
- $.hide div
-
clearHidden: (e) ->
#'hidden' might be misleading; it's the number of IDs we're *looking* for,
# not the number of posts actually hidden on the page.
$.delete "hiddenReplies/#{g.BOARD}/"
$.delete "hiddenThreads/#{g.BOARD}/"
- @value = "hidden: 0"
+ @textContent = "hidden: 0"
g.hiddenReplies = {}
keybind: (e) ->
e.preventDefault()
@@ -2419,9 +2415,15 @@ main =
list-style: none;
padding: 0;
}
+ #options label {
+ text-decoration: underline;
+ }
#floaty {
float: left;
}
+ #options [name=tab]:not(:checked) + * {
+ display: none;
+ }
#content > * {
height: 450px;
overflow: auto;