Work when site uses extensions for pages other than .html

This commit is contained in:
ccd0 2018-12-31 12:43:13 -08:00
parent cf856dd8f9
commit ababcb7b1d

View File

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