Skip to content

Instantly share code, notes, and snippets.

@jimschubert
Created March 22, 2015 03:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jimschubert/7dc2c8bf15eb87813347 to your computer and use it in GitHub Desktop.
Save jimschubert/7dc2c8bf15eb87813347 to your computer and use it in GitHub Desktop.
Goodreads Bookmarklet, modified from https://gist.github.com/lightningdb/cfee260c3b7af7e65fce
javascript: var search = ((document.getElementsByName('ASIN')[0]||document.getElementsByName('ASIN.0')[0]||{}).value || ((document.querySelectorAll('[rel="dc:identifier"],[itemprop="isbn"]')[0]||{}).innerText||''.replace(/-/,''))); if(!search) { alert("Amazon, Packt, or O'Reilly product not found.")} else { var x = window.open('http://www.goodreads.com/review/isbn/'+ search, 'add_review'); x.focus(); }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment