summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarktaiwan <mark.taiwan@gmail.com>2015-02-24 16:30:51 +0800
committerczaks <marcin@6irc.net>2016-05-05 12:30:54 +0200
commitf84d0b90276055d896740e9de02deda29d1d5ac3 (patch)
tree20ceb367ac4ec54d042014701e1808db283275e1
parentb46985512639503ba1f18288eab65e3cdde1aa96 (diff)
Changed 'hide post' button behavior
-rw-r--r--js/post-filter.js11
1 files changed, 5 insertions, 6 deletions
diff --git a/js/post-filter.js b/js/post-filter.js
index 83684176..57c37c9b 100644
--- a/js/post-filter.js
+++ b/js/post-filter.js
@@ -243,28 +243,27 @@ if (active_page === 'thread' || active_page === 'index') {
*/
// unhide button
- if ($ele.data('hidden') == '1' && $ele.data('hiddenByUid') == '0' &&
- $ele.data('hiddenByName') == '0' && $ele.data('hiddenByTrip') == '0') {
+ if ($ele.data('hidden') == '1') {
$buffer.find('#filter-menu-unhide').click(function () {
// if hidden due to post id, remove it from blacklist
// otherwise just show this post
blacklist.remove.post(pageData.boardId, threadId, postId);
show(ele);
});
+ $buffer.find('#filter-menu-hide').addClass('hidden');
} else {
$buffer.find('#filter-menu-unhide').addClass('hidden');
+ $buffer.find('#filter-menu-hide').click(function () {
+ blacklist.add.post(pageData.boardId, threadId, postId, false);
+ });
}
// post id
if ($ele.data('hiddenByPost') == '0') {
- $buffer.find('#filter-menu-hide').click(function () {
- blacklist.add.post(pageData.boardId, threadId, postId, false);
- });
$buffer.find('#filter-add-post-plus').click(function () {
blacklist.add.post(pageData.boardId, threadId, postId, true);
});
} else {
- $buffer.find('#filter-menu-hide').addClass('hidden');
$buffer.find('#filter-add-post-plus').addClass('hidden');
}