Bug:Fix file validation issue
[vnfsdk/refrepo.git] / vnfmarket / src / main / webapp / vnfmarket / node_modules / phantomjs / lib / phantom / examples / technews.coffee
1 page = require('webpage').create()
2
3 page.viewportSize = { width: 320, height: 480 }
4
5 page.open 'http://news.google.com/news/i/section?&topic=t',
6   (status) ->
7     if status isnt 'success'
8       console.log 'Unable to access the network!'
9     else
10       page.evaluate ->
11         body = document.body
12         body.style.backgroundColor = '#fff'
13         body.querySelector('div#title-block').style.display = 'none'
14         body.querySelector('form#edition-picker-form')
15           .parentElement.parentElement.style.display = 'none'
16       page.render 'technews.png'
17     phantom.exit()