Fix issues with Google Adsense

This commit is contained in:
Andrew Miner
2015-03-24 19:50:39 -07:00
parent abaf617079
commit c7322ccf83
5 changed files with 12 additions and 6 deletions
@@ -5,8 +5,9 @@ Copyright (c) 2015 by Redwood Labs
All rights reserved.
###
BaseController = require './base_controller'
{ProductionEnvs} = require '../constants'
BaseController = require './base_controller'
{Adsense} = require '../constants'
{ProductionEnvs} = require '../constants'
########################################################################################################################
@@ -25,6 +26,9 @@ module.exports = class AdsenseController extends BaseController
render: ->
if @_adsEnabled
super
@$el.attr 'data-ad-client', Adsense.clientId
@$el.attr 'data-ad-slot', Adsense.slotId
else
@$el.addClass 'placeholder'
@_rendered = true