source: other-projects/FileTransfer-WebSocketPair/Themes/themebuilder/bin/phantomjs-1.9.2-windows/examples/useragent.coffee@ 31525

Last change on this file since 31525 was 31525, checked in by ak19, 7 years ago

Nathan provided more stuff: Themes folder contains Sencha's Themebuilder which generates GXT Themes. It includes the .theme and generated .jar files for the project theme.

File size: 371 bytes
Line 
1page = require('webpage').create()
2
3console.log 'The default user agent is ' + page.settings.userAgent
4
5page.settings.userAgent = 'SpecialAgent'
6page.open 'http://www.httpuseragent.org', (status) ->
7 if status isnt 'success'
8 console.log 'Unable to access network'
9 else
10 console.log page.evaluate -> document.getElementById('myagent').innerText
11 phantom.exit()
Note: See TracBrowser for help on using the repository browser.