mirror of https://github.com/shadowfacts/type.git
Add restart button
This commit is contained in:
parent
99d57c16cc
commit
ce5f66413e
18
js/type.js
18
js/type.js
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue