Added error handling for plain js

Can you remove this host?