tarteaucitron.services.js 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760
  1. /*global tarteaucitron, ga, Shareaholic, stLight, clicky, top, google, Typekit*/
  2. /*jslint regexp: true, nomen: true*/
  3. // addthis
  4. tarteaucitron.services.addthis = {
  5. "key": "addthis",
  6. "type": "social",
  7. "name": "AddThis",
  8. "uri": "http://www.addthis.com/privacy/privacy-policy#publisher-visitors",
  9. "needConsent": true,
  10. "cookies": ['__atuvc', '__atuvs'],
  11. "js": function () {
  12. "use strict";
  13. if (tarteaucitron.user.addthisPubId === undefined) {
  14. return;
  15. }
  16. tarteaucitron.fallback(['addthis_sharing_toolbox'], '');
  17. tarteaucitron.addScript('//s7.addthis.com/js/300/addthis_widget.js#pubid=' + tarteaucitron.user.addthisPubId);
  18. },
  19. "fallback": function () {
  20. "use strict";
  21. var id = 'addthis';
  22. tarteaucitron.fallback(['addthis_sharing_toolbox'], tarteaucitron.engage(id));
  23. }
  24. };
  25. // addtoanyfeed
  26. tarteaucitron.services.addtoanyfeed = {
  27. "key": "addtoanyfeed",
  28. "type": "social",
  29. "name": "AddToAny (feed)",
  30. "uri": "https://www.addtoany.com/privacy",
  31. "needConsent": true,
  32. "cookies": [],
  33. "js": function () {
  34. "use strict";
  35. if (tarteaucitron.user.addtoanyfeedUri === undefined) {
  36. return;
  37. }
  38. tarteaucitron.user.addtoanyfeedSubscribeLink = 'https://www.addtoany.com/subscribe?linkurl=' + tarteaucitron.user.addtoanyfeedUri;
  39. window.a2a_config = window.a2a_config || {};
  40. window.a2a_config.linkurl = tarteaucitron.user.addtoanyfeedUri;
  41. tarteaucitron.addScript('//static.addtoany.com/menu/feed.js');
  42. },
  43. "fallback": function () {
  44. "use strict";
  45. tarteaucitron.user.addtoanyfeedSubscribeLink = 'https://www.addtoany.com/subscribe?linkurl=' + tarteaucitron.user.addtoanyfeedUri;
  46. }
  47. };
  48. // addtoanyshare
  49. tarteaucitron.services.addtoanyshare = {
  50. "key": "addtoanyshare",
  51. "type": "social",
  52. "name": "AddToAny (share)",
  53. "uri": "https://www.addtoany.com/privacy",
  54. "needConsent": true,
  55. "cookies": [],
  56. "js": function () {
  57. "use strict";
  58. tarteaucitron.fallback(['tac_addtoanyshare'], '');
  59. tarteaucitron.addScript('//static.addtoany.com/menu/page.js');
  60. },
  61. "fallback": function () {
  62. "use strict";
  63. var id = 'addtoanyshare';
  64. tarteaucitron.fallback(['tac_addtoanyshare'], tarteaucitron.engage(id));
  65. }
  66. };
  67. // alexa
  68. tarteaucitron.services.alexa = {
  69. "key": "alexa",
  70. "type": "analytic",
  71. "name": "Alexa",
  72. "uri": "http://www.alexa.com/help/privacy",
  73. "needConsent": true,
  74. "cookies": ['__asc', '__auc'],
  75. "js": function () {
  76. "use strict";
  77. if (tarteaucitron.user.alexaAccountID === undefined) {
  78. return;
  79. }
  80. window._atrk_opts = {
  81. atrk_acct: tarteaucitron.user.alexaAccountID,
  82. domain: window.location.hostname.match(/[^\.]*\.[^.]*$/)[0],
  83. dynamic: true
  84. };
  85. tarteaucitron.addScript('https://d31qbv1cthcecs.cloudfront.net/atrk.js');
  86. }
  87. };
  88. // clicky
  89. tarteaucitron.services.clicky = {
  90. "key": "clicky",
  91. "type": "analytic",
  92. "name": "Clicky",
  93. "uri": "https://clicky.com/terms",
  94. "needConsent": true,
  95. "cookies": ['_jsuid', '_eventqueue', '_referrer_og', '_utm_og', '_first_pageview', 'clicky_olark', 'no_trackyy_' + tarteaucitron.user.clickyId, 'unpoco_' + tarteaucitron.user.clickyId, 'heatmaps_g2g_' + tarteaucitron.user.clickyId],
  96. "js": function () {
  97. "use strict";
  98. if (tarteaucitron.user.clickyId === undefined) {
  99. return;
  100. }
  101. tarteaucitron.addScript('//static.getclicky.com/js', '', function () {
  102. if (typeof clicky.init === 'function') {
  103. clicky.init(tarteaucitron.user.clickyId);
  104. }
  105. if (typeof tarteaucitron.user.clickyMore === 'function') {
  106. tarteaucitron.user.clickyMore();
  107. }
  108. });
  109. }
  110. };
  111. // dailymotion
  112. tarteaucitron.services.dailymotion = {
  113. "key": "dailymotion",
  114. "type": "video",
  115. "name": "Dailymotion",
  116. "uri": "http://www.dailymotion.com/legal/privacy",
  117. "needConsent": true,
  118. "cookies": ['ts', 'dmvk', 'hist', 'v1st', 's_vi'],
  119. "js": function () {
  120. "use strict";
  121. tarteaucitron.fallback(['dailymotion_player'], function (x) {
  122. var video_id = x.getAttribute("videoID"),
  123. video_width = x.getAttribute("width"),
  124. frame_width = 'width=',
  125. video_height = x.getAttribute("height"),
  126. frame_height = 'height=',
  127. video_frame;
  128. if (video_id === undefined) {
  129. return "";
  130. }
  131. if (video_width !== undefined) {
  132. frame_width += '"' + video_width + '" ';
  133. } else {
  134. frame_width += '"" ';
  135. }
  136. if (video_height !== undefined) {
  137. frame_height += '"' + video_height + '" ';
  138. } else {
  139. frame_height += '"" ';
  140. }
  141. video_frame = '<iframe src="//www.dailymotion.com/embed/video/' + video_id + '" ' + frame_width + frame_height + ' frameborder="0" allowfullscreen></iframe>';
  142. return video_frame;
  143. });
  144. },
  145. "fallback": function () {
  146. "use strict";
  147. var id = 'dailymotion';
  148. tarteaucitron.fallback(['dailymotion_player'], tarteaucitron.engage(id));
  149. }
  150. };
  151. // disqus
  152. tarteaucitron.services.disqus = {
  153. "key": "disqus",
  154. "type": "comment",
  155. "name": "Disqus",
  156. "uri": "https://help.disqus.com/customer/portal/articles/466259-privacy-policy",
  157. "needConsent": true,
  158. "cookies": [],
  159. "js": function () {
  160. "use strict";
  161. if (tarteaucitron.user.disqusShortname === undefined) {
  162. return;
  163. }
  164. tarteaucitron.addScript('//' + tarteaucitron.user.disqusShortname + '.disqus.com/embed.js');
  165. tarteaucitron.addScript('//' + tarteaucitron.user.disqusShortname + '.disqus.com/count.js');
  166. },
  167. "fallback": function () {
  168. "use strict";
  169. var id = 'disqus';
  170. if (document.getElementById('disqus_thread')) {
  171. document.getElementById('disqus_thread').innerHTML = tarteaucitron.engage(id);
  172. }
  173. }
  174. };
  175. // facebook
  176. tarteaucitron.services.facebook = {
  177. "key": "facebook",
  178. "type": "social",
  179. "name": "Facebook",
  180. "uri": "https://www.facebook.com/help/cookies/",
  181. "needConsent": true,
  182. "cookies": [],
  183. "js": function () {
  184. "use strict";
  185. tarteaucitron.fallback(['fb-post', 'fb-follow', 'fb-activity', 'fb-send', 'fb-share-button', 'fb-like'], '');
  186. tarteaucitron.addScript('//connect.facebook.net/' + tarteaucitron.getLocale() + '/sdk.js#xfbml=1&version=v2.0', 'facebook-jssdk');
  187. },
  188. "fallback": function () {
  189. "use strict";
  190. var id = 'facebook';
  191. tarteaucitron.fallback(['fb-post', 'fb-follow', 'fb-activity', 'fb-send', 'fb-share-button', 'fb-like'], tarteaucitron.engage(id));
  192. }
  193. };
  194. // facebooklikebox
  195. tarteaucitron.services.facebooklikebox = {
  196. "key": "facebooklikebox",
  197. "type": "social",
  198. "name": "Facebook (like box)",
  199. "uri": "https://www.facebook.com/help/cookies/",
  200. "needConsent": true,
  201. "cookies": [],
  202. "js": function () {
  203. "use strict";
  204. tarteaucitron.fallback(['fb-like-box'], '');
  205. tarteaucitron.addScript('//connect.facebook.net/' + tarteaucitron.getLocale() + '/sdk.js#xfbml=1&version=v2.0', 'facebook-jssdk');
  206. },
  207. "fallback": function () {
  208. "use strict";
  209. var id = 'facebooklikebox';
  210. tarteaucitron.fallback(['fb-like-box'], tarteaucitron.engage(id));
  211. }
  212. };
  213. // facebookcomment
  214. tarteaucitron.services.facebookcomment = {
  215. "key": "facebookcomment",
  216. "type": "comment",
  217. "name": "Facebook (commentaire)",
  218. "uri": "https://www.facebook.com/help/cookies/",
  219. "needConsent": true,
  220. "cookies": [],
  221. "js": function () {
  222. "use strict";
  223. tarteaucitron.fallback(['fb-comments'], '');
  224. tarteaucitron.addScript('//connect.facebook.net/' + tarteaucitron.getLocale() + '/sdk.js#xfbml=1&version=v2.0', 'facebook-jssdk');
  225. },
  226. "fallback": function () {
  227. "use strict";
  228. var id = 'facebookcomment';
  229. tarteaucitron.fallback(['fb-comments'], tarteaucitron.engage(id));
  230. }
  231. };
  232. // ferank
  233. tarteaucitron.services.ferank = {
  234. "key": "ferank",
  235. "type": "analytic",
  236. "name": "FERank",
  237. "uri": "https://www.ferank.fr/respect-vie-privee/#mesureaudience",
  238. "needConsent": false,
  239. "cookies": [],
  240. "js": function () {
  241. "use strict";
  242. tarteaucitron.addScript('//static.ferank.fr/pixel.js', '', function () {
  243. if (typeof tarteaucitron.user.ferankMore === 'function') {
  244. tarteaucitron.user.ferankMore();
  245. }
  246. });
  247. }
  248. };
  249. // ferank pub
  250. tarteaucitron.services.ferankpub = {
  251. "key": "ferankpub",
  252. "type": "ads",
  253. "name": "FERank (pub)",
  254. "uri": "https://www.ferank.fr/respect-vie-privee/#regiepublicitaire",
  255. "needConsent": false,
  256. "cookies": [],
  257. "js": function () {
  258. "use strict";
  259. tarteaucitron.addScript('//static.ferank.fr/publicite.async.js');
  260. },
  261. "fallback": function () {
  262. "use strict";
  263. var id = 'ferankpub';
  264. tarteaucitron.fallback(['ferank-publicite'], tarteaucitron.engage(id));
  265. }
  266. };
  267. // google+
  268. tarteaucitron.services.gplus = {
  269. "key": "gplus",
  270. "type": "social",
  271. "name": "Google+",
  272. "uri": "http://www.google.fr/intl/policies/privacy/",
  273. "needConsent": true,
  274. "cookies": [],
  275. "js": function () {
  276. "use strict";
  277. tarteaucitron.addScript('https://apis.google.com/js/platform.js');
  278. },
  279. "fallback": function () {
  280. "use strict";
  281. var id = 'gplus';
  282. tarteaucitron.fallback(['g-plus', 'g-plusone'], tarteaucitron.engage(id));
  283. }
  284. };
  285. // google+ badge
  286. tarteaucitron.services.gplusbadge = {
  287. "key": "gplusbadge",
  288. "type": "social",
  289. "name": "Google+ (badge)",
  290. "uri": "http://www.google.fr/intl/policies/privacy/",
  291. "needConsent": true,
  292. "cookies": [],
  293. "js": function () {
  294. "use strict";
  295. tarteaucitron.addScript('https://apis.google.com/js/platform.js');
  296. },
  297. "fallback": function () {
  298. "use strict";
  299. var id = 'gplusbadge';
  300. tarteaucitron.fallback(['g-page', 'g-person'], tarteaucitron.engage(id));
  301. }
  302. };
  303. // google adsense
  304. tarteaucitron.services.adsense = {
  305. "key": "adsense",
  306. "type": "ads",
  307. "name": "Adsense (Google)",
  308. "uri": "http://www.google.com/ads/preferences/",
  309. "needConsent": true,
  310. "cookies": [],
  311. "js": function () {
  312. "use strict";
  313. tarteaucitron.addScript('//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js');
  314. },
  315. "fallback": function () {
  316. "use strict";
  317. var id = 'adsense';
  318. tarteaucitron.fallback(['adsbygoogle'], tarteaucitron.engage(id));
  319. }
  320. };
  321. // google analytics (old)
  322. tarteaucitron.services.gajs = {
  323. "key": "gajs",
  324. "type": "analytic",
  325. "name": "Google Analytics (ga.js)",
  326. "uri": "https://support.google.com/analytics/answer/6004245",
  327. "needConsent": true,
  328. "cookies": ['_ga', '_gat', '__utma', '__utmb', '__utmc', '__utmt', '__utmz'],
  329. "js": function () {
  330. "use strict";
  331. window._gaq = window._gaq || [];
  332. window._gaq.push(['_setAccount', tarteaucitron.user.gajsUa]);
  333. window._gaq.push(['_trackPageview']);
  334. tarteaucitron.addScript('//www.google-analytics.com/ga.js', '', function () {
  335. if (typeof tarteaucitron.user.gajsMore === 'function') {
  336. tarteaucitron.user.gajsMore();
  337. }
  338. });
  339. }
  340. };
  341. // google analytics
  342. tarteaucitron.services.analytics = {
  343. "key": "analytics",
  344. "type": "analytic",
  345. "name": "Google Analytics (universal)",
  346. "uri": "https://support.google.com/analytics/answer/6004245",
  347. "needConsent": true,
  348. "cookies": ['_ga', '_gat', '__utma', '__utmb', '__utmc', '__utmt', '__utmz'],
  349. "js": function () {
  350. "use strict";
  351. window.GoogleAnalyticsObject = 'ga';
  352. window.ga = window.ga || function () {
  353. window.ga.q = window.ga.q || [];
  354. window.ga.q.push(arguments);
  355. };
  356. window.ga.l = new Date();
  357. tarteaucitron.addScript('//www.google-analytics.com/analytics.js', '', function () {
  358. ga('create', tarteaucitron.user.analyticsUa, {'cookieExpires': 34128000});
  359. ga('send', 'pageview');
  360. if (typeof tarteaucitron.user.analyticsMore === 'function') {
  361. tarteaucitron.user.analyticsMore();
  362. }
  363. });
  364. }
  365. };
  366. // google maps
  367. tarteaucitron.services.googlemaps = {
  368. "key": "googlemaps",
  369. "type": "api",
  370. "name": "Google Maps",
  371. "uri": "http://www.google.com/ads/preferences/",
  372. "needConsent": true,
  373. "cookies": [],
  374. "js": function () {
  375. "use strict";
  376. if (tarteaucitron.user.googlemapsApiKey === undefined) {
  377. return;
  378. }
  379. tarteaucitron.addScript('//maps.googleapis.com/maps/api/js?v=3.exp&signed_in=true&callback=tarteaucitron_googlemaps&key=' + tarteaucitron.user.googlemapsApiKey);
  380. },
  381. "fallback": function () {
  382. "use strict";
  383. var id = 'googlemaps';
  384. if (document.getElementById('tac_map-canvas')) {
  385. document.getElementById('tac_map-canvas').innerHTML = tarteaucitron.engage(id);
  386. }
  387. }
  388. };
  389. // google tag manager
  390. tarteaucitron.services.googletagmanager = {
  391. "key": "googletagmanager",
  392. "type": "api",
  393. "name": "Google Tag Manager",
  394. "uri": "http://www.google.com/ads/preferences/",
  395. "needConsent": true,
  396. "cookies": ['_ga', '_gat', '__utma', '__utmb', '__utmc', '__utmt', '__utmz'],
  397. "js": function () {
  398. "use strict";
  399. if (tarteaucitron.user.googletagmanagerId === undefined) {
  400. return;
  401. }
  402. window.dataLayer = window.dataLayer || [];
  403. window.dataLayer.push({
  404. 'gtm.start': new Date().getTime(),
  405. event: 'gtm.js'
  406. });
  407. tarteaucitron.addScript('//www.googletagmanager.com/gtm.js?id=' + tarteaucitron.user.googletagmanagerId);
  408. }
  409. };
  410. // jsapi
  411. tarteaucitron.services.jsapi = {
  412. "key": "jsapi",
  413. "type": "api",
  414. "name": "Google jsapi",
  415. "uri": "http://www.google.com/policies/privacy/",
  416. "needConsent": true,
  417. "cookies": [],
  418. "js": function () {
  419. "use strict";
  420. tarteaucitron.addScript('//www.google.com/jsapi');
  421. }
  422. };
  423. // linkedin
  424. tarteaucitron.services.linkedin = {
  425. "key": "linkedin",
  426. "type": "social",
  427. "name": "Linkedin",
  428. "uri": "https://www.linkedin.com/legal/cookie_policy",
  429. "needConsent": true,
  430. "cookies": [],
  431. "js": function () {
  432. "use strict";
  433. tarteaucitron.fallback(['tacLinkedin'], '');
  434. tarteaucitron.addScript('//platform.linkedin.com/in.js');
  435. },
  436. "fallback": function () {
  437. "use strict";
  438. var id = 'linkedin';
  439. tarteaucitron.fallback(['tacLinkedin'], tarteaucitron.engage(id));
  440. }
  441. };
  442. // pinterest
  443. tarteaucitron.services.pinterest = {
  444. "key": "pinterest",
  445. "type": "social",
  446. "name": "Pinterest",
  447. "uri": "https://about.pinterest.com/privacy-policy",
  448. "needConsent": true,
  449. "cookies": [],
  450. "js": function () {
  451. "use strict";
  452. tarteaucitron.addScript('//assets.pinterest.com/js/pinit.js');
  453. }
  454. };
  455. // shareaholic
  456. tarteaucitron.services.shareaholic = {
  457. "key": "shareaholic",
  458. "type": "social",
  459. "name": "Shareaholic",
  460. "uri": "https://shareaholic.com/privacy/choices",
  461. "needConsent": true,
  462. "cookies": ['__utma', '__utmb', '__utmc', '__utmz', '__utmt_Shareaholic%20Pageviews'],
  463. "js": function () {
  464. "use strict";
  465. if (tarteaucitron.user.shareaholicSiteId === undefined) {
  466. return;
  467. }
  468. tarteaucitron.fallback(['shareaholic-canvas'], '');
  469. tarteaucitron.addScript('//dsms0mj1bbhn4.cloudfront.net/assets/pub/shareaholic.js', '', function () {
  470. try {
  471. Shareaholic.init(tarteaucitron.user.shareaholicSiteId);
  472. } catch (e) {}
  473. });
  474. },
  475. "fallback": function () {
  476. "use strict";
  477. var id = 'shareaholic';
  478. tarteaucitron.fallback(['shareaholic-canvas'], tarteaucitron.engage(id));
  479. }
  480. };
  481. // sharethis
  482. tarteaucitron.services.sharethis = {
  483. "key": "sharethis",
  484. "type": "social",
  485. "name": "ShareThis",
  486. "uri": "http://www.sharethis.com/legal/privacy/",
  487. "needConsent": true,
  488. "cookies": ['__unam'],
  489. "js": function () {
  490. "use strict";
  491. if (tarteaucitron.user.sharethisPublisher === undefined) {
  492. return;
  493. }
  494. var switchTo5x = true,
  495. uri = ('https:' === document.location.protocol ? 'https://ws' : 'http://w') + '.sharethis.com/button/buttons.js';
  496. tarteaucitron.fallback(['tacSharethis'], '');
  497. tarteaucitron.addScript(uri, '', function () {
  498. stLight.options({publisher: tarteaucitron.user.sharethisPublisher, doNotHash: false, doNotCopy: false, hashAddressBar: false});
  499. });
  500. },
  501. "fallback": function () {
  502. "use strict";
  503. var id = 'sharethis';
  504. tarteaucitron.fallback(['tacSharethis'], tarteaucitron.engage(id));
  505. }
  506. };
  507. // typekit
  508. tarteaucitron.services.typekit = {
  509. "key": "typekit",
  510. "type": "api",
  511. "name": "Typekit (adobe)",
  512. "uri": "http://www.adobe.com/fr/privacy.html",
  513. "needConsent": true,
  514. "cookies": [],
  515. "js": function () {
  516. "use strict";
  517. if (tarteaucitron.user.typekitId === undefined) {
  518. return;
  519. }
  520. tarteaucitron.addScript('//use.typekit.net/' + tarteaucitron.user.typekitId + '.js', '', function () {
  521. try {
  522. Typekit.load();
  523. } catch (e) {}
  524. });
  525. }
  526. };
  527. // twitter
  528. tarteaucitron.services.twitter = {
  529. "key": "twitter",
  530. "type": "social",
  531. "name": "Twitter",
  532. "uri": "https://support.twitter.com/articles/20170514",
  533. "needConsent": true,
  534. "cookies": [],
  535. "js": function () {
  536. "use strict";
  537. tarteaucitron.fallback(['tacTwitter'], '');
  538. tarteaucitron.addScript('//platform.twitter.com/widgets.js', 'twitter-wjs');
  539. },
  540. "fallback": function () {
  541. "use strict";
  542. var id = 'twitter';
  543. tarteaucitron.fallback(['tacTwitter'], tarteaucitron.engage(id));
  544. }
  545. };
  546. // user voice
  547. tarteaucitron.services.uservoice = {
  548. "key": "uservoice",
  549. "type": "support",
  550. "name": "UserVoice",
  551. "uri": "https://www.uservoice.com/privacy/",
  552. "needConsent": true,
  553. "cookies": [],
  554. "js": function () {
  555. "use strict";
  556. if (tarteaucitron.user.userVoiceApi === undefined) {
  557. return;
  558. }
  559. tarteaucitron.addScript('//widget.uservoice.com/' + tarteaucitron.user.userVoiceApi + '.js');
  560. }
  561. };
  562. // vimeo
  563. tarteaucitron.services.vimeo = {
  564. "key": "vimeo",
  565. "type": "video",
  566. "name": "Vimeo",
  567. "uri": "http://vimeo.com/privacy",
  568. "needConsent": true,
  569. "cookies": ['__utmt_player', '__utma', '__utmb', '__utmc', '__utmv', 'vuid', '__utmz', 'player'],
  570. "js": function () {
  571. "use strict";
  572. tarteaucitron.fallback(['vimeo_player'], function (x) {
  573. var video_id = x.getAttribute("videoID"),
  574. video_width = x.getAttribute("width"),
  575. frame_width = 'width=',
  576. video_height = x.getAttribute("height"),
  577. frame_height = 'height=',
  578. video_frame;
  579. if (video_id === undefined) {
  580. return "";
  581. }
  582. if (video_width !== undefined) {
  583. frame_width += '"' + video_width + '" ';
  584. } else {
  585. frame_width += '"" ';
  586. }
  587. if (video_height !== undefined) {
  588. frame_height += '"' + video_height + '" ';
  589. } else {
  590. frame_height += '"" ';
  591. }
  592. video_frame = '<iframe src="//player.vimeo.com/video/' + video_id + '" ' + frame_width + frame_height + ' frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>';
  593. return video_frame;
  594. });
  595. },
  596. "fallback": function () {
  597. "use strict";
  598. var id = 'vimeo';
  599. tarteaucitron.fallback(['vimeo_player'], tarteaucitron.engage(id));
  600. }
  601. };
  602. // visualrevenue
  603. tarteaucitron.services.visualrevenue = {
  604. "key": "visualrevenue",
  605. "type": "analytic",
  606. "name": "VisualRevenue",
  607. "uri": "http://www.outbrain.com/legal/privacy-713/",
  608. "needConsent": true,
  609. "cookies": ['__vrf', '__vrm', '__vrl', '__vry', '__vru', '__vrid', '__vrz'],
  610. "js": function () {
  611. "use strict";
  612. if (tarteaucitron.user.visualrevenueId === undefined) {
  613. return;
  614. }
  615. window._vrq = window._vrq || [];
  616. window._vrq.push(['id', tarteaucitron.user.visualrevenueId]);
  617. window._vrq.push(['automate', true]);
  618. window._vrq.push(['track', function () {}]);
  619. tarteaucitron.addScript('http://a.visualrevenue.com/vrs.js');
  620. }
  621. };
  622. // xiti
  623. tarteaucitron.services.xiti = {
  624. "key": "xiti",
  625. "type": "analytic",
  626. "name": "Xiti",
  627. "uri": "http://www.atinternet.com/politique-du-respect-de-la-vie-privee/",
  628. "needConsent": true,
  629. "cookies": [],
  630. "js": function () {
  631. "use strict";
  632. if (tarteaucitron.user.xitiId === undefined) {
  633. return;
  634. }
  635. var Xt_param = 's=' + tarteaucitron.user.xitiId + '&p=',
  636. Xt_r,
  637. Xt_h,
  638. Xt_i,
  639. Xt_s,
  640. div = document.createElement('div');
  641. try {
  642. Xt_r = top.document.referrer;
  643. } catch (e) {
  644. Xt_r = document.referrer;
  645. }
  646. Xt_h = new Date();
  647. Xt_i = '<img style="display:none" border="0" alt="" ';
  648. Xt_i += 'src="http://logv3.xiti.com/hit.xiti?' + Xt_param;
  649. Xt_i += '&hl=' + Xt_h.getHours() + 'x' + Xt_h.getMinutes() + 'x' + Xt_h.getSeconds();
  650. if (parseFloat(navigator.appVersion) >= 4) {
  651. Xt_s = screen;
  652. Xt_i += '&r=' + Xt_s.width + 'x' + Xt_s.height + 'x' + Xt_s.pixelDepth + 'x' + Xt_s.colorDepth;
  653. }
  654. div.innerHTML = Xt_i + '&ref=' + Xt_r.replace(/[<>"]/g, '').replace(/&/g, '$') + '" title="Internet Audience">';
  655. document.getElementsByTagName('body')[0].appendChild(div.firstChild);
  656. if (typeof tarteaucitron.user.xitiMore === 'function') {
  657. tarteaucitron.user.xitiMore();
  658. }
  659. }
  660. };
  661. // youtube
  662. tarteaucitron.services.youtube = {
  663. "key": "youtube",
  664. "type": "video",
  665. "name": "YouTube",
  666. "uri": "https://www.google.fr/intl/fr/policies/privacy/",
  667. "needConsent": true,
  668. "cookies": ['VISITOR_INFO1_LIVE', 'YSC', 'PREF', 'GEUP'],
  669. "js": function () {
  670. "use strict";
  671. tarteaucitron.fallback(['youtube_player'], function (x) {
  672. var video_id = x.getAttribute("videoID"),
  673. video_width = x.getAttribute("width"),
  674. frame_width = 'width=',
  675. video_height = x.getAttribute("height"),
  676. frame_height = 'height=',
  677. video_frame;
  678. if (video_id === undefined) {
  679. return "";
  680. }
  681. if (video_width !== undefined) {
  682. frame_width += '"' + video_width + '" ';
  683. } else {
  684. frame_width += '"" ';
  685. }
  686. if (video_height !== undefined) {
  687. frame_height += '"' + video_height + '" ';
  688. } else {
  689. frame_height += '"" ';
  690. }
  691. video_frame = '<iframe type="text/html" ' + frame_width + frame_height + ' src="//www.youtube.com/embed/' + video_id + ' " frameborder="0"></iframe>';
  692. return video_frame;
  693. });
  694. },
  695. "fallback": function () {
  696. "use strict";
  697. var id = 'youtube';
  698. tarteaucitron.fallback(['youtube_player'], tarteaucitron.engage(id));
  699. }
  700. };
  701. // zopim
  702. tarteaucitron.services.zopim = {
  703. "key": "zopim",
  704. "type": "support",
  705. "name": "Zopim",
  706. "uri": "https://www.zopim.com/privacy",
  707. "needConsent": true,
  708. "cookies": ['__zlcid', '__zprivacy'],
  709. "js": function () {
  710. "use strict";
  711. if (tarteaucitron.user.zopimID === undefined) {
  712. return;
  713. }
  714. tarteaucitron.addScript('//v2.zopim.com/?' + tarteaucitron.user.zopimID);
  715. }
  716. };