Add restart button

This commit is contained in:
Shadowfacts 2016-10-02 10:41:44 -04:00
parent 99d57c16cc
commit ce5f66413e
Signed by: shadowfacts
GPG Key ID: 94A5AB95422746E5
2 changed files with 19 additions and 0 deletions

View File

@ -65,6 +65,24 @@ themeSelector.change(() => {
save();
});
// restart button
$("#restart").click(() => {
localforage.getItem(repo)
.then((val) => {
val[filePath] = {};
localforage.setItem(repo, val)
.then(() => {
window.location.reload();
})
.catch((e) => {
throw e;
});
})
.catch((e) => {
throw e;
});
});
// setup
function setup(data, mime) {
let el = document.getElementById("editor");

View File

@ -15,6 +15,7 @@
<br>
</noscript>
<button id="restart">Restart</button>
<select id="language">
<option value="auto-detect">Auto-Detect</option>
</select>