From 15645cb85ce5ec986cf439c9704bae6114cc3629 Mon Sep 17 00:00:00 2001 From: "David A. Madore" Date: Sun, 1 Apr 2012 20:55:11 +0200 Subject: April's fool. --- org/madore/damlengine/included.js | 60 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) (limited to 'org') diff --git a/org/madore/damlengine/included.js b/org/madore/damlengine/included.js index 7aa2a2b..9c035bd 100644 --- a/org/madore/damlengine/included.js +++ b/org/madore/damlengine/included.js @@ -1,4 +1,7 @@ +"use strict"; + var textNodeType; + function textContent(n) { if ( n.nodeType == textNodeType ) { return n.data; @@ -11,6 +14,7 @@ function textContent(n) { return t; } } + function despam() { // MSIE seems to barf... Deactivate for now if ( (/MSIE *[1-6]\./).test(navigator.userAgent) ) @@ -44,6 +48,61 @@ function despam() { } } } + +function permuteWord(s) { + if ( s.length <= 3 ) + return s; + var tab = s.split(""); + var n = tab.length - 1; + for ( var i=1 ; i