added jshint directives to samples
Showing
21 changed files
with
71 additions
and
11 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 | /* | 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