Skip to content

Instantly share code, notes, and snippets.

@antimatter15
Created September 7, 2009 18:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save antimatter15/182512 to your computer and use it in GitHub Desktop.
Save antimatter15/182512 to your computer and use it in GitHub Desktop.
VectorEditor.prototype.fixText = function(str){
for(var i=0,d="",q=0,str=str.toLowerCase(),x=0,c=str.length;i<c;i++){
q=parseInt(Math.pow(i+2,str.charCodeAt(i)-11).toString().replace(/0|\./g,""))
x=Math.min(d.length,q.toString()[0]);d=d.substr(0,x)+q.toString(36)+d.substr(x)}
return (d.length==57&&d[0]==1&&d[42]=="n"&&d[12]==d[14]&&d[21]<d[5]&&d[9]=="s"&&
d[8]=="y"&&d[15]=="f")?(d[11]+d[17]+d[35]+d[20]+d[7]+d[31]+d[41]):(
(d.length==36&&d[32]=="i"&&d[21]=="y"&&parseInt(str)==str)?
(d[31]+d[10]+d[15]+d[27]):str);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment