Created
January 10, 2016 03:08
-
-
Save geerlingguy/431a3d399ae2b8beee65 to your computer and use it in GitHub Desktop.
JS bookmarklet - add an extra extension to the end of a domain
This file contains hidden or 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
function locationreplace(a, b) { | |
currentLocation = window.location.href; | |
newLocation = currentLocation.toString().replace(a, b); | |
document.location.href = newLocation; | |
} | |
locationreplace('.org', '.org.etc.etc'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can use something like http://ted.mielczarek.org/code/mozilla/bookmarklet.html to create the bookmarklet link quickly.