Permalink
Browse files

Indent with 2 spaces.

  • Loading branch information...
1 parent 5b8a40e commit 2a8fac45b444f781dd7def7d0311a9dd0662619e @rgieseke rgieseke committed May 29, 2011
@@ -1,6 +1,6 @@
if phantom.args.length is 0
- console.log 'Try to pass some args when invoking this script!'
+ console.log 'Try to pass some args when invoking this script!'
else
- for arg, i in phantom.args
- console.log i + ': ' + arg
+ for arg, i in phantom.args
+ console.log i + ': ' + arg
phantom.exit()
@@ -1,8 +1,8 @@
t = 10
while t > 0
- console.log t
- phantom.sleep 1000
- t = t - 1
+ console.log t
+ phantom.sleep 1000
+ t = t - 1
console.log 'BLAST OFF'
phantom.exit()
View
@@ -1,8 +1,8 @@
fibs = [0, 1]
f = ->
- console.log fibs[fibs.length - 1]
- fibs.push fibs[fibs.length - 1] + fibs[fibs.length - 2]
- if fibs.length > 10
- window.clearInterval ticker
- phantom.exit()
+ console.log fibs[fibs.length - 1]
+ fibs.push fibs[fibs.length - 1] + fibs[fibs.length - 2]
+ if fibs.length > 10
+ window.clearInterval ticker
+ phantom.exit()
ticker = window.setInterval(f, 300)
@@ -1,12 +1,12 @@
# Give the estimated location based on the IP address.
window.cb = (data) ->
- loc = data.city
- if data.region_name.length > 0
- loc = loc + ', ' + data.region_name
- console.log 'IP address: ' + data.ip
- console.log 'Estimated location: ' + loc
- phantom.exit()
+ loc = data.city
+ if data.region_name.length > 0
+ loc = loc + ', ' + data.region_name
+ console.log 'IP address: ' + data.ip
+ console.log 'Estimated location: ' + loc
+ phantom.exit()
el = document.createElement 'script'
el.src = 'http://freegeoip.net/json/?callback=window.cb'
@@ -1,11 +1,11 @@
# List movies from kids-in-mind.com
window.cbfunc = (data) ->
- globaldata = data
- list = data.query.results.movie
- for item in list
- console.log item.title + ' [' + item.rating.MPAA.content + ']'
- phantom.exit()
+ globaldata = data
+ list = data.query.results.movie
+ for item in list
+ console.log item.title + ' [' + item.rating.MPAA.content + ']'
+ phantom.exit()
el = document.createElement 'script'
el.src =
@@ -1,16 +1,16 @@
# Show BBC seasonal food list.
window.cbfunc = (data) ->
- list = data.query.results.results.result
- names = ['January', 'February', 'March',
- 'April', 'May', 'June',
- 'July', 'August', 'September',
- 'October', 'November', 'December']
- for item in list
- console.log [item.name.replace(/\s/ig, ' '), ':',
- names[item.atItsBestUntil], 'to',
- names[item.atItsBestFrom]].join(' ')
- phantom.exit()
+ list = data.query.results.results.result
+ names = ['January', 'February', 'March',
+ 'April', 'May', 'June',
+ 'July', 'August', 'September',
+ 'October', 'November', 'December']
+ for item in list
+ console.log [item.name.replace(/\s/ig, ' '), ':',
+ names[item.atItsBestUntil], 'to',
+ names[item.atItsBestFrom]].join(' ')
+ phantom.exit()
el = document.createElement 'script'
el.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'
@@ -1,5 +1,5 @@
console.log 'using PhantomJS version ' +
- phantom.version.major + '.' +
- phantom.version.minor + '.' +
- phantom.version.patch
+ phantom.version.major + '.' +
+ phantom.version.minor + '.' +
+ phantom.version.patch
phantom.exit()

0 comments on commit 2a8fac4

Please sign in to comment.