Merge branch 'zixaphir' into flash
Bring in Flash.coffee.
This commit is contained in:
commit
47d21aa94f
@ -364,6 +364,7 @@ Main =
|
|||||||
['Index Navigation', Nav]
|
['Index Navigation', Nav]
|
||||||
['Keybinds', Keybinds]
|
['Keybinds', Keybinds]
|
||||||
['Banner', Banner]
|
['Banner', Banner]
|
||||||
|
['Flash Features', Flash]
|
||||||
<% if (tests_enabled) { %>
|
<% if (tests_enabled) { %>
|
||||||
['Build Test', BuildTest]
|
['Build Test', BuildTest]
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|||||||
20
src/Miscellaneous/Flash.coffee
Normal file
20
src/Miscellaneous/Flash.coffee
Normal 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(']')]
|
||||||
Loading…
x
Reference in New Issue
Block a user