Stop hardcoding the url, just reconnect to the origin
Silencing jshint
Simplify isSelected