Move site type specific linkification tests to appropriate place.
This commit is contained in:
parent
6387eb4ad1
commit
f9dc328286
@ -14,7 +14,7 @@ Linkify =
|
|||||||
node: ->
|
node: ->
|
||||||
return Embedding.events @ if @isClone
|
return Embedding.events @ if @isClone
|
||||||
return unless Linkify.regString.test @info.comment
|
return unless Linkify.regString.test @info.comment
|
||||||
for link in $$ 'a', @nodes.comment when ImageHost.test(link.hostname) or /\bnofollow\b/.test(link.rel)
|
for link in $$ 'a', @nodes.comment when g.SITE.isLinkified?(link)
|
||||||
$.addClass link, 'linkify'
|
$.addClass link, 'linkify'
|
||||||
ImageHost.fixLinks [link] if ImageHost.useFaster
|
ImageHost.fixLinks [link] if ImageHost.useFaster
|
||||||
Embedding.process link, @
|
Embedding.process link, @
|
||||||
|
|||||||
@ -166,3 +166,6 @@ SW.tinyboard =
|
|||||||
isThumbExpanded: (file) ->
|
isThumbExpanded: (file) ->
|
||||||
# Detect old Tinyboard image expansion that changes src attribute on thumbnail.
|
# Detect old Tinyboard image expansion that changes src attribute on thumbnail.
|
||||||
$.hasClass file.thumb.parentNode, 'expanded'
|
$.hasClass file.thumb.parentNode, 'expanded'
|
||||||
|
|
||||||
|
isLinkified: (link) ->
|
||||||
|
/\bnofollow\b/.test(link.rel)
|
||||||
|
|||||||
@ -168,3 +168,6 @@ SW.yotsuba =
|
|||||||
while i < 8
|
while i < 8
|
||||||
msg = (msg << 5) - msg + uid.charCodeAt i++
|
msg = (msg << 5) - msg + uid.charCodeAt i++
|
||||||
(msg >> 8) & 0xFFFFFF
|
(msg >> 8) & 0xFFFFFF
|
||||||
|
|
||||||
|
isLinkified: (link) ->
|
||||||
|
ImageHost.test(link.hostname)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user