added jshint directives to samples
Showing
21 changed files
with
72 additions
and
12 deletions
1 | /* | 1 | /*jshint strict:false*/ |
2 | /*global CasperError console phantom require*/ | ||
3 | |||
4 | /** | ||
2 | * Create a mosaic image from all headline photos on BBC homepage | 5 | * Create a mosaic image from all headline photos on BBC homepage |
3 | */ | 6 | */ |
4 | |||
5 | var casper = require("casper").create(); | 7 | var casper = require("casper").create(); |
6 | var nbLinks = 0; | 8 | var nbLinks = 0; |
7 | var currentLink = 1; | 9 | var currentLink = 1; | ... | ... |
1 | /* | 1 | /*jshint strict:false*/ |
2 | /*global CasperError console phantom require*/ | ||
3 | |||
4 | /** | ||
2 | * A basic custom logging implementation. The idea is to (extremely) verbosely | 5 | * A basic custom logging implementation. The idea is to (extremely) verbosely |
3 | * log every received resource. | 6 | * log every received resource. |
4 | */ | 7 | */ | ... | ... |
1 | /* | 1 | /*jshint strict:false*/ |
2 | /*global CasperError console phantom require*/ | ||
3 | |||
4 | /** | ||
2 | * This script will add a custom HTTP status code handler, here for 404 pages. | 5 | * This script will add a custom HTTP status code handler, here for 404 pages. |
3 | */ | 6 | */ |
4 | |||
5 | var casper = require("casper").create(); | 7 | var casper = require("casper").create(); |
6 | 8 | ||
7 | casper.on("http.status.200", function(resource) { | 9 | casper.on("http.status.200", function(resource) { | ... | ... |
1 | /*jshint strict:false*/ | ||
2 | /*global CasperError console phantom require*/ | ||
3 | |||
1 | var casper = require("casper").create({ | 4 | var casper = require("casper").create({ |
2 | loadImages: false, | 5 | loadImages: false, |
3 | logLevel: "debug", | 6 | logLevel: "debug", |
... | @@ -34,4 +37,4 @@ Object.keys(links).forEach(function(url) { | ... | @@ -34,4 +37,4 @@ Object.keys(links).forEach(function(url) { |
34 | fantomas.run(function() { | 37 | fantomas.run(function() { |
35 | this.renderJSON(links); | 38 | this.renderJSON(links); |
36 | this.exit(); | 39 | this.exit(); |
37 | }); | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
40 | }); | ... | ... |
1 | /* | 1 | /*jshint strict:false*/ |
2 | /*global CasperError console phantom require*/ | ||
3 | |||
4 | /** | ||
2 | * Takes provided terms passed as arguments and query google for the number of | 5 | * Takes provided terms passed as arguments and query google for the number of |
3 | * estimated results each have. | 6 | * estimated results each have. |
4 | * | 7 | * | ... | ... |
1 | /* | 1 | /*jshint strict:false*/ |
2 | /*global CasperError console phantom require*/ | ||
3 | |||
4 | /** | ||
2 | * Capture multiple pages of google search results | 5 | * Capture multiple pages of google search results |
3 | * | 6 | * |
4 | * Usage: $ casperjs googlepagination.coffee my search terms | 7 | * Usage: $ casperjs googlepagination.coffee my search terms | ... | ... |
1 | /* | 1 | /*jshint strict:false*/ |
2 | /*global CasperError console phantom require*/ | ||
3 | |||
4 | /** | ||
2 | * This script will capture a screenshot of a twitter account page | 5 | * This script will capture a screenshot of a twitter account page |
3 | * Usage: $ casperjs screenshot.coffee <twitter-account> <filename.[jpg|png|pdf]> | 6 | * Usage: $ casperjs screenshot.coffee <twitter-account> <filename.[jpg|png|pdf]> |
4 | */ | 7 | */ | ... | ... |
-
Please register or sign in to post a comment