diff --git a/src/General/Index.coffee b/src/General/Index.coffee
index 30100dfda..03d9a6f7c 100644
--- a/src/General/Index.coffee
+++ b/src/General/Index.coffee
@@ -47,21 +47,6 @@ Index =
input = label.el.firstChild
$.on input, 'change', @cb.mode
- sortEntry =
- el: $.el 'span', textContent: 'Sort by'
- subEntries: [
- { el: $.el 'label', <%= html(' Bump order') %> }
- { el: $.el 'label', <%= html(' Last reply') %> }
- { el: $.el 'label', <%= html(' Creation date') %> }
- { el: $.el 'label', <%= html(' Reply count') %> }
- { el: $.el 'label', <%= html(' File count') %> }
- ]
- for label in sortEntry.subEntries
- input = label.el.firstChild
- input.checked = Conf['Index Sort'] is input.value
- $.on input, 'change', $.cb.value
- $.on input, 'change', @cb.sort
-
repliesEntry = el: UI.checkbox 'Show Replies', ' Show replies'
anchorEntry = el: UI.checkbox 'Anchor Hidden Threads', ' Anchor hidden threads'
refNavEntry = el: UI.checkbox 'Refreshed Navigation', ' Refreshed navigation'
@@ -81,7 +66,7 @@ Index =
el: $.el 'span',
textContent: 'Index Navigation'
order: 98
- subEntries: [repliesEntry, anchorEntry, refNavEntry, modeEntry, sortEntry]
+ subEntries: [repliesEntry, anchorEntry, refNavEntry, modeEntry]
$.addClass doc, 'index-loading', "#{Conf['Index Mode'].replace /\ /g, '-'}-mode"
@root = $.el 'div', className: 'board'
@@ -94,6 +79,7 @@ Index =
$('.cataloglink a', @navLinks).href = if Conf['Use 4chan X Catalog'] then '#catalog' else "/#{g.BOARD}/catalog"
@searchInput = $ '#index-search', @navLinks
@hideLabel = $ '#hidden-label', @navLinks
+ @selectSort = $ '#index-sort', @navLinks
@currentPage = @getCurrentPage()
$.on window, 'popstate', @cb.popstate
@@ -102,6 +88,9 @@ Index =
$.on @searchInput, 'input', @onSearchInput
$.on $('#index-search-clear', @navLinks), 'click', @clearSearch
$.on $('#hidden-toggle a', @navLinks), 'click', @cb.toggleHiddenThreads
+ @selectSort.value = Conf[@selectSort.name]
+ $.on @selectSort, 'change', $.cb.value
+ $.on @selectSort, 'change', @cb.sort
@update()
$.asap (-> $('.board', doc) or d.readyState isnt 'loading'), ->
diff --git a/src/General/css/style.css b/src/General/css/style.css
index 726869e85..a328ca8e6 100755
--- a/src/General/css/style.css
+++ b/src/General/css/style.css
@@ -501,6 +501,9 @@ hr + div.center:not(.ad-cnt):not(.topad):not(.middlead):not(.bottomad) {
#index-search:not([data-searching]) + #index-search-clear {
display: none;
}
+#index-sort {
+ float: right;
+}
.summary {
text-decoration: none;
}
diff --git a/src/General/html/Features/Index-navlinks.html b/src/General/html/Features/Index-navlinks.html
index 340331d5e..11f3dff85 100644
--- a/src/General/html/Features/Index-navlinks.html
+++ b/src/General/html/Features/Index-navlinks.html
@@ -5,3 +5,11 @@
×
— [Show]
+