Prevent code duplication when changing from implement view
This commit is contained in:
@ -833,8 +833,7 @@ var CodeOceanEditor = {
|
|||||||
this.initializeDeadlines();
|
this.initializeDeadlines();
|
||||||
CodeOceanEditorTips.initializeEventHandlers();
|
CodeOceanEditorTips.initializeEventHandlers();
|
||||||
|
|
||||||
window.addEventListener("beforeunload", this.unloadAutoSave.bind(this));
|
window.addEventListener("turbolinks:request-start", this.unloadAutoSave.bind(this));
|
||||||
window.addEventListener("page:before-change", this.unloadAutoSave.bind(this));
|
|
||||||
// create autosave when the editor is opened the first time
|
// create autosave when the editor is opened the first time
|
||||||
this.autosave();
|
this.autosave();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user