Skip to content
This repository has been archived by the owner on Dec 26, 2020. It is now read-only.

Commit

Permalink
Ugly hack to prevent Goodreads showing 'Huckleberry Finn' reviews whe…
Browse files Browse the repository at this point in the history
…n it doesn't know the ISBN, thanks to Sanjeev Kumar Dangi for the report
  • Loading branch information
swaroopch committed Jul 29, 2011
1 parent dbcc3ba commit be20979
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions app/views/book/view.html.erb
Expand Up @@ -80,6 +80,14 @@
<div class="goodreads">
<script type="text/javascript" charset="utf-8" src="http://www.goodreads.com/api/reviews_widget?did=DEVELOPER_ID&isbn=<%= @isbn %>&min_length=100&num_reviews=10"></script>
</div>
<% content_for :js do %>
// Ugly hack to prevent Goodreads showing 'Huckleberry Finn' reviews when it doesn't know the ISBN...
$( function() {
if ( $(".goodreads div.gr_reviews_header a").attr('href').match(/2956\./) ) {
$(".goodreads").remove();
}
} );
<% end %>
<% unless @bookseer.nil? %>
<h2>What to read next?</h2>
Expand Down

0 comments on commit be20979

Please sign in to comment.