[js] Abstract the protocol from URLs

This makes Deckard compatible with both HTTP and HTTPS.