diff --git a/assets/javascripts/discourse/components/google-dfp-ad.js.es6 b/assets/javascripts/discourse/components/google-dfp-ad.js.es6 index d82b820..adea1bb 100755 --- a/assets/javascripts/discourse/components/google-dfp-ad.js.es6 +++ b/assets/javascripts/discourse/components/google-dfp-ad.js.es6 @@ -6,7 +6,6 @@ var const_height = ''; var _loaded = false, _promise = null; - function splitWidthInt(value) { var str = value.substring(0, 3); return str.trim(); @@ -78,6 +77,10 @@ export default Ember.Component.extend({ return "div-gpt-ad-" + this.get('placement'); }.property('placement'), + adWrapperStyle: function() { + return `width: ${this.get('const_width')}px; height: ${this.get('const_height')}px;`.htmlSafe(); + }.property('const_width', 'const_height'), + _initGoogleDFP: function() { var self = this; loadGoogle(this.siteSettings).then(function() { diff --git a/assets/javascripts/discourse/templates/components/google-dfp-ad.hbs b/assets/javascripts/discourse/templates/components/google-dfp-ad.hbs index 62ecab0..16cb096 100755 --- a/assets/javascripts/discourse/templates/components/google-dfp-ad.hbs +++ b/assets/javascripts/discourse/templates/components/google-dfp-ad.hbs @@ -1,10 +1,8 @@
-