4chan-x/src/Miscellaneous/Flash.coffee
2016-10-01 03:18:22 -07:00

13 lines
411 B
CoffeeScript

Flash =
init: ->
if g.BOARD.ID is 'f' and Conf['Enable Native Flash Embedding']
$.ready Flash.initReady
initReady: ->
if $.hasStorage
$.global -> (window.SWFEmbed.init() if JSON.parse(localStorage['4chan-settings'] or '{}').disableAll)
else
if g.VIEW is 'thread'
$.global -> window.Main.tid = location.pathname.split(/\/+/)[3]
$.global -> window.SWFEmbed.init()