« MediaWiki:Gadget-HotCats.js » : différence entre les versions

Contenu supprimé Contenu ajouté
Seb35 (discussion | contributions)
m retour -> Korrigan, +cat
Seb35 (discussion | contributions)
m pour éviter d'interpréter la cat
Ligne 138 :
if (matches != null && matches.length == 1) { // Found one occurrence of the category - good!
if ( typeof hnc != "undefined" && hnc != null && hnc != "" ) {
t = t.replace(hcre, "$1[[Catégorie" + ":" + hnc + "$2]]");
summary.push ( "Modification de la catégorie [[Catégorie" + ":" + hrc + "]] → [[Catégorie" + ":" + hnc + "]]" ) ;
} else {
t = t.replace(hcre, "");
summary.push ( "Retrait de la catégorie [[Catégorie" + ":" + hrc + "]]" ) ;
}
ret = 1 ;
Ligne 156 :
var index = -1;
while (re.exec(t) != null) index = re.lastIndex;
var txt = "[[CatégorieCatégori" + "e:" + hnc + "]]" ;
if (index < 0) {
t = t + '\n' + txt ;
Ligne 162 :
t = t.substring(0, index) + '\n' + txt + t.substring(index);
}
summary.push ( "Ajout rapide de la catégorie [[Catégorie" + ":" + hnc + "]]" ) ;
ret = 1 ;
}