User:Awesome Aasim/savedraft

This script allows for you to save edits in progress as a draft (not to Draft: namespace but to your computer) to avoid losing data from browser glitches, etc. This will add a button "Save draft" to the editing window that will allow you to save a draft immediately. Drafts are saved to your localStorage and do not sync between your devices (unless if you have a browser or browser extension that syncs your cache and browsing data).

Installation
on common.js or  to global.js.

Using the Script
This only works with the classic editor.

At the bottom of the edit form, there will be a new button labeled "Save draft". This will save the contents of your page as a draft on your computer. Right now, you can only have one draft per page, but multiple drafts may be a future feature.

If you already have a draft for a page, you will see two buttons at the top of the edit form: Load draft and delete draft. The first button will load the draft into the edit form. The second button will delete the draft from your computer.

You can view and manage your drafts here.