Make Volume in New Tab and Loop in New Tab work on Tinyboard/vichan sites.
This commit is contained in:
parent
32ebd6a318
commit
28ba2df7d4
@ -156,9 +156,9 @@ Main =
|
||||
PostSuccessful.init()
|
||||
return
|
||||
|
||||
if ImageHost.test hostname
|
||||
if g.SITE.isFileURL()
|
||||
$.asap (-> d.readyState isnt 'loading'), ->
|
||||
if Conf['404 Redirect'] and g.SITE.is404?()
|
||||
if g.SITE.software is 'yotsuba' and Conf['404 Redirect'] and g.SITE.is404?()
|
||||
Redirect.navigate 'file', {
|
||||
boardID: g.BOARD.ID
|
||||
filename: pathname[pathname.length - 1]
|
||||
|
||||
@ -132,6 +132,9 @@ SW.tinyboard =
|
||||
bgColoredEl: ->
|
||||
$.el 'div', className: 'post reply'
|
||||
|
||||
isFileURL: ->
|
||||
/\/src\/[^\/]+/.test(location.pathname)
|
||||
|
||||
parseNodes: (post, nodes) ->
|
||||
# Add vichan's span.poster_id around the ID if not already present.
|
||||
return if nodes.uniqueID
|
||||
|
||||
@ -91,6 +91,9 @@ SW.yotsuba =
|
||||
isAuxiliaryPage: ->
|
||||
location.hostname not in ['boards.4chan.org', 'boards.4channel.org']
|
||||
|
||||
isFileURL: ->
|
||||
ImageHost.test(location.hostname)
|
||||
|
||||
scriptData: ->
|
||||
for script in $$ 'script:not([src])', d.head
|
||||
return script.textContent if /\bcooldowns *=/.test script.textContent
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user