Skip to content

Instantly share code, notes, and snippets.

@maxim
Created March 29, 2012 22:36
Show Gist options
  • Select an option

  • Save maxim/2244442 to your computer and use it in GitHub Desktop.

Select an option

Save maxim/2244442 to your computer and use it in GitHub Desktop.
Bookmarklets to switch between ruby docs versions

Bookmarklets for ruby doc version switching

Let's say you googled "ruby strftime" and ended up on this page:

http://www.ruby-doc.org/core-1.9.3/Time.html#method-i-strftime

Only for your project you need ruby 1.8.7. Simply click the bookmarklet and it will redirect you to this page: http://www.ruby-doc.org/core-1.8.7/Time.html#method-i-strftime

Thanks to @kangax for making these for me. :)

Switch to 1.8.7

name: ↪ 1.8.7

code: javascript:void(document.location = document.URL.replace(/\d+\.\d+\.\d+/, '1.8.7'))

Switch to 1.9.3

name: ↪ 1.9.3

code: javascript:void(document.location = document.URL.replace(/\d+\.\d+\.\d+/, '1.9.3'))

@robd

robd commented Jun 25, 2014

Copy link
Copy Markdown

I did some work on this to support a few more sites / versions: http://robd.github.io/switch-version-bookmarklet/

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