@@ -50,28 +50,28 @@ server._pluginEvent = function(methodName, args, callback) {
50
50
} else {
51
51
next ( ) ;
52
52
}
53
- }
53
+ } ;
54
54
55
55
args . push ( next ) ;
56
56
next ( ) ;
57
57
} ;
58
58
59
59
server . createPhantom = function ( ) {
60
60
var _this = this ;
61
- console . log ( 'starting phantom' )
61
+ console . log ( 'starting phantom' ) ;
62
62
63
63
phantom . create ( "--load-images=false" , "--ignore-ssl-errors=true" , "--ssl-protocol=tlsv1" , {
64
64
binary : require ( 'phantomjs' ) . path ,
65
65
onExit : function ( ) {
66
66
_this . phantom = null ;
67
- console . log ( 'phantom crashed, restarting...' )
67
+ console . log ( 'phantom crashed, restarting...' ) ;
68
68
process . nextTick ( _ . bind ( _this . createPhantom , _this ) ) ;
69
69
}
70
70
} , _ . bind ( this . onPhantomCreate , this ) ) ;
71
71
} ;
72
72
73
73
server . onPhantomCreate = function ( phantom ) {
74
- console . log ( 'started phantom' )
74
+ console . log ( 'started phantom' ) ;
75
75
this . phantom = phantom ;
76
76
this . phantom . id = Math . random ( ) . toString ( 36 ) ;
77
77
} ;
@@ -161,7 +161,7 @@ server.onResourceRequestedCallback = function (req, res, requestData) {
161
161
// Decrement the number of pending requests left to download after a resource
162
162
// is downloaded
163
163
server . onResourceReceived = function ( req , res , response ) {
164
- req . prerender . lastResourceReceived = new Date ;
164
+ req . prerender . lastResourceReceived = new Date ( ) ;
165
165
166
166
//sometimes on redirects, phantomjs doesnt fire the 'end' stage of the original request, so we need to check it here
167
167
if ( util . normalizeUrl ( req . prerender . url ) === util . normalizeUrl ( response . url ) && response . status >= 300 && response . status <= 399 ) {
@@ -246,7 +246,7 @@ server.evaluateJavascriptOnPage = function(req, res) {
246
246
req . prerender . page . evaluate ( this . javascriptToExecuteOnPage , function ( obj ) {
247
247
// Update the evaluated HTML
248
248
req . prerender . documentHTML = obj . html ;
249
- req . prerender . lastJavascriptExecution = new Date ;
249
+ req . prerender . lastJavascriptExecution = new Date ( ) ;
250
250
251
251
if ( ! obj . shouldWaitForPrerenderReady || ( obj . shouldWaitForPrerenderReady && obj . prerenderReady ) ) {
252
252
clearInterval ( req . prerender . timeoutChecker ) ;
@@ -293,7 +293,6 @@ server.javascriptToExecuteOnPage = function() {
293
293
294
294
// Called when we're done evaluating the javascript on the page
295
295
server . onPageEvaluate = function ( req , res ) {
296
- var _this = this ;
297
296
298
297
if ( req . prerender . stage >= 2 ) return ;
299
298
0 commit comments