I'm not sure if this is the appropriate place to put such a thing, but many of us paste links to docs and older Questions should perhaps be updated whenever it makes sense. This makes that slightly more convenient..

enter image description here

I use this a lot, maybe others will find some use for it

javascript:(function()%7Bvar current %3D window.location %2B ""%3Bvar newUrl %3D current.replace(%2Fpython_api_(.%2B)%5C%2F%2Fgi%2C 'python_api_current%2F')%3Bwindow.location%3DnewUrl%7D)()

the non mangled version:

        var current = window.location + "";
        var newUrl = current.replace(/python_api_(.+)\//gi, 'python_api_current/');
        window.location = newUrl


To install, go to Other Bookmarks > Add Page > URL and paste the single line javascript at the top, then pick a useful name for the bookmark.

  • 1
    $\begingroup$ Maybe add a quick "install" line for some users. Useful, thanks. $\endgroup$
    – iKlsR
    Sep 6 '16 at 17:06
  • $\begingroup$ i might be overlooking something but it appears that bookmarklet link creation is prohibited on SE , which totally makes sense. $\endgroup$
    – zeffii
    Sep 6 '16 at 17:49

You must log in to answer this question.

Browse other questions tagged .