Add files via upload

pull/1831/head
JuliusS123 2022-05-15 14:22:01 +02:00 committed by GitHub
parent f0a7ea0ee9
commit 1f7178150a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,30 @@
<html>
<head>
<link rel="stylesheet" href="../../css/spectre.min.css">
</head>
<body>
<p>Subjects: <input type="text" id="subjects" class="form-input" value="eg. German,Maths,Geography,..."></p>
<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:[
{name:"subjects.txt"},
]
});
});
</script>
</body>
</html>