2011-01-01 09:09:02 +03:00
|
|
|
if (phantom.state.length === 0) {
|
2011-01-15 09:24:47 +03:00
|
|
|
var address = phantom.args[0];
|
2011-01-01 09:09:02 +03:00
|
|
|
phantom.state = 'news';
|
2011-01-01 06:35:38 +03:00
|
|
|
phantom.viewportSize = { width: 320, height: 480 };
|
|
|
|
phantom.open('http://news.google.com/news/i/section?&topic=t');
|
|
|
|
} else {
|
|
|
|
var 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();
|
|
|
|
}
|