Commit 34d6e3f7 34d6e3f783a5586fa5d3727ebd1137973b51e432 by Brikou CARRE

reverted inline comments

1 parent 63ba92bb
......@@ -7,7 +7,7 @@ nbLinks = 0
currentLink = 1
images = []
### helper to hide some element from remote DOM ###
# helper to hide some element from remote DOM
casper.hide = (selector) ->
@evaluate (selector) ->
document.querySelector(selector).style.display = "none"
......@@ -17,7 +17,7 @@ casper.start "http://www.bbc.co.uk/", ->
nbLinks = @evaluate ->
return __utils__.findAll('#promo2_carousel_items_items li').length
@echo "#{nbLinks} items founds"
### hide navigation arrows ###
# hide navigation arrows
@hide ".nav_left"
@hide ".nav_right"
@mouse.move "#promo2_carousel"
......@@ -28,10 +28,10 @@ casper.start "http://www.bbc.co.uk/", ->
@echo "Clicked on pause button"
@waitUntilVisible ".autoplay.nav_play", ->
@echo "Carousel has been paused"
### hide play button ###
# hide play button
@hide ".autoplay"
### Capture carrousel area ###
# Capture carrousel area
next = ->
image = "bbcshot#{currentLink}.png"
images.push image
......@@ -45,7 +45,7 @@ next = ->
else
@then buildPage
### Building resulting page and image ###
# Building resulting page and image
buildPage = ->
@echo "Build result page"
fs = require "fs"
......
......@@ -9,7 +9,7 @@ nbLinks = 0;
currentLink = 1;
images = [];
/* helper to hide some element from remote DOM */
// helper to hide some element from remote DOM
casper.hide = function(selector) {
this.evaluate(function(selector) {
document.querySelector(selector).style.display = "none";
......@@ -23,7 +23,7 @@ casper.start("http://www.bbc.co.uk/", function() {
return __utils__.findAll('#promo2_carousel_items_items li').length;
});
this.echo(nbLinks + " items founds");
/* hide navigation arrows */
// hide navigation arrows
this.hide(".nav_left");
this.hide(".nav_right");
this.mouse.move("#promo2_carousel");
......@@ -34,13 +34,13 @@ casper.start("http://www.bbc.co.uk/", function() {
this.echo("Clicked on pause button");
this.waitUntilVisible(".autoplay.nav_play", function() {
this.echo("Carousel has been paused");
/* hide play button */
// hide play button
this.hide(".autoplay");
});
});
});
/* Capture carrousel area */
// Capture carrousel area
next = function() {
var image;
image = "bbcshot" + currentLink + ".png";
......@@ -58,7 +58,7 @@ next = function() {
}
};
/* Building resulting page and image */
// Building resulting page and image
buildPage = function() {
var fs, pageHtml;
this.echo("Build result page");
......
casper = require("casper").create()
dump = require("utils").dump
### removing default options passed by the Python executable ###
# removing default options passed by the Python executable
casper.cli.drop "cli"
casper.cli.drop "casper-path"
......
......@@ -3,7 +3,7 @@ var casper, dump;
casper = require("casper").create();
dump = require("utils").dump;
/* removing default options passed by the Python executable */
// removing default options passed by the Python executable
casper.cli.drop("cli");
casper.cli.drop("casper-path");
......
......@@ -33,7 +33,7 @@ var casper = require("casper").create({
logLevel: "verbose"
});
/* add a new 'verbose' logging level at the lowest priority */
// add a new 'verbose' logging level at the lowest priority
casper.logLevels = ["verbose"].concat(casper.logLevels);
// test our new logger with google
......
casper = require("casper").create
verbose: true
### If we don't set a limit, it could go on forever ###
# If we don't set a limit, it could go on forever
upTo = ~~casper.cli.get(0) || 10
###
......@@ -16,14 +16,14 @@ searchLinks = ->
), (a) ->
a.getAttribute "href"
### The base links array ###
# The base links array
links = [
"http://google.com/"
"http://yahoo.com/"
"http://bing.com/"
]
### Just opens the page and prints the title ###
# Just opens the page and prints the title
start = (link) ->
@start link, ->
@echo "Page title: #{ @getTitle() }"
......@@ -45,7 +45,7 @@ casper.then ->
currentLink = 0;
### As long as it has a next link, and is under the maximum limit, will keep running ###
# As long as it has a next link, and is under the maximum limit, will keep running
check = ->
if links[currentLink] && currentLink < upTo
@echo "--- Link #{currentLink} ---"
......
......@@ -4,7 +4,7 @@ casper = require("casper").create({
verbose: true
});
/* If we don't set a limit, it could go on forever */
// If we don't set a limit, it could go on forever
upTo = ~~casper.cli.get(0) || 10;
/*
......@@ -22,7 +22,7 @@ searchLinks = function() {
});
};
/* The base links array */
// The base links array
links = [
"http://google.com/",
"http://yahoo.com/",
......
var casper;
casper = require("casper").create({
var casper = require("casper").create({
verbose: true,
logLevel: "debug"
});
......