improved minifier.html + readme

This commit is contained in:
Stefan Kremser
2017-03-08 20:26:36 +01:00
parent e0c35b62da
commit 574c2fed50
2 changed files with 16 additions and 1 deletions

View File

@@ -28,6 +28,13 @@
$('#info1').html($('#input').val().length);
$('#info2').html(input.length);
}
function byteAndmini(){
var input = "0x"+$('#input').val().replace(/\r\n|\r|\n/g," ").replace( /\s\s+/g, ' ' ).convertToHex(",0x");;
$('#output').val(input);
$('#info1').html($('#input').val().length);
$('#info2').html(input.length);
}
</script>
</head>
<body>
@@ -35,7 +42,8 @@
<p id="info1"></p>
<button onclick="mini()">minify</button>
<button onclick="miniEsc()">minify + escape</button>
<button onclick="byte()">byte-ify</button><br />
<button onclick="byte()">byte-ify</button>
<button onclick="byteAndmini()">minify + byte-ify</button><br />
<textarea id="output" rows="50" cols="100"></textarea><br />
<p id="info2"></p>
</body>

7
htmlfiles/readme.md Normal file
View File

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