Add Coffeescript version of technews.js.

1.2
rgieseke 2011-04-22 17:39:52 +02:00
parent 5d8e00c695
commit b2e50a26ce
1 changed files with 13 additions and 0 deletions

13
examples/technews.coffee Normal file
View File

@ -0,0 +1,13 @@
if phantom.state.length is 0
address = phantom.args[0]
phantom.state = 'news'
phantom.viewportSize = { width: 320, height: 480 }
phantom.open 'http://news.google.com/news/i/section?&topic=t'
else
body = document.body
body.style.backgroundColor = '#fff'
body.querySelector('div#title-block').style.display = 'none'
body.querySelector('form#edition-picker-form').parentElement.parentElement.style.display = 'none'
phantom.sleep 500
phantom.render 'technews.png'
phantom.exit()