Launch the script when the page is fully loaded
This commit is contained in:
parent
a174127e8b
commit
dc9980d331
|
|
@ -13,6 +13,14 @@ var tarteaucitron = {
|
||||||
"state": [],
|
"state": [],
|
||||||
"launch": [],
|
"launch": [],
|
||||||
"init": function (params) {
|
"init": function (params) {
|
||||||
|
"use strict";
|
||||||
|
if (window.addEventListener) {
|
||||||
|
window.addEventListener("load", tarteaucitron.load(params), false);
|
||||||
|
} else {
|
||||||
|
window.attachEvent('onload', tarteaucitron.load(params));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"load": function (params) {
|
||||||
"use strict";
|
"use strict";
|
||||||
var cdn = tarteaucitron.cdn,
|
var cdn = tarteaucitron.cdn,
|
||||||
language = tarteaucitron.getLanguage(),
|
language = tarteaucitron.getLanguage(),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue