Recognize index and catalog pages on Tinyboard.

This commit is contained in:
ccd0 2017-12-25 16:09:40 -08:00
parent 7719dab474
commit 5dd5ea8030

View File

@ -171,9 +171,9 @@ Main =
if pathname[2] in ['thread', 'res'] if pathname[2] in ['thread', 'res']
g.VIEW = 'thread' g.VIEW = 'thread'
g.THREADID = +pathname[3] g.THREADID = +pathname[3]
else if pathname[2] in ['catalog', 'archive'] else if /^(?:catalog|archive)(?:\.html)?$/.test(pathname[2])
g.VIEW = pathname[2] g.VIEW = pathname[2].replace('.html', '')
else if pathname[2].match /^\d*$/ else if /^(?:index|\d*)(?:\.html)?$/.test(pathname[2])
g.VIEW = 'index' g.VIEW = 'index'
else else
return return