Skip to content

Commit 2041552

Browse files
author
sanex3339
committed
Added renameProperties option
1 parent a619766 commit 2041552

File tree

6 files changed

+35
-7
lines changed

6 files changed

+35
-7
lines changed

App/constants/ActionTypes.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ export const TOGGLE_UNICODE_ESCAPE_SEQUENCE = 'TOGGLE_UNICODE_ESCAPE_SEQUENCE';
5151

5252
export const TOGGLE_RENAME_GLOBALS = 'TOGGLE_RENAME_GLOBALS';
5353

54+
export const TOGGLE_RENAME_PROPERTIES = 'TOGGLE_RENAME_PROPERTIES';
55+
5456
export const SET_TARGET = 'SET_TARGET';
5557

5658
export const SET_IDENTIFIER_NAMES_GENERATOR = 'SET_IDENTIFER_NAMES_GENERATOR';

App/containers/OptionsContainer.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@ const Options = ({dispatch, options}) =>
9393
checked={options.renameGlobals}
9494
onChange={() => dispatch(actions.toggleOption(types.TOGGLE_RENAME_GLOBALS))}/>
9595

96+
<Form.Checkbox
97+
label='Rename Properties'
98+
checked={options.renameProperties}
99+
onChange={() => dispatch(actions.toggleOption(types.TOGGLE_RENAME_PROPERTIES))}/>
100+
96101
<Divider/>
97102

98103
<Form.Checkbox

App/reducers/options.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ const initialState = {
5151
unicodeEscapeSequence: false,
5252

5353
renameGlobals: false,
54+
renameProperties: false,
5455

5556
target: 'browser',
5657

@@ -308,6 +309,12 @@ export const options = (state = initialState, action) => {
308309
renameGlobals: !state.renameGlobals
309310
};
310311

312+
case types.TOGGLE_RENAME_PROPERTIES:
313+
return {
314+
...state,
315+
renameProperties: !state.renameProperties
316+
};
317+
311318
case types.SET_TARGET: {
312319
const target = action.target;
313320

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "javascript-obfuscator-web",
3-
"version": "3.4.4",
3+
"version": "3.5.0",
44
"description": "",
55
"engines": {
66
"node": ">=12.13.1"
@@ -32,7 +32,7 @@
3232
"graceful-fs": "4.1.9",
3333
"html-webpack-plugin": "^3.2.0",
3434
"inert": "5.1.0",
35-
"javascript-obfuscator": "1.0.0",
35+
"javascript-obfuscator": "1.1.0",
3636
"less": "2.7.1",
3737
"less-loader": "4.1.0",
3838
"pm2": "3.5.1",

templates/index.html

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ <h1>JavaScript Obfuscator Tool</h1>
4949
<p>
5050
A free and efficient obfuscator for JavaScript (including partial support of ES2019). Make your code harder to copy and
5151
prevent people from stealing your work. This tool is a Web UI to the excellent (and open source)
52-
<code><a href="https://github.com/javascript-obfuscator/javascript-obfuscator" target="_new">javascript-obfuscator</a>@1.0.0</code>
52+
<code><a href="https://github.com/javascript-obfuscator/javascript-obfuscator" target="_new">javascript-obfuscator</a>@1.1.0</code>
5353
created by Timofey Kachalov.
5454
</p>
5555
<div id="GithubBadges">
@@ -192,6 +192,20 @@ <h3>Sounds great!</h3>
192192
</td>
193193
</tr>
194194

195+
<tr>
196+
<td class="collapsing">Rename Properties</td>
197+
<td>
198+
<div class="ui tiny message">
199+
<p><i class="warning sign icon"></i> This option <b>WILL</b> break your code in most cases. Enable it only if you know what it does!</p>
200+
</div>
201+
<p>Enables renaming of property names. All built-in DOM properties and properties in core JavaScript classes will be ignored.</p>
202+
203+
<p>To set format of renamed property names use <code>identifierNamesGenerator</code> option.</p>
204+
205+
<p>To control which properties will be renamed use <code>reservedNames</code> option.</p>
206+
</td>
207+
</tr>
208+
195209
<tr>
196210
<td class="collapsing">Self Defending</td>
197211
<td>

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4146,10 +4146,10 @@ isurl@^1.0.0-alpha5:
41464146
has-to-string-tag-x "^1.2.0"
41474147
is-object "^1.0.1"
41484148

4149-
javascript-obfuscator@1.0.0:
4150-
version "1.0.0"
4151-
resolved "https://registry.yarnpkg.com/javascript-obfuscator/-/javascript-obfuscator-1.0.0.tgz#027de861411efeb0452d96230d04f51882b83af3"
4152-
integrity sha512-laeqz4pVVTyIRc9kLf1QLUVN3YJsCAu08P6vH+e/8gvD+WgI49+kyCyDAkvLKenpuPgsX/RtlTu9VKvGhaCXbg==
4149+
javascript-obfuscator@1.1.0:
4150+
version "1.1.0"
4151+
resolved "https://registry.yarnpkg.com/javascript-obfuscator/-/javascript-obfuscator-1.1.0.tgz#4fdeb620272bb5bb9c8b71a92aa454849c95bee7"
4152+
integrity sha512-Qg0c9nCCioGBBYdg43W+D3AnueJ+cWx+NAgjHLRa5LVaz3r3aU4foUnxPUXg6veTQaD8O8X5JBqR6PagQm4Zlg==
41534153
dependencies:
41544154
"@gradecam/tsenum" "1.2.0"
41554155
"@nuxtjs/opencollective" "0.2.2"

0 commit comments

Comments
 (0)