Skip to content

Commit

Permalink
Merge pull request #1 from soulgalore/phantomjs2-fix
Browse files Browse the repository at this point in the history
removed deprecated args to work with phantomjs 2 marcelduran#129
  • Loading branch information
Ho-Fan Kang committed Mar 29, 2016
2 parents 1f9bcab + a5ec94d commit 19b1bb0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/phantomjs/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
// parse args
var i, arg, page, urlCount, viewport,
webpage = require('webpage'),
args = phantom.args,
system = require('system'),
args = system.args,
len = args.length,
urls = [],
yslowArgs = {
Expand Down Expand Up @@ -55,8 +56,8 @@ var i, arg, page, urlCount, viewport,
ch: 'headers'
};

// loop args
for (i = 0; i < len; i += 1) {
// loop args, skip the first arg "scripr name"
for (i = 1; i < len; i += 1) {
arg = args[i];
if (arg[0] !== '-') {
// url, normalize if needed
Expand Down

0 comments on commit 19b1bb0

Please sign in to comment.