Last active
October 22, 2020 07:21
-
-
Save elboletaire/5190367 to your computer and use it in GitHub Desktop.
Switch Domain Bookmarklet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var dev = 'http://underave.loc'; | |
var prod = 'https://underave.net'; | |
var redirect = location.origin == dev ? prod : location.origin == prod ? dev : false; | |
if (redirect) { | |
location.href = redirect + location.pathname + location.search + location.hash; | |
} | |
// Compressed just for adding it to your bookmarks toolbar: | |
javascript:var dev="http://underave.loc";var prod="https://underave.net";var redirect=location.origin==dev?prod:location.origin==prod?dev:false;if(redirect){location.href=redirect+location.pathname+location.search+location.hash} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment