Work when site uses extensions for pages other than .html
This commit is contained in:
parent
cf856dd8f9
commit
ababcb7b1d
@ -176,10 +176,10 @@ Main =
|
|||||||
|
|
||||||
if pathname[2] in ['thread', 'res']
|
if pathname[2] in ['thread', 'res']
|
||||||
g.VIEW = 'thread'
|
g.VIEW = 'thread'
|
||||||
g.THREADID = +pathname[3].replace('.html', '')
|
g.THREADID = +pathname[3].replace(/\.\w+$/, '')
|
||||||
else if /^(?:catalog|archive)(?:\.html)?$/.test(pathname[2])
|
else if /^(?:catalog|archive)(?:\.\w+)?$/.test(pathname[2])
|
||||||
g.VIEW = pathname[2].replace('.html', '')
|
g.VIEW = pathname[2].replace(/\.\w+$/, '')
|
||||||
else if /^(?:index|\d*)(?:\.html)?$/.test(pathname[2])
|
else if /^(?:index|\d*)(?:\.\w+)?$/.test(pathname[2])
|
||||||
g.VIEW = 'index'
|
g.VIEW = 'index'
|
||||||
else
|
else
|
||||||
return
|
return
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user