Aller au contenu

Utilisateur:Dr Brains/CategoryTreeInvert.js

Une page de Wikipédia, l'encyclopédie libre.
Note : après avoir enregistré la page, vous devrez forcer le rechargement complet du cache de votre navigateur pour voir les changements.

Mozilla / Firefox / Konqueror / Safari : maintenez la touche Majuscule (Shift) en cliquant sur le bouton Actualiser (Reload) ou pressez Maj-Ctrl-R (Cmd-R sur Apple Mac) ;

Chrome / Internet Explorer / Opera : maintenez la touche Ctrl en cliquant sur le bouton Actualiser ou pressez Ctrl-F5.
var CategoryTreeInvert = new Object();

CategoryTreeInvert.Functions = new Object();

CategoryTreeInvert.Functions.ajax = function(bundle){ var xmlhttp; try{ xmlhttp = new XMLHttpRequest(); }catch(e){ try{ xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); }catch(e){ try{ xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); }catch(e){ xmlhttp = false; }}}; if(xmlhttp){ xmlhttp.onreadystatechange = function(){ if (xmlhttp.readyState == 4){ if(xmlhttp.status == 200 || xmlhttp.status == 302){ if(bundle.onSuccess){ bundle.onSuccess(xmlhttp,bundle); }}else if(bundle.onFailure){bundle.onFailure(xmlhttp,bundle);}else{ }}}; xmlhttp.open(bundle.method ? bundle.method : "GET",bundle.url,bundle.async == false ? false : true); if (bundle.headers) { for (var field in bundle.headers){ try{ xmlhttp.setRequestHeader(field,bundle.headers[field]); }catch(err){}}}; xmlhttp.send(bundle.data ? bundle.data : null); }; return xmlhttp;}, 



CategoryTreeInvert.Functions.AnchorEncode = function(s){
    return encodeURIComponent(s.replace(/ /g, "_"));
}