mirror of https://github.com/vitalif/phantomjs
Display tweet index in CoffeeScript example.
parent
cd9e3d9647
commit
c585107e38
|
@ -3,5 +3,6 @@ if phantom.state.length == 0
|
||||||
phantom.open 'http://mobile.twitter.com/sencha'
|
phantom.open 'http://mobile.twitter.com/sencha'
|
||||||
else
|
else
|
||||||
list = document.querySelectorAll 'span.status'
|
list = document.querySelectorAll 'span.status'
|
||||||
console.log i.innerHTML.replace(/<.*?>/g, '') for i in list
|
for elem, index in list
|
||||||
|
console.log((index + 1) + ': ' + elem.innerHTML.replace(/<.*?>/g, ''))
|
||||||
phantom.exit()
|
phantom.exit()
|
||||||
|
|
Loading…
Reference in New Issue