Missing some var declarations

This commit is contained in:
Nicolas Rosset 2021-04-29 18:28:09 +02:00
parent 6bfd20ec87
commit eab1e02e4c
2 changed files with 14 additions and 10 deletions

View File

@ -710,7 +710,8 @@ var tarteaucitron = {
tarteaucitron.addClickEventToId("tarteaucitronCTAButton", function () { tarteaucitron.addClickEventToId("tarteaucitronCTAButton", function () {
location.reload(); location.reload();
}); });
var toggleBtns = document.getElementsByClassName("catToggleBtn"), i; var i,
toggleBtns = document.getElementsByClassName("catToggleBtn"), i;
for (i = 0; i < toggleBtns.length; i++) { for (i = 0; i < toggleBtns.length; i++) {
toggleBtns[i].dataset.index = i; toggleBtns[i].dataset.index = i;
tarteaucitron.addClickEventToElement(toggleBtns[i], function () { tarteaucitron.addClickEventToElement(toggleBtns[i], function () {
@ -1931,6 +1932,7 @@ var tarteaucitron = {
/** /**
Utility function to Add or update the fields of obj1 with the ones in obj2 Utility function to Add or update the fields of obj1 with the ones in obj2
*/ */
var key;
for(key in custom){ for(key in custom){
if(custom[key] instanceof Object){ if(custom[key] instanceof Object){
source[key] = tarteaucitron.AddOrUpdate(source[key], custom[key]); source[key] = tarteaucitron.AddOrUpdate(source[key], custom[key]);

View File

@ -1807,6 +1807,7 @@ tarteaucitron.services.googlemaps = {
return '<div id="' + uniqId + '" zoom="' + x.getAttribute('zoom') + '" latitude="' + x.getAttribute('latitude') + '" longitude="' + x.getAttribute('longitude') + '" style="width:' + x.offsetWidth + 'px;height:' + x.offsetHeight + 'px"></div>'; return '<div id="' + uniqId + '" zoom="' + x.getAttribute('zoom') + '" latitude="' + x.getAttribute('latitude') + '" longitude="' + x.getAttribute('longitude') + '" style="width:' + x.offsetWidth + 'px;height:' + x.offsetHeight + 'px"></div>';
}); });
var i;
for (i = 0; i < uniqIds.length; i += 1) { for (i = 0; i < uniqIds.length; i += 1) {
mapOptions = { mapOptions = {
zoom: parseInt(document.getElementById(uniqIds[i]).getAttribute('zoom'), 10), zoom: parseInt(document.getElementById(uniqIds[i]).getAttribute('zoom'), 10),
@ -2782,6 +2783,7 @@ tarteaucitron.services.twitterembed = {
}); });
tarteaucitron.addScript('//platform.twitter.com/widgets.js', 'twitter-wjs', function () { tarteaucitron.addScript('//platform.twitter.com/widgets.js', 'twitter-wjs', function () {
var i;
for (i = 0; i < uniqIds.length; i += 1) { for (i = 0; i < uniqIds.length; i += 1) {
e = document.getElementById(uniqIds[i]); e = document.getElementById(uniqIds[i]);
twttr.widgets.createTweet( twttr.widgets.createTweet(