Navigating to the index (as opposed to the catalog) will only switch to a non-catalog index mode if Use 4chan X Catalog is enabled.
This commit is contained in:
parent
afed31a85d
commit
f01293b743
@ -81,6 +81,7 @@ Index =
|
|||||||
$.on @searchInput, 'input', @onSearchInput
|
$.on @searchInput, 'input', @onSearchInput
|
||||||
$.on $('#index-search-clear', @navLinks), 'click', @clearSearch
|
$.on $('#index-search-clear', @navLinks), 'click', @clearSearch
|
||||||
$.on $('#hidden-toggle a', @navLinks), 'click', @cb.toggleHiddenThreads
|
$.on $('#hidden-toggle a', @navLinks), 'click', @cb.toggleHiddenThreads
|
||||||
|
$.on $('.returnlink a', @navLinks), 'click', @cb.frontPage unless Conf['Use 4chan X Catalog']
|
||||||
@selectSort.value = Conf[@selectSort.name]
|
@selectSort.value = Conf[@selectSort.name]
|
||||||
$.on @selectSort, 'change', $.cb.value
|
$.on @selectSort, 'change', $.cb.value
|
||||||
$.on @selectSort, 'change', @cb.sort
|
$.on @selectSort, 'change', @cb.sort
|
||||||
@ -234,6 +235,10 @@ Index =
|
|||||||
return if a.textContent is 'Catalog'
|
return if a.textContent is 'Catalog'
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
Index.userPageNav +a.pathname.split('/')[2] or 1
|
Index.userPageNav +a.pathname.split('/')[2] or 1
|
||||||
|
frontPage: (e) ->
|
||||||
|
return if e.shiftKey or e.altKey or e.ctrlKey or e.metaKey or e.button isnt 0
|
||||||
|
e.preventDefault()
|
||||||
|
Index.userPageNav 1
|
||||||
|
|
||||||
scrollToIndex: ->
|
scrollToIndex: ->
|
||||||
Header.scrollToIfNeeded Index.navLinks
|
Header.scrollToIfNeeded Index.navLinks
|
||||||
|
|||||||
@ -57,7 +57,7 @@ CatalogLinks =
|
|||||||
"/#{board}/catalog"
|
"/#{board}/catalog"
|
||||||
|
|
||||||
index: (board=g.BOARD.ID) ->
|
index: (board=g.BOARD.ID) ->
|
||||||
if Conf['JSON Navigation']
|
if Conf['JSON Navigation'] and Conf['Use 4chan X Catalog']
|
||||||
if g.BOARD.ID is board and g.VIEW is 'index' then '#index' else "/#{board}/\#index"
|
if g.BOARD.ID is board and g.VIEW is 'index' then '#index' else "/#{board}/\#index"
|
||||||
else
|
else
|
||||||
"/#{board}/"
|
"/#{board}/"
|
||||||
|
|||||||
@ -102,7 +102,10 @@ Keybinds =
|
|||||||
FappeTyme.cb.toggle.call {name: 'werk'}
|
FappeTyme.cb.toggle.call {name: 'werk'}
|
||||||
# Board Navigation
|
# Board Navigation
|
||||||
when Conf['Front page']
|
when Conf['Front page']
|
||||||
window.location = CatalogLinks.index()
|
if Conf['JSON Navigation'] and !Conf['Use 4chan X Catalog'] and g.VIEW is 'index'
|
||||||
|
Index.userPageNav 1
|
||||||
|
else
|
||||||
|
window.location = CatalogLinks.index()
|
||||||
when Conf['Open front page']
|
when Conf['Open front page']
|
||||||
$.open CatalogLinks.index()
|
$.open CatalogLinks.index()
|
||||||
when Conf['Next page']
|
when Conf['Next page']
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user