tarteaucitron.js 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584
  1. /*jslint browser: true */
  2. // define correct path for files inclusion
  3. var scripts = document.getElementsByTagName('script'),
  4. path = scripts[scripts.length - 1].src.split('?')[0],
  5. cdn = path.split('/').slice(0, -1).join('/') + '/',
  6. alreadyLaunch = (alreadyLaunch === undefined) ? 0 : alreadyLaunch;
  7. var tarteaucitron = {
  8. "cdn": cdn,
  9. "user": {},
  10. "lang": {},
  11. "services": {},
  12. "state": [],
  13. "launch": [],
  14. "init": function (params) {
  15. "use strict";
  16. if (alreadyLaunch === 0) {
  17. alreadyLaunch = 1;
  18. if (window.addEventListener) {
  19. window.addEventListener("load", tarteaucitron.load(params), false);
  20. } else {
  21. window.attachEvent('onload', tarteaucitron.load(params));
  22. }
  23. }
  24. },
  25. "load": function (params) {
  26. "use strict";
  27. var cdn = tarteaucitron.cdn,
  28. language = tarteaucitron.getLanguage(),
  29. pathToLang = cdn + 'lang/tarteaucitron.' + language + '.js',
  30. pathToServices = cdn + 'tarteaucitron.services.js',
  31. linkElement = document.createElement('link'),
  32. defaults = {
  33. "grayArea": false,
  34. "hashtag": '#tarteaucitron',
  35. "highPrivacy": false,
  36. "orientation": "top",
  37. "removeCredit": false,
  38. "showAlertSmall": true
  39. };
  40. // Step 0: get params
  41. if (params !== undefined) {
  42. tarteaucitron.extend(defaults, params);
  43. }
  44. // the hashtag need to be global
  45. tarteaucitron.hashtag = defaults.hashtag;
  46. // Step 1: load css
  47. linkElement.rel = 'stylesheet';
  48. linkElement.type = 'text/css';
  49. linkElement.href = cdn + 'css/tarteaucitron.css';
  50. document.getElementsByTagName('head')[0].appendChild(linkElement);
  51. // Step 2: load language and services
  52. tarteaucitron.addScript(pathToLang, '', function () {
  53. tarteaucitron.addScript(pathToServices, '', function () {
  54. var body = document.body,
  55. div = document.createElement('div'),
  56. hostname = document.location.hostname,
  57. hostRef = document.referrer.split('/')[2],
  58. isNavigating = (hostRef === hostname) ? true : false,
  59. isAutostart,
  60. isDenied,
  61. isAllowed,
  62. isResponded,
  63. cookie = tarteaucitron.cookie.read(),
  64. s = tarteaucitron.services,
  65. service,
  66. html = '',
  67. lastTitle,
  68. alert = false,
  69. index,
  70. orientation = 'Top';
  71. // dedup, clean and sort job[]
  72. function cleanArray(arr) {
  73. var i,
  74. len = arr.length,
  75. out = [],
  76. obj = {};
  77. for (i = 0; i < len; i += 1) {
  78. if (!obj[arr[i]]) {
  79. obj[arr[i]] = {};
  80. if (tarteaucitron.services[arr[i]] !== undefined) {
  81. out.push(arr[i]);
  82. }
  83. }
  84. }
  85. return out;
  86. }
  87. tarteaucitron.job = cleanArray(tarteaucitron.job);
  88. tarteaucitron.job = tarteaucitron.job.sort(function (a, b) {
  89. if (s[a].type + s[a].key > s[b].type + s[b].key) { return 1; }
  90. if (s[a].type + s[a].key < s[b].type + s[b].key) { return -1; }
  91. return 0;
  92. });
  93. // Step 3: prepare the html
  94. html += '<div id="tarteaucitronPremium"></div>';
  95. html += '<div id="tarteaucitronBack" onclick="tarteaucitron.userInterface.closePanel();"></div>';
  96. html += '<div id="tarteaucitron">';
  97. html += ' <div id="tarteaucitronClosePanel" onclick="tarteaucitron.userInterface.closePanel();">';
  98. html += ' ' + tarteaucitron.lang.close;
  99. html += ' </div>';
  100. html += ' <div id="tarteaucitronInfo">';
  101. html += ' ' + tarteaucitron.lang.info;
  102. html += ' <div id="tarteaucitronDisclaimer">';
  103. html += ' ' + tarteaucitron.lang.disclaimer;
  104. html += ' </div>';
  105. html += ' </div>';
  106. html += ' <div id="tarteaucitronServices">';
  107. html += '<div class="tarteaucitronLine tarteaucitronMainLine">';
  108. html += ' <div class="tarteaucitronName">';
  109. html += ' <b>' + tarteaucitron.lang.all + '</b>';
  110. html += ' </div>';
  111. html += ' <div class="tarteaucitronAsk">';
  112. html += ' <div id="tarteaucitronAllAllowed" class="tarteaucitronAllow" onclick="tarteaucitron.userInterface.respondAll(true);">';
  113. html += ' ' + tarteaucitron.lang.allow;
  114. html += ' </div> ';
  115. html += ' <div id="tarteaucitronAllDenied" class="tarteaucitronDeny" onclick="tarteaucitron.userInterface.respondAll(false);">';
  116. html += ' ' + tarteaucitron.lang.deny;
  117. html += ' </div>';
  118. html += ' </div>';
  119. html += '</div>';
  120. html += '<div class="clear"></div>';
  121. for (index = 0; index < tarteaucitron.job.length; index += 1) {
  122. service = s[tarteaucitron.job[index]];
  123. if (lastTitle !== service.type) {
  124. html += '<div class="tarteaucitronTitle">';
  125. html += ' ' + tarteaucitron.lang[service.type].title;
  126. html += ' <div class="tarteaucitronDetails">';
  127. html += ' ' + tarteaucitron.lang[service.type].details;
  128. html += ' </div>';
  129. html += '</div>';
  130. lastTitle = service.type;
  131. }
  132. html += '<div id="' + service.key + 'Line" class="tarteaucitronLine">';
  133. html += ' <div class="tarteaucitronName">';
  134. html += ' <b>' + service.name + '</b><br/>';
  135. html += ' <a href="' + service.uri + '" target="_blank">';
  136. html += ' ' + tarteaucitron.lang.more + ' : ' + service.uri.split('/')[2];
  137. html += ' </a>';
  138. html += ' </div>';
  139. html += ' <div class="tarteaucitronAsk">';
  140. html += ' <div id="' + service.key + 'Allowed" class="tarteaucitronAllow" onclick="tarteaucitron.userInterface.respond(this, true);">';
  141. html += ' ' + tarteaucitron.lang.allow;
  142. html += ' </div> ';
  143. html += ' <div id="' + service.key + 'Denied" class="tarteaucitronDeny" onclick="tarteaucitron.userInterface.respond(this, false);">';
  144. html += ' ' + tarteaucitron.lang.deny;
  145. html += ' </div>';
  146. html += ' </div>';
  147. html += '</div>';
  148. html += '<div class="clear"></div>';
  149. }
  150. html += ' </div>';
  151. if (defaults.removeCredit === false) {
  152. html += ' <div id="tarteaucitronFooter">';
  153. html += ' <a href="https://opt-out.ferank.eu/" rel="nofollow" target="_blank">' + tarteaucitron.lang.credit + '</a>';
  154. html += ' </div>';
  155. }
  156. html += '</div>';
  157. // get the banner orientation
  158. if (defaults.orientation === 'bottom') {
  159. orientation = 'Bottom';
  160. }
  161. if (defaults.highPrivacy) {
  162. html += '<div id="tarteaucitronAlertBig" class="tarteaucitronAlertBig' + orientation + '">';
  163. html += ' <span id="tarteaucitronDisclaimerAlert">';
  164. html += ' ' + tarteaucitron.lang.alertBigPrivacy;
  165. html += ' </span>';
  166. html += ' <span id="tarteaucitronPersonalize" onclick="tarteaucitron.userInterface.openPanel();">';
  167. html += ' ' + tarteaucitron.lang.personalize;
  168. html += ' </span>';
  169. html += '</div>';
  170. } else {
  171. html += '<div id="tarteaucitronAlertBig" class="tarteaucitronAlertBig' + orientation + '">';
  172. html += ' <span id="tarteaucitronDisclaimerAlert">';
  173. html += ' ' + tarteaucitron.lang.alertBig;
  174. html += ' </span>';
  175. html += ' <span id="tarteaucitronPersonalize" onclick="tarteaucitron.userInterface.respondAll(true);">';
  176. html += ' ' + tarteaucitron.lang.acceptAll;
  177. html += ' </span>';
  178. html += ' <span id="tarteaucitronCloseAlert" onclick="tarteaucitron.userInterface.openPanel();">';
  179. html += ' ' + tarteaucitron.lang.personalize;
  180. html += ' </span>';
  181. html += '</div>';
  182. }
  183. if (defaults.showAlertSmall === true) {
  184. html += '<div id="tarteaucitronAlertSmall" onclick="tarteaucitron.userInterface.openPanel();">';
  185. html += ' ' + tarteaucitron.lang.alertSmall;
  186. html += ' <div id="tarteaucitronDot">';
  187. html += ' <span id="tarteaucitronDotGreen"></span>';
  188. html += ' <span id="tarteaucitronDotYellow"></span>';
  189. html += ' <span id="tarteaucitronDotRed"></span>';
  190. html += ' </div>';
  191. html += '</div>';
  192. }
  193. div.id = 'tarteaucitronRoot';
  194. body.appendChild(div, body);
  195. div.innerHTML = html;
  196. // Step 4: load services
  197. for (index = 0; index < tarteaucitron.job.length; index += 1) {
  198. service = s[tarteaucitron.job[index]];
  199. isAutostart = (!service.needConsent) ? true : false;
  200. isDenied = (cookie.indexOf(service.key + '=false') >= 0) ? true : false;
  201. isAllowed = (cookie.indexOf(service.key + '=true') >= 0) ? true : false;
  202. isResponded = (cookie.indexOf(service.key) >= 0) ? true : false;
  203. // allow by default for non EU
  204. if (isResponded === false && tarteaucitron.user.bypass === true) {
  205. isAllowed = true;
  206. tarteaucitron.cookie.create(service.key, true);
  207. }
  208. if ((!isResponded && (isAutostart || isNavigating) && !defaults.highPrivacy) || isAllowed) {
  209. if (!isAllowed) {
  210. tarteaucitron.cookie.create(service.key, true);
  211. }
  212. if (tarteaucitron.launch[service.key] !== true) {
  213. tarteaucitron.launch[service.key] = true;
  214. service.js();
  215. }
  216. tarteaucitron.state[service.key] = true;
  217. tarteaucitron.userInterface.color(service.key, true);
  218. } else if (isDenied) {
  219. if (typeof service.fallback === 'function') {
  220. service.fallback();
  221. }
  222. tarteaucitron.state[service.key] = false;
  223. tarteaucitron.userInterface.color(service.key, false);
  224. } else if (!isResponded) {
  225. if (typeof service.grayJs === 'function' && defaults.grayArea === true) {
  226. service.grayJs();
  227. } else if (typeof service.fallback === 'function') {
  228. service.fallback();
  229. }
  230. }
  231. if (tarteaucitron.state[service.key] === undefined && !alert) {
  232. alert = true;
  233. }
  234. }
  235. // Step 5: display the alert
  236. if (alert) {
  237. tarteaucitron.userInterface.openAlert();
  238. } else {
  239. tarteaucitron.userInterface.closeAlert();
  240. }
  241. if (document.location.hash === tarteaucitron.hashtag && tarteaucitron.hashtag !== '') {
  242. tarteaucitron.userInterface.openPanel();
  243. }
  244. });
  245. });
  246. },
  247. "userInterface": {
  248. "css": function (id, property, value) {
  249. "use strict";
  250. if (document.getElementById(id) !== null) {
  251. document.getElementById(id).style[property] = value;
  252. }
  253. },
  254. "respondAll": function (status) {
  255. "use strict";
  256. var s = tarteaucitron.services,
  257. service,
  258. key,
  259. index = 0;
  260. for (index = 0; index < tarteaucitron.job.length; index += 1) {
  261. service = s[tarteaucitron.job[index]];
  262. key = service.key;
  263. if (tarteaucitron.launch[key] !== true && status === true) {
  264. tarteaucitron.launch[key] = true;
  265. tarteaucitron.services[key].js();
  266. }
  267. tarteaucitron.state[key] = status;
  268. tarteaucitron.cookie.create(key, status);
  269. tarteaucitron.userInterface.color(key, status);
  270. }
  271. },
  272. "respond": function (el, status) {
  273. "use strict";
  274. var key = el.id.replace(new RegExp("(Eng[0-9]+|Allow|Deni)ed", "g"), '');
  275. // return if same state
  276. if (tarteaucitron.state[key] === status) {
  277. return;
  278. }
  279. // if not already launched... launch the service
  280. if (status === true) {
  281. if (tarteaucitron.launch[key] !== true) {
  282. tarteaucitron.launch[key] = true;
  283. tarteaucitron.services[key].js();
  284. }
  285. }
  286. tarteaucitron.state[key] = status;
  287. tarteaucitron.cookie.create(key, status);
  288. tarteaucitron.userInterface.color(key, status);
  289. },
  290. "color": function (key, status) {
  291. "use strict";
  292. var gray = '#808080',
  293. greenDark = '#1B870B',
  294. greenLight = '#E6FFE2',
  295. redDark = '#9C1A1A',
  296. redLight = '#FFE2E2',
  297. yellowDark = '#FBDA26',
  298. c = 'tarteaucitron',
  299. nbDenied = 0,
  300. nbPending = 0,
  301. nbAllowed = 0,
  302. sum = tarteaucitron.job.length,
  303. index;
  304. if (status === true) {
  305. tarteaucitron.userInterface.css(key + 'Line', 'borderLeft', '5px solid ' + greenDark);
  306. tarteaucitron.userInterface.css(key + 'Allowed', 'backgroundColor', greenDark);
  307. tarteaucitron.userInterface.css(key + 'Denied', 'backgroundColor', gray);
  308. } else if (status === false) {
  309. tarteaucitron.userInterface.css(key + 'Line', 'borderLeft', '5px solid ' + redDark);
  310. tarteaucitron.userInterface.css(key + 'Allowed', 'backgroundColor', gray);
  311. tarteaucitron.userInterface.css(key + 'Denied', 'backgroundColor', redDark);
  312. }
  313. // check if all services are allowed
  314. for (index = 0; index < sum; index += 1) {
  315. if (tarteaucitron.state[tarteaucitron.job[index]] === false) {
  316. nbDenied += 1;
  317. } else if (tarteaucitron.state[tarteaucitron.job[index]] === undefined) {
  318. nbPending += 1;
  319. } else if (tarteaucitron.state[tarteaucitron.job[index]] === true) {
  320. nbAllowed += 1;
  321. }
  322. }
  323. tarteaucitron.userInterface.css(c + 'DotGreen', 'width', ((100 / sum) * nbAllowed) + '%');
  324. tarteaucitron.userInterface.css(c + 'DotYellow', 'width', ((100 / sum) * nbPending) + '%');
  325. tarteaucitron.userInterface.css(c + 'DotRed', 'width', ((100 / sum) * nbDenied) + '%');
  326. if (nbDenied === 0 && nbPending === 0) {
  327. tarteaucitron.userInterface.css(c + 'AllAllowed', 'backgroundColor', greenDark);
  328. tarteaucitron.userInterface.css(c + 'AllDenied', 'backgroundColor', gray);
  329. } else if (nbAllowed === 0 && nbPending === 0) {
  330. tarteaucitron.userInterface.css(c + 'AllAllowed', 'backgroundColor', gray);
  331. tarteaucitron.userInterface.css(c + 'AllDenied', 'backgroundColor', redDark);
  332. } else {
  333. tarteaucitron.userInterface.css(c + 'AllAllowed', 'backgroundColor', gray);
  334. tarteaucitron.userInterface.css(c + 'AllDenied', 'backgroundColor', gray);
  335. }
  336. // close the alert if all service have been reviewed
  337. if (nbPending === 0) {
  338. tarteaucitron.userInterface.closeAlert();
  339. }
  340. },
  341. "openPanel": function () {
  342. "use strict";
  343. tarteaucitron.userInterface.css('tarteaucitron', 'display', 'block');
  344. tarteaucitron.userInterface.css('tarteaucitronBack', 'display', 'block');
  345. // setting hash tag
  346. if (tarteaucitron.hashtag !== '') {
  347. document.location.hash = tarteaucitron.hashtag;
  348. }
  349. },
  350. "closePanel": function () {
  351. "use strict";
  352. tarteaucitron.userInterface.css('tarteaucitron', 'display', 'none');
  353. tarteaucitron.userInterface.css('tarteaucitronBack', 'display', 'none');
  354. },
  355. "openAlert": function () {
  356. "use strict";
  357. var c = 'tarteaucitron';
  358. tarteaucitron.userInterface.css(c + 'AlertSmall', 'display', 'none');
  359. tarteaucitron.userInterface.css(c + 'AlertBig', 'display', 'block');
  360. },
  361. "closeAlert": function () {
  362. "use strict";
  363. var c = 'tarteaucitron';
  364. tarteaucitron.userInterface.css(c + 'AlertSmall', 'display', 'block');
  365. tarteaucitron.userInterface.css(c + 'AlertBig', 'display', 'none');
  366. }
  367. },
  368. "cookie": {
  369. "create": function (key, status) {
  370. "use strict";
  371. var d = new Date(),
  372. time = d.getTime(),
  373. expireTime = time + 31536000000, // 365 days
  374. regex = new RegExp("!" + key + "=(true|false)", "g"),
  375. cookie = tarteaucitron.cookie.read().replace(regex, ""),
  376. value = 'tarteaucitron=' + cookie + '!' + key + '=' + status;
  377. if (tarteaucitron.cookie.read().indexOf(key + '=' + status) === -1) {
  378. tarteaucitron.pro('!' + key + '=' + status);
  379. }
  380. d.setTime(expireTime);
  381. document.cookie = value + '; expires=' + d.toGMTString() + '; path=/;';
  382. },
  383. "read": function () {
  384. "use strict";
  385. var nameEQ = "tarteaucitron=",
  386. ca = document.cookie.split(';'),
  387. i,
  388. c;
  389. for (i = 0; i < ca.length; i += 1) {
  390. c = ca[i];
  391. while (c.charAt(0) === ' ') {
  392. c = c.substring(1, c.length);
  393. }
  394. if (c.indexOf(nameEQ) === 0) {
  395. return c.substring(nameEQ.length, c.length);
  396. }
  397. }
  398. return '';
  399. },
  400. "purge": function (arr) {
  401. "use strict";
  402. var i;
  403. for (i = 0; i < arr.length; i += 1) {
  404. document.cookie = arr[i] + '=; expires=Thu, 01 Jan 2000 00:00:00 GMT; path=/;';
  405. document.cookie = arr[i] + '=; expires=Thu, 01 Jan 2000 00:00:00 GMT; path=/; domain=.' + location.hostname + ';';
  406. document.cookie = arr[i] + '=; expires=Thu, 01 Jan 2000 00:00:00 GMT; path=/; domain=.' + location.hostname.split('.').slice(-2).join('.') + ';';
  407. }
  408. }
  409. },
  410. "getLanguage": function () {
  411. "use strict";
  412. if (!navigator) { return 'en'; }
  413. var availableLanguages = 'en,fr',
  414. defaultLanguage = 'en',
  415. lang = navigator.language || navigator.browserLanguage ||
  416. navigator.systemLanguage || navigator.userLang || null,
  417. userLanguage = lang.substr(0, 2);
  418. if (availableLanguages.indexOf(userLanguage) === -1) {
  419. return defaultLanguage;
  420. }
  421. return userLanguage;
  422. },
  423. "getLocale": function () {
  424. "use strict";
  425. if (!navigator) { return 'en_US'; }
  426. var lang = navigator.language || navigator.browserLanguage ||
  427. navigator.systemLanguage || navigator.userLang || null,
  428. userLanguage = lang.substr(0, 2);
  429. if (userLanguage === 'fr') {
  430. return 'fr_FR';
  431. } else if (userLanguage === 'en') {
  432. return 'en_US';
  433. } else if (userLanguage === 'de') {
  434. return 'de_DE';
  435. } else if (userLanguage === 'es') {
  436. return 'es_ES';
  437. } else if (userLanguage === 'it') {
  438. return 'it_IT';
  439. } else if (userLanguage === 'pt') {
  440. return 'pt_PT';
  441. } else {
  442. return 'en_US';
  443. }
  444. },
  445. "addScript": function (url, id, callback) {
  446. "use strict";
  447. var script = document.createElement('script'),
  448. done = false;
  449. script.type = 'text/javascript';
  450. script.id = (id !== undefined) ? id : '';
  451. script.async = true;
  452. script.src = url;
  453. if (typeof callback === 'function') {
  454. script.onreadystatechange = script.onload = function () {
  455. var state = script.readyState;
  456. if (!done && (!state || /loaded|complete/.test(state))) {
  457. done = true;
  458. callback();
  459. }
  460. };
  461. }
  462. document.getElementsByTagName('head')[0].appendChild(script);
  463. },
  464. "fallback": function (matchClass, content) {
  465. "use strict";
  466. var elems = document.getElementsByTagName('*'),
  467. i,
  468. index = 0;
  469. for (i in elems) {
  470. if (elems[i] !== undefined) {
  471. for (index = 0; index < matchClass.length; index += 1) {
  472. if ((' ' + elems[i].className + ' ')
  473. .indexOf(' ' + matchClass[index] + ' ') > -1) {
  474. if (typeof content === 'function') {
  475. elems[i].innerHTML = content(elems[i]);
  476. } else {
  477. elems[i].innerHTML = content;
  478. }
  479. }
  480. }
  481. }
  482. }
  483. },
  484. "engage": function (id) {
  485. "use strict";
  486. var html = '',
  487. r = Math.floor(Math.random() * 100000);
  488. html += '<div class="tac_activate">';
  489. html += ' <div class="tac_float">';
  490. html += ' <b>' + id + '</b> ' + tarteaucitron.lang.fallback + '<br/>';
  491. html += ' <div class="tarteaucitronAllow" id="Eng' + r + 'ed' + id + '" onclick="tarteaucitron.userInterface.respond(this, true);">';
  492. html += ' ' + tarteaucitron.lang.allow;
  493. html += ' </div>';
  494. html += ' </div>';
  495. html += '</div>';
  496. return html;
  497. },
  498. "extend": function (a, b) {
  499. "use strict";
  500. var prop;
  501. for (prop in b) {
  502. if (b.hasOwnProperty(prop)) {
  503. a[prop] = b[prop];
  504. }
  505. }
  506. },
  507. "proTemp": '',
  508. "proTimer": function () {
  509. "use strict";
  510. setTimeout(tarteaucitron.proPing, 1000);
  511. },
  512. "pro": function (list) {
  513. "use strict";
  514. tarteaucitron.proTemp += list;
  515. clearTimeout(tarteaucitron.proTimer);
  516. tarteaucitron.proTimer = setTimeout(tarteaucitron.proPing, 2500);
  517. },
  518. "proPing": function () {
  519. "use strict";
  520. if (tarteaucitron.uuid !== '' && tarteaucitron.uuid !== undefined && tarteaucitron.proTemp !== '') {
  521. var div = document.getElementById('tarteaucitronPremium'),
  522. timestamp = new Date().getTime(),
  523. url = '//opt-out.ferank.eu/premium.php?';
  524. url += 'domain=' + tarteaucitron.domain + '&';
  525. url += 'uuid=' + tarteaucitron.uuid + '&';
  526. url += 'c=' + encodeURIComponent(tarteaucitron.proTemp) + '&';
  527. url += '_' + timestamp;
  528. div.innerHTML = '<img src="' + url + '" style="display:none" />';
  529. tarteaucitron.proTemp = '';
  530. }
  531. }
  532. };