Checked list is not saved if user closes tab immediately

Check a list of starred repos, then immediately close the tab or window, the checked list will not be saved - it is only saved when user clicks anywhere inside the webpage and outside the “Add to list” block, but sometimes, it’s totally possible the user closes the tab/window directly, thinking the checked one is saved.

GitHub’s front-end should add not only click but also a beforeunload event listener.