是否有任何命令行脚本和/或在线工具可以扭转缩小的影响,类似于Tidy如何清理可怕的HTML?

(我特别希望取消缩小的JavaScript文件,因此变量重命名可能仍然是一个问题。)


当前回答

点击这些链接进行JS去最小化。这将安装在FF作为扩展,帮助你调试js在运行时。

https://addons.mozilla.org/en-US/firefox/addon/javascript-deminifier/eula/141018?src=dp-btn-primary

其他回答

http://unminify.appspot.com/ 伟大的工具unminimalize javascript和json

作为一种替代方法(因为直到现在我才知道jsbeautifier.org),我使用了一个bookmarklet,重新启用了Dean Edward's Packer中的解码按钮。

我在这里找到了说明书和书签。

这是小书签(以防网站宕机)

javascript:for%20(i=0;i<document.forms.length;++i)%20{for(j=0;j<document.forms[i].elements.length;++j){document.forms[i].elements[j].removeAttribute(%22readonly%22);document.forms[i].elements[j].removeAttribute(%22disabled%22);}}

我对jsbeautifier.org的输出不太满意,所以我做了更多的搜索,找到了这个网站:http://www.centralinternet.com.br/javascript-beautifier

对我来说非常好。

大多数ide还提供自动格式化功能。例如,在NetBeans中,只需按CTRL+K。

你不能使用javascript格式化器(http://javascript.about.com/library/blformat.htm)吗?