Amauri CHAMPEAUX 10 лет назад
Родитель
Сommit
76f9824207
3 измененных файлов с 53 добавлено и 2 удалено
  1. 5 0
      README.md
  2. 1 1
      tarteaucitron.js
  3. 47 1
      tarteaucitron.services.js

+ 5 - 0
README.md

@@ -28,18 +28,22 @@ Bonus:
   * Google Adwords (conversion)
   * Google Adwords (remarketing)
   * Pubdirecte
+  * Twenga
   * vShop
 
 * APIs
   * Google jsapi
   * Google Maps
   * Google Tag Manager
+  * Timeline JS
   * Typekit (adobe)
 
 * Audience measurement
   * Alexa
   * Clicky
+  * Crazyegg
   * FERank
+  * Get+
   * Google Analytics (ga.js)
   * Google Analytics (universal)
   * StatCounter
@@ -54,6 +58,7 @@ Bonus:
   * AddThis
   * AddToAny (feed)
   * AddToAny (share)
+  * eKomi
   * Facebook
   * Facebook (like box)
   * Google+

+ 1 - 1
tarteaucitron.js

@@ -10,7 +10,7 @@ var scripts = document.getElementsByTagName('script'),
     tarteaucitronNoAdBlocker = false;
 
 var tarteaucitron = {
-    "version": 300,
+    "version": 301,
     "cdn": cdn,
     "user": {},
     "lang": {},

+ 47 - 1
tarteaucitron.services.js

@@ -1,4 +1,4 @@
-/*global tarteaucitron, ga, Shareaholic, stLight, clicky, top, google, Typekit, FB, ferankReady, IN, stButtons, twttr*/
+/*global tarteaucitron, ga, Shareaholic, stLight, clicky, top, google, Typekit, FB, ferankReady, IN, stButtons, twttr, GS_googleAddAdSenseService, GS_googleEnableAllServices, GA_googleAddSlot, GA_googleFetchAds*/
 /*jslint regexp: true, nomen: true*/
 
 // addthis
@@ -565,6 +565,52 @@ tarteaucitron.services.adsense = {
     }
 };
 
+// google adsense premium
+tarteaucitron.services.adsensepremium = {
+    "key": "adsensepremium",
+    "type": "ads",
+    "name": "Google Adsense (premium)",
+    "uri": "http://www.google.com/ads/preferences/",
+    "needConsent": true,
+    "cookies": [],
+    "js": function () {
+        "use strict";
+        if (tarteaucitron.user.adsensepremium === undefined) {
+            return;
+        }
+        
+        var div = document.createElement('div'),
+            increment = 0,
+            timer;
+        
+        div.setAttribute("id", "tarteaucitronAdsensePremium");
+        document.getElementsByTagName('body')[0].appendChild(div);
+        
+        tarteaucitron.makeAsync.init('//partner.googleadservices.com/gampad/google_service.js', 'tarteaucitronAdsensePremium');
+        timer = setInterval(function () {
+            increment += 1;
+            if (typeof GS_googleAddAdSenseService !== "undefined" &&
+                    typeof GS_googleEnableAllServices !== "undefined" &&
+                    typeof GA_googleAddSlot !== "undefined" &&
+                    typeof GA_googleFetchAds !== "undefined") {
+                
+                var i,
+                    arr = tarteaucitron.user.adsensepremiumArr.split(',');
+        
+                GS_googleAddAdSenseService(tarteaucitron.user.adsensepremium);
+                GS_googleEnableAllServices();
+                for (i = 0; i < arr.length; i += 1) {
+                    GA_googleAddSlot(tarteaucitron.user.adsensepremium, arr[i]);
+                }
+                GA_googleFetchAds();
+                clearInterval(timer);
+            } else if (increment >= 100) {
+                clearInterval(timer);
+            }
+        }, 10);
+    }
+};
+
 // google adsense search (form)
 tarteaucitron.services.adsensesearchform = {
     "key": "adsensesearchform",