Where can i get the node list of the Javascript build in objects?
what i mean is : document is object of window , wither the function alert is function of the object window , here is a code to example :
var w = "window" ,
gg = "gg" ,
pr = "prototype" ,
ts = "toString" ,
pi = "parseInt" ,
al = "alert";
String[pr][gg] = function(){return window[this[ts]()];};
w = w[gg]();
w[al](w[pi]("0"));
i write my code like that , to be difficult to copy & read
to use this code writing technique i need to know what function every object contain and so on , Where i can get the node list of the build in javascript object / functions?
secondly , how can i assign “this” as string such as the others , to use it in this line :
String[pr][gg] = function(){return window[this[ts]()];};
can i have example?
I think your fundamental problem is that you’re trying to obfuscate your code by hand; bad idea. What most developers do instead is write their code manually, then use an obfuscator to generate an hard-to-understand version of their code, which they put on their actual site. The advantage of this is that your original code remains readable and usable by you.
Also, most obfuscators can do a better job of obfuscating than you can (just read Google’s JS; it’s way worse than your’s), AND they’ll minify your code as well, making your site (edit: as teresko points out, only slightly) faster for your end user.
Google Closure’s compiler, or YUI’s compressor are both good minification/obfuscation programs.