Skip to content

Commit

Permalink
Fix conflict with subreddit scraper and RES.
Browse files Browse the repository at this point in the history
Companion was getting extra data after the subreddit on some pages in
browsers running Reddit Enhancement Suite (was adding "+shortcut" to the
end of info.subreddit).
  • Loading branch information
mhweaver authored and chromakode committed Jul 16, 2011
1 parent 2a7a22f commit d81eb29
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/redditContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function scrapeThingInfo(thing) {

info.score = parseInt(thing.querySelector('.score'+scoreClass).innerText)

info.subreddit = (thing.querySelector('a.subreddit') || document.querySelector('.redditname:first-child')).innerText
info.subreddit = (thing.querySelector('a.subreddit') || document.querySelector('.redditname > a')).innerText

info.num_comments = parseInt(thing.querySelector('.comments').innerText) || 0

Expand Down

0 comments on commit d81eb29

Please sign in to comment.