minor fixes
This commit is contained in:
19
src/main.ts
19
src/main.ts
@ -127,8 +127,6 @@ export class Editor {
|
||||
// CodeMirror Management
|
||||
// ================================================================================
|
||||
|
||||
console.log(this.settings)
|
||||
|
||||
this.fontSize = new Compartment();
|
||||
this.vimModeCompartment = new Compartment();
|
||||
const vimPlugin = this.settings.vimMode ? vim() : [];
|
||||
@ -679,11 +677,12 @@ document.addEventListener("keydown", startOnEnter);
|
||||
document.getElementById("start-button")!.addEventListener("click", startClock);
|
||||
|
||||
// When the user leaves the page, all the universes should be saved in the localStorage
|
||||
// window.addEventListener("beforeunload", () => {
|
||||
// event.preventDefault();
|
||||
// event.returnValue = "";
|
||||
// // Iterate over all local files and set the candidate to the committed
|
||||
// app.currentFile.candidate = app.view.state.doc.toString();
|
||||
// app.currentFile.committed = app.view.state.doc.toString();
|
||||
// app.settings.saveApplicationToLocalStorage(app.universes, app.settings);
|
||||
// });
|
||||
window.addEventListener("beforeunload", () => {
|
||||
event.preventDefault();
|
||||
event.returnValue = "";
|
||||
// Iterate over all local files and set the candidate to the committed
|
||||
app.currentFile.candidate = app.view.state.doc.toString();
|
||||
app.currentFile.committed = app.view.state.doc.toString();
|
||||
app.settings.saveApplicationToLocalStorage(app.universes, app.settings);
|
||||
app.clock.stop()
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user