Bugfixes
- mode change via hash now causes scroll - showHiddenThreads is false on switching back to catalog - fix unexpected refresh when unhiding last thread in non-catalog mode
This commit is contained in:
parent
736242bf10
commit
2d6b08ff41
@ -18,10 +18,6 @@ Index =
|
|||||||
name: 'Catalog Features'
|
name: 'Catalog Features'
|
||||||
cb: @catalogNode
|
cb: @catalogNode
|
||||||
|
|
||||||
if Conf['Use 4chan X Catalog'] and Conf['Index Mode'] is 'catalog'
|
|
||||||
Index.setMode Conf['Previous Index Mode']
|
|
||||||
@cb.popstate()
|
|
||||||
|
|
||||||
@button = $.el 'a',
|
@button = $.el 'a',
|
||||||
className: 'index-refresh-shortcut fa fa-refresh'
|
className: 'index-refresh-shortcut fa fa-refresh'
|
||||||
title: 'Refresh'
|
title: 'Refresh'
|
||||||
@ -92,6 +88,10 @@ Index =
|
|||||||
$.on @selectSort, 'change', $.cb.value
|
$.on @selectSort, 'change', $.cb.value
|
||||||
$.on @selectSort, 'change', @cb.sort
|
$.on @selectSort, 'change', @cb.sort
|
||||||
|
|
||||||
|
if Conf['Use 4chan X Catalog'] and Conf['Index Mode'] is 'catalog'
|
||||||
|
Index.setMode Conf['Previous Index Mode']
|
||||||
|
@cb.popstate()
|
||||||
|
|
||||||
@update()
|
@update()
|
||||||
$.asap (-> $('.board', doc) or d.readyState isnt 'loading'), ->
|
$.asap (-> $('.board', doc) or d.readyState isnt 'loading'), ->
|
||||||
board = $ '.board'
|
board = $ '.board'
|
||||||
@ -252,6 +252,7 @@ Index =
|
|||||||
# hash change, not call from init
|
# hash change, not call from init
|
||||||
Index.buildIndex()
|
Index.buildIndex()
|
||||||
Index.setPage()
|
Index.setPage()
|
||||||
|
Index.scrollToIndex()
|
||||||
popstate: (e) ->
|
popstate: (e) ->
|
||||||
unless e?.state
|
unless e?.state
|
||||||
# page load or hash change
|
# page load or hash change
|
||||||
@ -307,6 +308,8 @@ Index =
|
|||||||
if mode not in ['catalog', Conf['Previous Index Mode']]
|
if mode not in ['catalog', Conf['Previous Index Mode']]
|
||||||
Conf['Previous Index Mode'] = mode
|
Conf['Previous Index Mode'] = mode
|
||||||
$.set 'Previous Index Mode', mode
|
$.set 'Previous Index Mode', mode
|
||||||
|
Index.showHiddenThreads = false
|
||||||
|
$('#hidden-toggle a', Index.navLinks).textContent = 'Show'
|
||||||
|
|
||||||
getPagesNum: ->
|
getPagesNum: ->
|
||||||
if Index.isSearching
|
if Index.isSearching
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user