X-Git-Url: http://git.euphorik.ch/?p=euphorik.git;a=blobdiff_plain;f=js%2Futil.js;fp=js%2Futil.js;h=5554c519eaae93eb6707a927e1a4592f61db2095;hp=aff9d6e00d578b7938e1ad5a18378c92e36531f0;hb=3d7756d15db9be15c3bd350dac05b52672b4e50f;hpb=17455e96e7fbcc7f07897b85ba156ff7fed315e6 diff --git a/js/util.js b/js/util.js index aff9d6e..5554c51 100644 --- a/js/util.js +++ b/js/util.js @@ -190,14 +190,6 @@ euphorik.Util.prototype.infoBulle = function(message, element, position) { ).click(cacherBulle); }; -/** - * Utilisé pour l'envoie de données avec la méthode ajax de jQuery. - * Obsolète : à virer - */ -/*euphorik.Util.prototype.jsonVersAction = function(json) { - return { action : JSON.stringify(json) }; -};*/ - /** * Retourne un hash md5 d'une chaine, dépend de md5.js. * @param chaine un string quelconque @@ -207,7 +199,7 @@ euphorik.Util.prototype.md5 = function(chaine) { return hex_md5(chaine); }; -// pompé de http://www.faqts.com/knowledge_base/view.phtml/aid/13562/fid/130 +// Taken from http://www.faqts.com/knowledge_base/view.phtml/aid/13562/fid/130 euphorik.Util.prototype.setSelectionRange = function(input, selectionStart, selectionEnd) { if (input.setSelectionRange) { input.focus(); @@ -261,9 +253,10 @@ euphorik.Util.prototype.replaceSelection = function(input, replaceString) { }; /** - * Rot13 d'une chaine, voir : http://fr.wikipedia.org/wiki/ROT13 + * Applies rot13 to a given string. See : http://en.wikipedia.org/wiki/ROT13. + * @param str the string. */ -euphorik.Util.prototype.rot13 = function(chaine) { +euphorik.Util.prototype.rot13 = function(str) { var ACode = 'A'.charCodeAt(0); var aCode = 'a'.charCodeAt(0); var MCode = 'M'.charCodeAt(0); @@ -283,5 +276,5 @@ euphorik.Util.prototype.rot13 = function(chaine) { (c > MCode && c <= ZCode || c > mCode && c <= zCode ? -13 : 0)) ) + f(ch, pos + 1); }; - return f(chaine, 0); + return f(str, 0); };