Skip to content

Instantly share code, notes, and snippets.

@singhai0 singhai0/addtogoodreads.js
Last active Dec 11, 2017

Embed
What would you like to do?
Bookmarklet to open Goodreads listing for an Amazon book (in the same tab/window).
javascript:%20var%20array%20=%20document.URL.match(/amazon%5C.(.*?)%5C/.*?%5C/.*?%5C/(.%7B10%7D)/);%20if%20(array%20==%20null)%20%7B%20alert('Sorry,%20this%20doesn%5C't%20appear%20to%20be%20an%20Amazon%20book%20page.');%20%7D%20else%20%7B%20var%20x%20=%20window.location.replace('https://www.goodreads.com/review/isbn/'+%20array%5B2%5D%20+%20'?tld='%20+%20array%5B1%5D%20+%20'&from=bm',%20'add_review');%20x.focus();%20%7D
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.