From c868d4892aae1b9ba5d69529a5a04c8eabac1f52 Mon Sep 17 00:00:00 2001 From: vi Date: Mon, 7 Sep 2015 20:51:59 +1000 Subject: [PATCH] Removed unused css and irrelevant comments and cleaned up formatting --- .../components/google-adsense.js.es6 | 5 --- .../templates/components/google-adsense.hbs | 34 +++++++++---------- plugin.rb | 28 --------------- 3 files changed, 16 insertions(+), 51 deletions(-) diff --git a/assets/javascripts/discourse/components/google-adsense.js.es6 b/assets/javascripts/discourse/components/google-adsense.js.es6 index 20ba2a1..9078f10 100644 --- a/assets/javascripts/discourse/components/google-adsense.js.es6 +++ b/assets/javascripts/discourse/components/google-adsense.js.es6 @@ -37,13 +37,8 @@ PageTracker.current().on('change', function(url) { } // Reinitialize script so that the ad can reload - // window.adsbygoogle = []; var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.id="adsense_loader"; ga.src = '//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js'; -// Creates array of postGoogle vars which are only elements starting with 'google' related to -// Adsense's googleads. This array is used in line 34 to undefine google elements related to Adsense only. - - // Puts relevant elements back into script. var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); }); diff --git a/assets/javascripts/discourse/templates/components/google-adsense.hbs b/assets/javascripts/discourse/templates/components/google-adsense.hbs index 280fdcd..1401e5d 100644 --- a/assets/javascripts/discourse/templates/components/google-adsense.hbs +++ b/assets/javascripts/discourse/templates/components/google-adsense.hbs @@ -1,29 +1,27 @@ {{#if site.mobileView}} -
+
+ style={{adInsStyleMobile}} + data-ad-client="ca-pub-{{publisher_id}}" + data-ad-slot={{ad_mobile_code}}> - -
- + +
{{else}} -
+
+ style={{adInsStyle}} + data-ad-client="ca-pub-{{publisher_id}}" + data-ad-slot={{ad_code}}> - -
- + +
{{/if}} diff --git a/plugin.rb b/plugin.rb index a587e5a..79d6be8 100755 --- a/plugin.rb +++ b/plugin.rb @@ -15,20 +15,6 @@ register_css <