source: other-projects/FileTransfer-WebSocketPair/Themes/themebuilder/bin/phantomjs-1.9.2-windows/examples/seasonfood.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: 731 bytes
Line 
1# Show BBC seasonal food list.
2
3window.cbfunc = (data) ->
4 list = data.query.results.results.result
5 names = ['January', 'February', 'March',
6 'April', 'May', 'June',
7 'July', 'August', 'September',
8 'October', 'November', 'December']
9 for item in list
10 console.log [item.name.replace(/\s/ig, ' '), ':',
11 names[item.atItsBestUntil], 'to',
12 names[item.atItsBestFrom]].join(' ')
13 phantom.exit()
14
15el = document.createElement 'script'
16el.src = 'http://query.yahooapis.com/v1/public/yql?q=SELECT%20*%20FROM%20bbc.goodfood.seasonal%3B&format=json&diagnostics=true&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys&callback=window.cbfunc'
17document.body.appendChild el
Note: See TracBrowser for help on using the repository browser.