Refresh repo list automatically

* Move autosort to loadPage()
* Only add lines if they are not there yet
* Remove obsolete lines
* Record repo listing function as reposFunc
* Trigger auto-refresh of reposFunc