Make Normalize URL work on Tinyboard/vichan.
This commit is contained in:
parent
fa7f2cb20b
commit
5af268c602
@ -3,12 +3,13 @@ NormalizeURL =
|
||||
return unless Conf['Normalize URL']
|
||||
|
||||
pathname = location.pathname.split /\/+/
|
||||
switch g.VIEW
|
||||
when 'thread'
|
||||
pathname[2] = 'thread'
|
||||
pathname = pathname[0...4]
|
||||
when 'index'
|
||||
pathname = pathname[0...3]
|
||||
if g.SITE.software is 'yotsuba'
|
||||
switch g.VIEW
|
||||
when 'thread'
|
||||
pathname[2] = 'thread'
|
||||
pathname = pathname[0...4]
|
||||
when 'index'
|
||||
pathname = pathname[0...3]
|
||||
pathname = pathname.join '/'
|
||||
if location.pathname isnt pathname
|
||||
history.replaceState history.state, '', "#{location.protocol}//#{location.host}#{pathname}#{location.hash}"
|
||||
|
||||
@ -3,7 +3,6 @@ SW.tinyboard =
|
||||
mayLackJSON: true
|
||||
|
||||
disabledFeatures: [
|
||||
'Normalize URL'
|
||||
'Index Generator'
|
||||
'Announcement Hiding'
|
||||
'Resurrect Quotes'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user