|
@@ -75,59 +75,46 @@ At this moment of time, there are following options (`name: default`) available
|
|
|
}
|
|
|
```
|
|
|
|
|
|
-* `compact` (default `true`): output code on one line,
|
|
|
-* `debugProtection` (default `false`): force load debug mode
|
|
|
-* `debugProtectionInterval` (default `false`):
|
|
|
-* `disableConsoleOutput` (default `true`):
|
|
|
-* `encodeUnicodeLiterals` (default `false`):
|
|
|
-* `reservedNames` (default `[]`):
|
|
|
-* `rotateUnicodeArray` (default `true`):
|
|
|
-* `selfDefending` (default `true`):
|
|
|
-* `unicodeArray` (default `true`):
|
|
|
-* `unicodeArrayThreshold` (default `0.8`):
|
|
|
-* `wrapUnicodeArrayCalls` (default `true`):
|
|
|
-
|
|
|
-
|
|
|
-#### `compact`
|
|
|
+### `compact`
|
|
|
Type: `boolean` Default: `true`
|
|
|
|
|
|
Compact code output on one line.
|
|
|
|
|
|
-#### `debugProtection`
|
|
|
+### `debugProtection`
|
|
|
Type: `boolean` Default: `false`
|
|
|
|
|
|
-##### :warning: Can freeze browser while Developer Tools are enabled! Use at own risk.
|
|
|
+#### :warning: Can freeze browser while Developer Tools are enabled! Use at own risk.
|
|
|
|
|
|
Force enable debug mode on page load if Developer Tools panel is enabled (in some, mainly WebKit-based, browsers). This makes it almost impossible to use the Console (the debug panel).
|
|
|
|
|
|
* WebKit-based: blocks the site window, but you still can navigate through Developer Tools panel.
|
|
|
* Firefox: does *not* block the site window, but still won't let you use DevTools.
|
|
|
|
|
|
-#### `debugProtectionInterval`
|
|
|
+### `debugProtectionInterval`
|
|
|
Type: `boolean` Default: `false`
|
|
|
|
|
|
-##### :warning: Can freeze browser even while Developer Tools are disabled! Use at own risk.
|
|
|
+#### :warning: Can freeze browser even while Developer Tools are disabled! Use at own risk.
|
|
|
|
|
|
Works if `debugProtection` is enabled.
|
|
|
|
|
|
Force enable debug mode in some browsers (mainly WebKit-based) when Developer Tools panel is enabled, even after page is loaded.
|
|
|
|
|
|
-#### `disableConsoleOutput`
|
|
|
+### `disableConsoleOutput`
|
|
|
Type: `boolean` Default: `true`
|
|
|
|
|
|
Disable `console.log`, `console.info`, `console.error` and `console.warn` messages output into the browser console.
|
|
|
|
|
|
-#### `encodeUnicodeLiterals`
|
|
|
+### `encodeUnicodeLiterals`
|
|
|
Type: `boolean` Default: `false`
|
|
|
|
|
|
-##### :warning: `unicodeArray` option must be enabled
|
|
|
+#### :warning: `unicodeArray` option must be enabled
|
|
|
|
|
|
This option can slightly slow down your code speed.
|
|
|
|
|
|
All literals in Unicode array become encoded in Base64.
|
|
|
To decode strings, a special function will be inserted on the page under `unicodeArray` node.
|
|
|
|
|
|
-#### `reservedNames`
|
|
|
+### `reservedNames`
|
|
|
Type: `string[]` Default: `[]`
|
|
|
|
|
|
Disable obfuscation of variable names, function names and names of function parameters that match the passed RegExp pattern.
|
|
@@ -142,10 +129,10 @@ Example:
|
|
|
}
|
|
|
```
|
|
|
|
|
|
-#### `rotateUnicodeArray`
|
|
|
+### `rotateUnicodeArray`
|
|
|
Type: `boolean` Default: `true`
|
|
|
|
|
|
-##### :warning: `unicodeArray` must be enabled
|
|
|
+#### :warning: `unicodeArray` must be enabled
|
|
|
|
|
|
Shift the `unicodeArray` values by a random number of places during the code obfuscation and insert a helper function for shifting the array back into the source code. (It works just like the Caesar cypher.)
|
|
|
|
|
@@ -153,25 +140,25 @@ Keep in mind that this option affects only how the code is visually organised, s
|
|
|
|
|
|
It is also not recommended to enable `rotateUnicodeArray` for small source code because a helper function might attract attention.
|
|
|
|
|
|
-#### `unicodeArray`
|
|
|
+### `unicodeArray`
|
|
|
Type: `boolean` Default: `true`
|
|
|
|
|
|
Put all literal strings into an array and replace every literal string by an array call.
|
|
|
|
|
|
-#### `unicodeArrayThreshold`
|
|
|
+### `unicodeArrayThreshold`
|
|
|
Type: `number` Default: `0.8` Min: `0` Max: `1`
|
|
|
|
|
|
-##### :warning: `unicodeArray` option must be enabled
|
|
|
+#### :warning: `unicodeArray` option must be enabled
|
|
|
|
|
|
The probability that the literal string will be inserted into `unicodeArray`.
|
|
|
Use this option for huge source code size, because many calls to `unicodeArray` will slow down code performance.
|
|
|
|
|
|
`unicodeArrayThreshold: 0` equals to `unicodeArray: false`.
|
|
|
|
|
|
-#### `wrapUnicodeArrayCalls`
|
|
|
+### `wrapUnicodeArrayCalls`
|
|
|
Type: `boolean` Default: `true`
|
|
|
|
|
|
-##### :warning: `unicodeArray` option must be enabled
|
|
|
+#### :warning: `unicodeArray` option must be enabled
|
|
|
|
|
|
Instead of using direct calls to `unicodeArray` items `var t = _0x43a123[0x0]`, when index `0x0` can be easily reverted to `0` with few js beautifiers, this option will wrap all calls to special function instead.
|
|
|
|