educative.io

Educative: Auto save on switching page + Run shortcut button

2 suggestions for educative people:

1- Auto save user input to the code snippets when user browses a different page (Next, Previous buttons on the bottom of the page, or chapters on the left, or any other button including browser back and forward buttons).
This will help negating user frustration in case of a mis-click.

2- Add a shortcut for Running the code snippet. (I discovered that Cmd + S saves the snipped code but could not discover a shortcut for running the code).

Thanks!

2 Likes

I second this. I find this really useful and if there is enough interest I can create a greasemonkey or browser extention for this.

// ==UserScript==
// @name     Educative autosave
// @version  1
// @grant    none
// @include  https://www.educative.io/*
// ==/UserScript==

function hit_save() {
  buttons = Array.from(document.getElementsByClassName("outlined-primary"));
  save_buttons = buttons.filter(btn => btn.textContent == "*Save");
  save_buttons.forEach(btn => btn.click());
  setTimeout(hit_save, 5000); // run this every 5 seconds
}
hit_save();

Use Greasemonkey (Firefox) or Tampermonkey (Chrome) to run this. Feel free to modify it and use it however you want.