Skip to content

Node.js based forum software built for the modern web

one liner

Baris Soner Usakli649bcf49b4bb
diff --git a/public/src/forum/topic.js b/public/src/forum/topic.js
index 6a6b465eb4..eae49ab483 100644
--- a/public/src/forum/topic.js
+++ b/public/src/forum/topic.js
@@ -1237,18 +1237,8 @@ define(['composer', 'forum/pagination'], function(composer, pagination) {
}
- function toggle_mod_tools(pid, state) {
- var postEl = $(document.querySelector('#post-container li[data-pid="' + pid + '"]')),
- editEl = postEl.find('.edit'),
- deleteEl = postEl.find('.delete');
-
- if (state) {
- editEl.removeClass('none');
- deleteEl.removeClass('none');
- } else {
- editEl.addClass('none');
- deleteEl.addClass('none');
- }
+ function toggle_mod_tools(pid, editable) {
+ $('#post-container li[data-pid="' + pid + '"]').find('.edit, .delete').toggleClass('none', !editable);
}
function updatePostCount() {