|
8 | 8 | .CodeMirror,#iframe{width:50%;height:100%;float:left;transition:.5s}
|
9 | 9 | #iframe{border-left:1px solid}
|
10 | 10 | #toggle{position:fixed;bottom:0;left:50%;transform:translateX(-50%);z-index:50;transition:.5s}
|
11 |
| -#toggle:checked{bottom:150px;transform:translateX(-50%) translateY(50%)} |
12 |
| -#menu{position:fixed;bottom:-150px;height:150px;width:100%;border-top:1px solid;z-index:2;transition:.5s} |
| 11 | +#toggle:checked{bottom:170px;transform:translateX(-50%) translateY(50%)} |
| 12 | +#menu{position:fixed;bottom:-150px;height:170px;width:100%;border-top:1px solid;z-index:2;transition:.5s} |
13 | 13 | #toggle:checked~#menu{bottom:0}
|
14 |
| -#toggle:checked~.CodeMirror,#toggle:checked~#iframe{height:calc(100% - 150px);bottom:0} |
15 |
| -#myconsole{float:right;height:150px;width:calc(100% - 120px);border-left:1px solid;padding:5px;-moz-control-character-visibility:visible;resize:none} |
16 |
| -button,a{height:20px;line-height:18px;float:left;border:1px solid;margin:5px 0 0 5px;width:110px;cursor:pointer;text-align:center;color:#000;background:#eee;text-decoration:none} |
| 14 | +#toggle:checked~.CodeMirror,#toggle:checked~#iframe{height:calc(100% - 170px);bottom:0} |
| 15 | +#myconsole{float:right;height:170px;width:calc(100% - 120px);border-left:1px solid;padding:5px;-moz-control-character-visibility:visible;resize:none} |
| 16 | +button,a{height:25px;line-height:25px;float:left;border:1px solid;margin:5px 0 0 5px;width:110px;cursor:pointer;text-align:center;color:#000;background:#eee;text-decoration:none} |
17 | 17 | button:active,a.active{background:#aaa}
|
18 | 18 | button.half,a.half{width:53px}
|
19 | 19 | input[type=text]{width:16px;height:17px;line-height:15px;font-size:12px;border:1px solid;margin:5px 2px 5px 4px;text-align:center}
|
|
123 | 123 | xhr=new XMLHttpRequest();
|
124 | 124 | xhr.open("POST", "https://closure-compiler.appspot.com/compile", true);
|
125 | 125 | xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
|
126 |
| - xhr.send("language=ECMASCRIPT6&output_info=compiled_code&js_code="+encodeURIComponent(input)); |
| 126 | + xhr.send("language=ECMASCRIPT6&compilation_level=ADVANCED_OPTIMIZATIONS&output_info=compiled_code&js_code="+encodeURIComponent(input)); |
127 | 127 | xhr.onload=function(){
|
128 | 128 | min=xhr.response.replace(/\r|\n|(;*\n*$)/,"");
|
129 | 129 | console.log(min+"\n\n// "+min.length+" chars minified (original: "+input.length+")");
|
|
175 | 175 | xhr=new XMLHttpRequest();
|
176 | 176 | xhr.open("POST", "https://closure-compiler.appspot.com/compile", true);
|
177 | 177 | xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
|
178 |
| - xhr.send("language=ECMASCRIPT6&output_info=compiled_code&js_code="+encodeURIComponent(input)); |
| 178 | + xhr.send("language=ECMASCRIPT6&compilation_level=ADVANCED_OPTIMIZATIONS&output_info=compiled_code&js_code="+encodeURIComponent(input)); |
179 | 179 | xhr.onload=function(){
|
180 | 180 | min=xhr.response.replace(/\r|\n|(;*\n*$)/,"");
|
181 | 181 | min=regpack(min);
|
|
0 commit comments