aemkei / jsfuck

Write any JavaScript with 6 Characters: []()!+
jsfuck.com
Do What The F*ck You Want To Public License
8.16k stars 674 forks source link

Optimize "b", "j", "[", "C", "U", "]" #20

Closed hazzik closed 8 years ago

hazzik commented 11 years ago

Using "console" instead of "{}"

Works in all current browsers and node.js

Also, "C" could be optimized used (0+Function("return console")()["constructor"])[10]. -- need adjustment for IE using workaround from #17

subzey commented 11 years ago

window.console is undefined in IE 9 until debugger window is opened. It is not so modern browser, though.

hazzik commented 11 years ago

Anyway IE still does not work at all

hazzik commented 11 years ago

Ok, I've found alternative for [: (Function("return arguments")+"")[0] - works in every browser

hazzik commented 9 years ago

Reopen this as we do not support IE anyway /cc @subzey @aemkei

dxa4481 commented 9 years ago

This might be a dumb question, but is there a good reason [ ] ( ) and ! don't map to themselves?

hazzik commented 9 years ago

@dxa4481 it's impossible, as we need a char code/string of these characters. Without quotes they are control characters, not string literals.

hazzik commented 8 years ago

Superseded by #54