Merge branch 'zixaphir' into flash

Bring in Flash.coffee.
This commit is contained in:
ccd0 2015-03-14 14:36:23 -07:00
commit 47d21aa94f
2 changed files with 21 additions and 0 deletions

View File

@ -364,6 +364,7 @@ Main =
['Index Navigation', Nav]
['Keybinds', Keybinds]
['Banner', Banner]
['Flash Features', Flash]
<% if (tests_enabled) { %>
['Build Test', BuildTest]
<% } %>

View File

@ -0,0 +1,20 @@
Flash =
init: ->
if g.BOARD.ID is 'f'
$.ready Flash.initReady
initReady: ->
$.globalEval 'SWFEmbed.init()'
return unless g.VIEW is 'thread'
swfName = $ '.fileText > a'
nav = $ '.navLinks.desktop'
swfName = swfName.href.replace /^(.*?)\/f\//g, ""
sauceLink = $.el 'a',
textContent: 'Check Sauce on SWFCHAN'
href: "http://eye.swfchan.com/search/?q=#{swfName}"
$.addClass nav, 'swfSauce'
$.rmClass nav, 'navLinks'
$.rmAll nav
$.add nav, [$.tn('['), sauceLink, $.tn(']')]