From ef45e3290e14b76e3ce0a9f287d0ae6de0d9279b Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Mon, 4 Apr 2016 16:51:34 -0400 Subject: [PATCH] Don't hard-code center justify of AdSense ads. Let position be customized with CSS. --- assets/javascripts/discourse/components/google-adsense.js.es6 | 4 ++-- .../discourse/templates/components/google-adsense.hbs | 4 ++-- plugin.rb | 4 ++++ 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/assets/javascripts/discourse/components/google-adsense.js.es6 b/assets/javascripts/discourse/components/google-adsense.js.es6 index 31d8fa0..a349ff4 100644 --- a/assets/javascripts/discourse/components/google-adsense.js.es6 +++ b/assets/javascripts/discourse/components/google-adsense.js.es6 @@ -115,7 +115,7 @@ export default Ember.Component.extend({ }, adWrapperStyle: function() { - return `width: ${this.get('ad_width')}px; height: ${this.get('ad_height')}px; margin:0 auto;`.htmlSafe(); + return `width: ${this.get('ad_width')}px; height: ${this.get('ad_height')}px;`.htmlSafe(); }.property('ad_width', 'ad_height'), adInsStyle: function() { @@ -123,7 +123,7 @@ export default Ember.Component.extend({ }.property('adWrapperStyle'), adWrapperStyleMobile: function() { - return `width: ${this.get('ad_mobile_width')}px; height: ${this.get('ad_mobile_height')}px; margin:0 auto;`.htmlSafe(); + return `width: ${this.get('ad_mobile_width')}px; height: ${this.get('ad_mobile_height')}px;`.htmlSafe(); }.property('ad_mobile_width', 'ad_mobile_height'), adTitleStyleMobile: function() { diff --git a/assets/javascripts/discourse/templates/components/google-adsense.hbs b/assets/javascripts/discourse/templates/components/google-adsense.hbs index 83ca346..7d81e18 100644 --- a/assets/javascripts/discourse/templates/components/google-adsense.hbs +++ b/assets/javascripts/discourse/templates/components/google-adsense.hbs @@ -1,7 +1,7 @@ {{#if checkTrustLevels}} {{#if site.mobileView}}

ADVERTISEMENT

-
+
{{else}}

ADVERTISEMENT

-
+