In order to make the script ready for sudden Sci-hub's domain changes without intervention, I've introduced an auto-update function that retrieves the new domain from the officila VKontakte page of Sci-hub project. To be able to update, the script needs the permission to connect to vk.com: once a day, the script checks if Sci-Hub can be reached at the known domain and if it can't be reached, the script retrieves the new domain (if it's been updated) from Sci-Hub's official VK account.
I hope it works as expected! I've mainly tested the autoupdate feature on GreaseMonkey for the moment, but even if it's not working on your browser/userscript manager, the script will fall back to the default domain (currently sci-hub.ru).
On Tampermonkey you will be asked to confirm the access to a new domain everytime Sci-Hub's domain changes.