From 220f46454711761b5e022326bf3cf45c5d152a20 Mon Sep 17 00:00:00 2001 From: Amauri CHAMPEAUX Date: Wed, 18 Feb 2015 16:50:56 +0100 Subject: [PATCH] Typekit (by adobe) support --- tarteaucitron.services.js | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/tarteaucitron.services.js b/tarteaucitron.services.js index 57449cb..59b603f 100644 --- a/tarteaucitron.services.js +++ b/tarteaucitron.services.js @@ -1,4 +1,4 @@ -/*global tarteaucitron, ga, Shareaholic, stLight, clicky, top, google*/ +/*global tarteaucitron, ga, Shareaholic, stLight, clicky, top, google, Typekit*/ /*jslint regexp: true, nomen: true*/ // addthis @@ -455,6 +455,28 @@ tarteaucitron.services.sharethis = { } }; +// typekit +tarteaucitron.services.typekit = { + "key": "typekit", + "type": "api", + "name": "Typekit (adobe)", + "uri": "http://www.adobe.com/fr/privacy.html", + "needConsent": true, + "cookies": [], + "js": function () { + "use strict"; + if (tarteaucitron.user.typekitId === undefined) { + return; + } + tarteaucitron.addScript('//use.typekit.net/' + tarteaucitron.user.typekitId + '.js', '', function () { + try { + Typekit.load(); + } catch (e) {} + }); + } +}; + + // twitter tarteaucitron.services.twitter = { "key": "twitter",