diff options
Diffstat (limited to 'public/assets')
| -rw-r--r-- | public/assets/js/lib/views/stream/hootfilters.js | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/public/assets/js/lib/views/stream/hootfilters.js b/public/assets/js/lib/views/stream/hootfilters.js index 68f0cdd..43920c3 100644 --- a/public/assets/js/lib/views/stream/hootfilters.js +++ b/public/assets/js/lib/views/stream/hootfilters.js @@ -65,8 +65,8 @@ var HootFilters = View.extend({ this.$music.closest("label").toggle(music); this.$hoots.closest("label").toggle(hoots); this.$files.closest("label").toggle(normal_files); + let classicHref, classicText, editText, editHref; if (target.thread || target.keyword || target.username) { - let classicHref, classicText, editText, editHref; if (target.thread) { editHref = `/details/${target.thread}/settings`; classicHref = `/details/${target.thread}`; @@ -81,12 +81,14 @@ var HootFilters = View.extend({ classicHref = `/profile/${target.username}`; classicText = "profile"; } - if (editHref) { - this.$editLink.show(); - this.$editLink.find("a").attr("href", editHref).html(editText); - } else { - this.$editLink.hide(); - } + } + if (editHref && editText) { + this.$editLink.show(); + this.$editLink.find("a").attr("href", editHref).html(editText); + } else { + this.$editLink.hide(); + } + if (classicHref && classicText) { this.$classicLink.show(); this.$classicLink.find("a").attr("href", classicHref).html(classicText); } else { |
