Last active
August 29, 2015 13:56
-
-
Save bholzer/9040346 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var xpathObj = document.evaluate("//a[text()='Birmingham Mountain Radio']/@href/ancestor::h5[1]/following-sibling::div[contains(@class, 'userContent')]", document, null, XPathResult.ANY_TYPE, null) | |
var result = xpathObj.iterateNext(); | |
while (result) { | |
if (result.textContent.indexOf('ticket')>=0 && (result.textContent.indexOf('win')>=0 || result.textContent.indexOf('free')>=0)) { | |
console.log('get dem tickets!'); | |
} | |
result = xpathObj.iterateNext(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment