Add index hash commands to change index sort.
This commit is contained in:
parent
7ac7c886a8
commit
8a15dfdbce
@ -283,12 +283,18 @@ Index =
|
|||||||
|
|
||||||
hashCommands:
|
hashCommands:
|
||||||
mode:
|
mode:
|
||||||
'paged': 'paged'
|
'paged': 'paged'
|
||||||
'infinite-scrolling': 'infinite'
|
'infinite-scrolling': 'infinite'
|
||||||
'infinite': 'infinite'
|
'infinite': 'infinite'
|
||||||
'all-threads': 'all pages'
|
'all-threads': 'all pages'
|
||||||
'all-pages': 'all pages'
|
'all-pages': 'all pages'
|
||||||
'catalog': 'catalog'
|
'catalog': 'catalog'
|
||||||
|
sort:
|
||||||
|
'bump-order': 'bump'
|
||||||
|
'last-reply': 'lastreply'
|
||||||
|
'creation-date': 'birth'
|
||||||
|
'reply-count': 'replycount'
|
||||||
|
'file-count': 'filecount'
|
||||||
|
|
||||||
processHash: ->
|
processHash: ->
|
||||||
# XXX https://bugzilla.mozilla.org/show_bug.cgi?id=483304
|
# XXX https://bugzilla.mozilla.org/show_bug.cgi?id=483304
|
||||||
@ -302,6 +308,8 @@ Index =
|
|||||||
else if command is 'index'
|
else if command is 'index'
|
||||||
state.mode = Conf['Previous Index Mode']
|
state.mode = Conf['Previous Index Mode']
|
||||||
state.page = 1
|
state.page = 1
|
||||||
|
else if (sort = Index.hashCommands.sort[command])
|
||||||
|
state.sort = sort
|
||||||
else if /^s=/.test command
|
else if /^s=/.test command
|
||||||
state.search = decodeURIComponent(command[2..]).replace(/\+/g, ' ').trim()
|
state.search = decodeURIComponent(command[2..]).replace(/\+/g, ' ').trim()
|
||||||
else if i is commands.length - 1
|
else if i is commands.length - 1
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user