推廣等的控制廣告顯示的JS檔案及產生的廣告單元的源檔案中的JavaScript代碼都是經過JS壓縮器以及混淆器處理後的。以達到減小這些檔案的大小的目的。
當我們需要分析這些檔案的時候就需要格式化javascript代碼的工具,使之方便閱讀。
在這裡我給大家介紹的就是 Javascript Code Improver 一個免費的工具。他很簡單,只有格式化代碼這一個功能,不過,足夠用了。支援中英文介面切換。
下載:Javascript Code Improver
JavaScript Code Improver
Cannot read your own JavaScript code?
Cannot find that closing brace?
Lost all hope of making head or tail of the JavaScript code inherited from your colleague?
Or just curious of how JavaScript works?
Try JavaScript Code Improver!
With JavaScript Code Improver you are just one click away from making any JavaScript clear, easily comprehensible and ready for printing thus saving the time you spend on editing, debugging and modifying it. Forget about all problems resulting from those illegible JavaScripts!
Compare how the same piece of code looks before:
<script language="JavaScript">var i=0,s="",k=0;function foo(){for(j=0;j<10;j++){for(i=0;i<10;i++){s="string1";k=Math.floor(Math.random()*10);}for(i=20;i>9;i--){s="string2";k=i;}}}</script>
and after processing by JavaScript Code Improver:
<script language="JavaScript">var i = 0, s = "", k = 0;function foo(){ for(j = 0; j < 10; j++) { for(i = 0; i < 10; i++) { s = "string1"; k = Math.floor( Math.random()*10 ); } for(i = 20; i > 9; i--) { s = "string2"; k = i; } }}</script>
You can see the difference, can’t you?
The program’s flexible settings let you structure the code in any way you like. So, even if your JavaScript code is pretty comprehensible, you can just give it more professional or just more pleasant feel.
Tags: javascript, 代碼, 格式化
- Google AdSense新的點擊模式對統計工具的影響
- Adsense程式碼分析舊版本show_ads.js
One Response to “JavaScript代碼格式化工具(JS程式碼分析必備)”
- Roboter's blog » js壓縮,解壓縮工具 Says:
09月 5th, 2008 at 4:58 pm […] Javascript Code Improver,可以將將壓縮的js檔案還原。該網站似乎打不開,在http://www.cnzzr.cn/2007/11/javascript-code-improver.html可以下載。 […]