Skip to content

Instantly share code, notes, and snippets.

@naxmefy
Last active October 2, 2016 21:33
Show Gist options
  • Save naxmefy/e12a210c39723bee88cb4240e73efe46 to your computer and use it in GitHub Desktop.
Save naxmefy/e12a210c39723bee88cb4240e73efe46 to your computer and use it in GitHub Desktop.
if (window.location.protocol !== 'https:') {
window.location = 'https://' + window.location.hostname + window.location.pathname + window.location.hash;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment