Retrieve a div inside a div
I've written a Greasemonkey script to replace the Firefox title bar at woot.com with the item, price, and % left - http://userscripts.org/scripts/show/137091 The problem is that it only works on the main woot-off page - if home.woot is also having a woot-off, you still get the item name from the main page.
Here is the source at home.woot:
I have tried several different ways to retrieve the title. Right now, I have:
<div class="offer woot-off ">
<a class="info" href="http://firstname.lastname@example.org/daily">
<div class="label">It's a Woot Off</div>
<div class="title">Smith's Electric Knife Sharpener</div>
<span class="percentage">60% off <span class="list-price-label">List Price</span></span>
What is the proper syntax? This seems like it should be so simple, but I'm just not getting it.
var subpageItem = document.getElementsByClassName("offer woot-off ").getElementsByClassName("title").innerHTML;