Support #infinite-scrolling and #all-threads as index hash commands to match labels in UI.
This commit is contained in:
parent
0ea4509d3a
commit
609683bbae
@ -281,6 +281,15 @@ Index =
|
|||||||
else
|
else
|
||||||
Index.pageLoad()
|
Index.pageLoad()
|
||||||
|
|
||||||
|
hashCommands:
|
||||||
|
mode:
|
||||||
|
'paged': 'paged'
|
||||||
|
'infinite-scrolling': 'infinite'
|
||||||
|
'infinite': 'infinite'
|
||||||
|
'all-threads': 'all pages'
|
||||||
|
'all-pages': 'all pages'
|
||||||
|
'catalog': 'catalog'
|
||||||
|
|
||||||
processHash: ->
|
processHash: ->
|
||||||
# XXX https://bugzilla.mozilla.org/show_bug.cgi?id=483304
|
# XXX https://bugzilla.mozilla.org/show_bug.cgi?id=483304
|
||||||
hash = location.href.match(/#.*/)?[0] or ''
|
hash = location.href.match(/#.*/)?[0] or ''
|
||||||
@ -288,8 +297,8 @@ Index =
|
|||||||
replace: true
|
replace: true
|
||||||
commands = hash[1..].split '/'
|
commands = hash[1..].split '/'
|
||||||
for command, i in commands
|
for command, i in commands
|
||||||
if command in ['paged', 'infinite', 'all-pages', 'catalog']
|
if (mode = Index.hashCommands.mode[command])
|
||||||
state.mode = command.replace /-/g, ' '
|
state.mode = mode
|
||||||
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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user