
JavaScript 소스 코드를 압축하면 크기가 줄어들고 코드가 난독화될 수 있습니다.
아래 주소로 가시면 웹페이지에서 바로 실행하실 수 있습니다.
http://dean.edwards.name/packer/
/포장 기계/
저작권 © 2004-2023 딘 에드워즈. 판권 소유.
학장.edwards.name
▣ 입력마스크
변수 축소를 클릭하면 코드를 읽기 어렵게 만드는 대신 공백과 줄 바꿈이 제거됩니다.

“Base62 인코딩”을 클릭하면 읽기 어려운 난독화된 코드로 변경됩니다.

▣ 원본 소스코드
function winpopup() {
window.open("popup_test.jsp", "pop", "width=500,height=300,scrollbars=no");
document.reg.target = "pop";
document.reg.action = "popup_test.jsp";
document.reg.submit();
}
▣ 수축 변수가 적용된 소스 코드.
function winpopup(){window.open("popup_test.jsp","pop","width=500,height=300,scrollbars=no");
document.reg.target="pop";document.reg.action="popup_test.jsp";document.reg.submit()}
▣ “Base62 인코딩” 적용된 소스 코드
eval(function(p,a,c,k,e,r){e=function(c){return c.toString(a)};
if(!''.replace(/^/,String)){while(c--)r(e(c))=k(c)||e(c);
k=(function(e){return r(e)});e=function(){return'\\w+'};c=1};
while(c--)if(k(c))p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k(c));return p}('5 6(){7.8("2.3","4","9=a,b=c,d=e");0.1.f="4";0.1.g="2.3";0.1.h()}',18,18,'document|reg|popup_test|jsp|pop|function|winpopup|window|open|width|500|height|300|scrollbars|no|target|action|submit'.split('|'),0,{}))