1

我有一个缩小版本的 javascript 文件。我丢失了它的原始源代码。如何从我的缩小版本中恢复我的源代码?变量名称显示为 _1、_2 等。有没有一种方法可以将变量名称更改为有意义的名称。

4

1 回答 1

2

Minification must have just minified the script, but if the variable names have been changed that means you used some kind of an uglifier. There are several online tools available like http://jsbeautifier.org/ that'd help you unminify the code, but uglification can probably not be undone, so you've to rename all your variables manually.

Protip: Use a version control system like Git to keep your revisions/history and also take backups so that you don't loose your source code in future.

I understand strange issues occur, but hope you resolve them. Good Luck!

于 2013-04-18T04:13:16.767 回答