2022-05-15 12:22:01 +00:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<link rel="stylesheet" href="../../css/spectre.min.css">
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
2022-05-15 12:29:17 +00:00
|
|
|
<p>Subjects: <input type="text" id="subjects" class="form-input" value="Seperate subjects by comma, eg. German,Maths,Geography,..."></p>
|
2022-05-15 12:22:01 +00:00
|
|
|
<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() {
|
|
|
|
// get the text to add
|
|
|
|
var text = document.getElementById("subjects").value;
|
|
|
|
console.log(text);
|
|
|
|
// build the app's text using a templated String
|
|
|
|
var app = text;
|
|
|
|
// send finished app (in addition to contents of app.json)
|
|
|
|
sendCustomizedApp({
|
|
|
|
storage:[
|
2022-05-26 18:53:40 +00:00
|
|
|
{name:"subjects.txt", url:"subjects.txt", content:app},
|
2022-05-15 12:22:01 +00:00
|
|
|
]
|
|
|
|
});
|
2022-05-26 18:53:40 +00:00
|
|
|
console.log("Sent homework.subjects.txt!");
|
2022-05-15 12:22:01 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|