Replace end characters of current URL with bookmarklet
问题 Is there a way to replace all characters after the last backslash in the currentURL with another string via javascript bookmarklet? I'm doing a lot of auditing work with Sharepoint sites and having to manually look at the settings pages for sites by entering strings to the end of a URL. For example, I might go to a site like: https://site.com/..../default.aspx And I replace the "default.aspx" with "_layouts/user.aspx" and reload the new page so it is now at: https://site.com/..../_layouts