Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
JS bookmarklet - add an extra extension to the end of a domain
function locationreplace(a, b) {
currentLocation = window.location.href;
newLocation = currentLocation.toString().replace(a, b);
document.location.href = newLocation;
locationreplace('.org', '.org.etc.etc');

This comment has been minimized.

Copy link
Owner Author

@geerlingguy geerlingguy commented Jan 11, 2016

You can use something like to create the bookmarklet link quickly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.