Skip to content

Instantly share code, notes, and snippets.

@geerlingguy
Created January 10, 2016 03:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save geerlingguy/431a3d399ae2b8beee65 to your computer and use it in GitHub Desktop.
Save geerlingguy/431a3d399ae2b8beee65 to your computer and use it in GitHub Desktop.
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');
@geerlingguy
Copy link
Author

You can use something like http://ted.mielczarek.org/code/mozilla/bookmarklet.html to create the bookmarklet link quickly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment