jmhobbs / domain-swap

Extension to switch domains in Google Chrome without switching paths.
https://chrome.google.com/webstore/detail/domain-switcher/ngiiihlebepigjbefembddhdplmaghep
MIT License
16 stars 5 forks source link

Support Protocols #19

Open jmhobbs opened 10 years ago

jmhobbs commented 10 years ago

Notably, https vs. http.

jerodsanto commented 10 years ago

I can tackle this, but there are two ways (maybe more) to go about it:

  1. Add a default http protocol to new domains during the normalization step
  2. Allow users to either include or omit the protocol and manage the normalization during comparisons, switching, etc

I think option 1 is easier to implement and keeps the logic in one place, but we'd probably have to rely on a regex there until Chrome 32 comes out with its built-in URL goodies. I also am not sure how this affects file paths as I don't really use them much, but I assume if we just check for "[http|https|file]:" we should be fine.

Thoughts on which approach you'd prefer?

jmhobbs commented 10 years ago

I would go with #1. If you look at feature/path-remapping you can see where I'm already normalizing a base path, so we may as well add protocol there too.

ShacharHarshuv commented 4 years ago

Hi, is this going to be implemented? I'm interested in this feature too.

jmhobbs commented 4 years ago

Hi @ShacharHarshuv! This project has long laid dormant, so I don't know when or if it would happen. Happy to accept PR's though!