Skip to content

Commit

Permalink
Optimize "E", "R", ":", "?"
Browse files Browse the repository at this point in the history
  • Loading branch information
hazzik committed Sep 21, 2013
1 parent ac1c60c commit 859c5f8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
11 changes: 6 additions & 5 deletions jsfuck.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
'Number': '(+[])',
'String': '([]+[])',
'Boolean': '(![])',
'Function': '[]["filter"]'
'Function': '[]["filter"]',
'RegExp': 'Function("return /0/")()'
};

var MAPPING = {
Expand Down Expand Up @@ -54,7 +55,7 @@
'B': '(+false+Boolean)[10]',
'C': 'Function("return escape")()("<")[2]',
'D': 'Function("return escape")()("=")[2]',
'E': 'Function("return escape")()(">")[2]',
'E': '(RegExp+"")[12]',
'F': '(+false+Function)[10]',
'G': '(false+Function("return Date")()())[30]',
'H': USE_CHAR_CODE,
Expand All @@ -67,7 +68,7 @@
//'O': USE_CHAR_CODE,
'P': USE_CHAR_CODE,
'Q': USE_CHAR_CODE,
'R': USE_CHAR_CODE,
'R': '(+false+RegExp)[10]',
'S': '(+false+String)[10]',
'T': '(NaN+Function("return Date")()())[30]',
'U': USE_CHAR_CODE,
Expand All @@ -93,12 +94,12 @@
'-': '(+(.+[0000000001])+"")[2]',
'.': '(+(+!+[]+[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+[!+[]+!+[]]+[+[]])+[])[+!+[]]',
'/': '(false+[+false])["italics"]()[10]',
':': 'Function("return Date")()()[21]',
':': '(RegExp()+"")[3]',
';': USE_CHAR_CODE,
'<': '("")["italics"]()[0]',
'=': '("")["fontcolor"]()[11]',
'>': '("")["italics"]()[2]',
'?': USE_CHAR_CODE,
'?': '(RegExp()+"")[2]',
'@': USE_CHAR_CODE,
'[': '(GLOBAL+"")[0]',
'\\': USE_CHAR_CODE,
Expand Down
8 changes: 4 additions & 4 deletions output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@
`7` 39
`8` 44
`9` 49
`:` 4970
`:` 2434
`;` 8307
`<` 292
`=` 687
`>` 298
`?` 6572
`?` 2429
`@` 6572
`A` 726
`B` 729
`C` 3407
`D` 3802
`E` 3413
`E` 2435
`F` 847
`G` 4979
`H` 6608
Expand All @@ -48,7 +48,7 @@
`O` 7329
`P` 6577
`Q` 6579
`R` 6583
`R` 2431
`S` 731
`T` 4982
`U` 6598
Expand Down

0 comments on commit 859c5f8

Please sign in to comment.