Backport @vampiricwulf's flash features

This commit is contained in:
Zixaphir 2014-02-23 08:32:06 -07:00
parent 87d3624442
commit 8fa130c2df
5 changed files with 71 additions and 7 deletions

View File

@ -1,5 +1,5 @@
/*
* 4chan X - Version 1.3.7 - 2014-02-20
* 4chan X - Version 1.3.7 - 2014-02-23
*
* Licensed under the MIT license.
* https://github.com/Spittie/4chan-x/blob/master/LICENSE

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -339,6 +339,7 @@ Main =
['Show Dice Roll', Dice]
['Banner', Banner]
['Navigate', Navigate]
['Flash Features', Flash]
]
Main.init()

View File

@ -0,0 +1,17 @@
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'
sauceLink = $.el 'a',
textContent: 'Check Sauce on SWFCHAN'
href: "http://eye.swfchan.com/search/?q=#{swfName.textContent}"
$.rmAll nav
$.add nav, [$.tn('['), sauceLink, $.tn(']')]