Skip to content

Instantly share code, notes, and snippets.

@cschiewek
Created August 18, 2017 15:51
Show Gist options
  • Save cschiewek/b744732a7a98a92208154bfd5cbee029 to your computer and use it in GitHub Desktop.
Save cschiewek/b744732a7a98a92208154bfd5cbee029 to your computer and use it in GitHub Desktop.
Bookmarklet to open current page in local chorus env
javascript: (function () {
if (window.location.protocol == "https:") {
var port = "3443"
} else {
var port = "3000"
}
var host = window.location.hostname.replace("www.", "").replace(".", "--") + ".local.sbndev.net:" + port;
window.location.href = window.location.toString().replace(window.location.hostname, host);;
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment