Making id uniq

This commit is contained in:
Amauri CHAMPEAUX 2014-09-27 13:55:06 +02:00
parent 1615ede70d
commit c063b4c070
1 changed files with 5 additions and 5 deletions

View File

@ -20,7 +20,7 @@ tarteaucitron.services.disqus = {
var id = 'disqus', var id = 'disqus',
r = Math.floor(Math.random() * 100000); r = Math.floor(Math.random() * 100000);
document.getElementById('disqus_thread').innerHTML = tarteaucitron.engage(id); document.getElementById('disqus_thread').innerHTML = tarteaucitron.engage(id, r);
document.getElementById('tacEngage' + id + r).onclick = function () { document.getElementById('tacEngage' + id + r).onclick = function () {
tarteaucitron.userInterface.respond(document.getElementById(id + 'Allowed'), true); tarteaucitron.userInterface.respond(document.getElementById(id + 'Allowed'), true);
}; };
@ -55,7 +55,7 @@ tarteaucitron.services.sharethis = {
tarteaucitron.cookie.purge(cookies); tarteaucitron.cookie.purge(cookies);
tarteaucitron.fallback(['tacSharethis'], tarteaucitron.engage(id)); tarteaucitron.fallback(['tacSharethis'], tarteaucitron.engage(id, r));
document.getElementById('tacEngage' + id + r).onclick = function () { document.getElementById('tacEngage' + id + r).onclick = function () {
tarteaucitron.userInterface.respond(document.getElementById(id + 'Allowed'), true); tarteaucitron.userInterface.respond(document.getElementById(id + 'Allowed'), true);
}; };
@ -90,7 +90,7 @@ tarteaucitron.services.shareaholic = {
tarteaucitron.cookie.purge(cookies); tarteaucitron.cookie.purge(cookies);
tarteaucitron.fallback(['shareaholic-canvas'], tarteaucitron.engage(id)); tarteaucitron.fallback(['shareaholic-canvas'], tarteaucitron.engage(id, r));
document.getElementById('tacEngage' + id + r).onclick = function () { document.getElementById('tacEngage' + id + r).onclick = function () {
tarteaucitron.userInterface.respond(document.getElementById(id + 'Allowed'), true); tarteaucitron.userInterface.respond(document.getElementById(id + 'Allowed'), true);
}; };
@ -120,7 +120,7 @@ tarteaucitron.services.addthis = {
tarteaucitron.cookie.purge(cookies); tarteaucitron.cookie.purge(cookies);
tarteaucitron.fallback(['addthis_sharing_toolbox'], tarteaucitron.engage(id)); tarteaucitron.fallback(['addthis_sharing_toolbox'], tarteaucitron.engage(id, r));
document.getElementById('tacEngage' + id + r).onclick = function () { document.getElementById('tacEngage' + id + r).onclick = function () {
tarteaucitron.userInterface.respond(document.getElementById(id + 'Allowed'), true); tarteaucitron.userInterface.respond(document.getElementById(id + 'Allowed'), true);
}; };
@ -178,7 +178,7 @@ tarteaucitron.services.adsense = {
var id = 'adsense', var id = 'adsense',
r = Math.floor(Math.random() * 100000); r = Math.floor(Math.random() * 100000);
tarteaucitron.fallback(['adsbygoogle'], tarteaucitron.engage(id)); tarteaucitron.fallback(['adsbygoogle'], tarteaucitron.engage(id, r));
document.getElementById('tacEngage' + id + r).onclick = function () { document.getElementById('tacEngage' + id + r).onclick = function () {
tarteaucitron.userInterface.respond(document.getElementById(id + 'Allowed'), true); tarteaucitron.userInterface.respond(document.getElementById(id + 'Allowed'), true);
}; };