mirror of https://github.com/espruino/BangleApps
Create custom.html
parent
a737e7f772
commit
b343726dd3
|
@ -0,0 +1,31 @@
|
|||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" href="../../css/spectre.min.css">
|
||||
</head>
|
||||
<body>
|
||||
<form>
|
||||
<input type="checkbox" id="Impact" name="Impact" value="0">
|
||||
<label for="Impact">Impact</label><br>
|
||||
<input type="checkbox" id="Phosphate" name="Phosphate" value="1">
|
||||
<label for="Phosphate">Phosphate</label><br>
|
||||
<p>Click <button id="upload" class="btn btn-primary">Upload</button></p>
|
||||
<script src="../../core/lib/customize.js"></script>
|
||||
<script>
|
||||
// When the 'upload' button is clicked...
|
||||
document.getElementById("upload").addEventListener("click", function() {
|
||||
Fonts = {"Impact", "Phosphate"};
|
||||
var n=0;
|
||||
for (fontName in Fonts) {
|
||||
if (document.getElementById(fontName).value==true) {
|
||||
sendCustomizedApp({
|
||||
storage:[
|
||||
{name:"contourclock-"+n+".js", url:"app.js", content:"font-"+fontName+".json"},
|
||||
]
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue