MediaWiki:Gadget-inline-js-loader.js
Note : après avoir enregistré vos modifications, il se peut que vous deviez forcer le rechargement complet du cache de votre navigateur pour voir les changements.
console.log("Loaded inline-js-loader");
eJS = function()
{
/* It sometimes happens that gadgets are called before the inlineJS is delcared, making the loading
fail. In this case, give it another 500ms and do a recursive call to try again. */
if(typeof inlineJS == 'undefined')
{
setTimeout(eJS, 500);
console.log("Loading inline-js-loader failed, trying again in 500ms");
return;
}
for(var n in inlineJS) // Each function to be executed is added to the inlineJS object.
{
f = inlineJS[n];
if(typeof f === 'function' ) { f(); }
}
}
eJS();