Skip to content

Commit 574c2fe

Browse files
author
Stefan Kremser
committed
improved minifier.html + readme
1 parent e0c35b6 commit 574c2fe

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

htmlfiles/minifier.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,22 @@
2828
$('#info1').html($('#input').val().length);
2929
$('#info2').html(input.length);
3030
}
31+
32+
function byteAndmini(){
33+
var input = "0x"+$('#input').val().replace(/\r\n|\r|\n/g," ").replace( /\s\s+/g, ' ' ).convertToHex(",0x");;
34+
$('#output').val(input);
35+
$('#info1').html($('#input').val().length);
36+
$('#info2').html(input.length);
37+
}
3138
</script>
3239
</head>
3340
<body>
3441
<textarea id="input" rows="50" cols="100"></textarea><br />
3542
<p id="info1"></p>
3643
<button onclick="mini()">minify</button>
3744
<button onclick="miniEsc()">minify + escape</button>
38-
<button onclick="byte()">byte-ify</button><br />
45+
<button onclick="byte()">byte-ify</button>
46+
<button onclick="byteAndmini()">minify + byte-ify</button><br />
3947
<textarea id="output" rows="50" cols="100"></textarea><br />
4048
<p id="info2"></p>
4149
</body>

htmlfiles/readme.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
**1** open minifier.html
2+
**2** paste the html code in the upper textfield
3+
**3** click on `minifiy + byte-ify`
4+
**4** copy the results
5+
**5** go to data.h and replace the array (of the changed html file) with the copied bytes
6+
7+
** now upload your new sketch :)**

0 commit comments

Comments
 (0)