Commit 7c5ef062 7c5ef0627ae67b8f13d79b5c08e8d2bcff51099f by Nicolas Perriault

typos

1 parent 562ae519
...@@ -18,6 +18,8 @@ Feel free to browse our [sample examples repository](https://github.com/n1k0/cas ...@@ -18,6 +18,8 @@ Feel free to browse our [sample examples repository](https://github.com/n1k0/cas
18 In the following example, we'll query google for two terms consecutively, `capserjs` and `phantomjs`, and aggregate the result links in a standard Array. Then we'll output the result to the console: 18 In the following example, we'll query google for two terms consecutively, `capserjs` and `phantomjs`, and aggregate the result links in a standard Array. Then we'll output the result to the console:
19 19
20 ``` javascript 20 ``` javascript
21 phantom.injectJs('casper.js');
22
21 function getLinks() { 23 function getLinks() {
22 var links = document.querySelectorAll('h3.r a'); 24 var links = document.querySelectorAll('h3.r a');
23 return Array.prototype.map.call(links, function(e) { 25 return Array.prototype.map.call(links, function(e) {
...@@ -66,7 +68,7 @@ var casper = new phantom.Casper({ ...@@ -66,7 +68,7 @@ var casper = new phantom.Casper({
66 68
67 Run it: 69 Run it:
68 70
69 $ phantomjs example.js 71 $ phantomjs samples/googlelinks.js
70 [info] [phantom] Starting… 72 [info] [phantom] Starting…
71 [info] [phantom] Running suite: 3 steps 73 [info] [phantom] Running suite: 3 steps
72 [info] [phantom] Step 1/3: http://www.google.fr/ (HTTP 301) 74 [info] [phantom] Step 1/3: http://www.google.fr/ (HTTP 301)
......