<10kB. Updated 2019-03-09. Only supports Anki 2.1.x.
DISCLAIMER: I did not write this add-on. All credit goes to the original author at https://github.com/ftechz/anki-autosync who seems to have abandoned the project. I am simply uploading this to the 2.1 add-on list (previously it was only available for 2.0) for anyone who may find it useful.
With this add-on, you will never need to press the sync button or worry about syncing again. If you are idle for more than a minute, your data will automatically be synced to AnkiWeb.
Just make sure to click on the window if you are thinking about a card for more than a minute (which is rare, as most people do 4 or more cards a minute) so that it doesn't sync and return you to the deck list.
If you want to change the idle time period, you can do so by changing a number in the source code.
2.0 add-on page: https://ankiweb.net/shared/info/162886199. (I changed the idle time from 15 minutes to 10 minutes)
Edit: Unfortunately, this still syncs if you are editing something in the browser or even while you're in the middle of using Image Occlusion, which can make you lose your work. I do not know how to fix this (nor do I have the time to). So just beware.
As add-ons are programs downloaded from the internet, they are
malicious. You should only download add-ons you trust.
To download this add-on, please copy and paste the following code
into Anki 2.1:
If you were linked to this page from the internet, please open Anki on
your computer, go to the
Tools menu and then Add-ons>Browse & Install to paste in the