Commit 68b32572 68b3257281d7ca4fddd36d429cd4346b65fad1cb by Nicolas Perriault

added jshint directives to samples

1 parent 443a2647
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 /*jshint strict:false*/
2 /*global CasperError console phantom require*/
3
1 var casper = require("casper").create(); 4 var casper = require("casper").create();
2 var dump = require("utils").dump; 5 var dump = require("utils").dump;
3 6
......
1 /*jshint strict:false*/
2 /*global CasperError console phantom require*/
3
1 var casper = require("casper").create(); 4 var casper = require("casper").create();
2 5
3 // listening to a custom event 6 // listening to a custom event
......
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 * download the google logo image onto the local filesystem 5 * download the google logo image onto the local filesystem
3 */ 6 */
4 7
......
1 /*jshint strict:false*/
2 /*global CasperError console phantom require*/
3
1 var casper = require("casper").create({ 4 var casper = require("casper").create({
2 verbose: true 5 verbose: true
3 }); 6 });
......
1 /*jshint strict:false*/
2 /*global CasperError console phantom require*/
3
1 var casper = require("casper").create(); 4 var casper = require("casper").create();
2 5
3 var links = [ 6 var links = [
......
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",
......
1 /*jshint strict:false*/
2 /*global CasperError console phantom require*/
1 var links = []; 3 var links = [];
2 var casper = require("casper").create(); 4 var casper = require("casper").create();
3 5
......
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 /*jshint strict:false*/
2 /*global CasperError console phantom require*/
3
1 var casper = require("casper").create({ 4 var casper = require("casper").create({
2 logLevel: "debug" 5 logLevel: "debug"
3 }); 6 });
......
1 /*jshint strict:false*/
2 /*global CasperError console phantom require*/
3
1 var casper = require("casper").create({ 4 var casper = require("casper").create({
2 verbose: true, 5 verbose: true,
3 logLevel: "debug" 6 logLevel: "debug"
......
1 /*jshint strict:false*/
2 /*global CasperError console phantom require*/
3
1 var casper = require("casper").create(); 4 var casper = require("casper").create();
2 var url = casper.cli.get(0); 5 var url = casper.cli.get(0);
3 var metas = []; 6 var metas = [];
......
1 /*jshint strict:false*/
2 /*global CasperError console phantom require*/
3
1 var casper = require("casper").create({ 4 var casper = require("casper").create({
2 verbose: true 5 verbose: true
3 }); 6 });
......
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 */
......
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 7
......
1 /*jshint strict:false*/
2 /*global CasperError console phantom require*/
3
1 var failed = []; 4 var failed = [];
2 var start = null; 5 var start = null;
3 var links = [ 6 var links = [
......
1 /* 1 /*jshint strict:false*/
2 /*global CasperError console phantom require*/
3
4 /**
2 * Just a silly game. 5 * Just a silly game.
3 * 6 *
4 * $ casperjs samples/timeout.js 500 7 * $ casperjs samples/timeout.js 500
......
1 /*jshint strict:false*/
2 /*global CasperError console phantom require*/
3
1 /** 4 /**
2 * Translation using the Google Translate Service. 5 * Translation using the Google Translate Service.
3 * 6 *
......