views:

94

answers:

1

Hello ppl,

I am trying to make firefox automatically visit a set of webpages and report to me somehow how much it took to load each page. My best option so far seems to be the ChickenFoot extension. The following program however always outputs the same load time (3 milliseconds):

function end_timer(start){
    stop = new Date()
    output("Load time:" + parseInt(stop.getTime() - start.getTime()))
}


start = new Date()
go("facebook.com")
whenLoaded(end_timer(start), this)

Does anyone have any ideas? Thanks !

A: 

Ok ppl, I found it.. I am just pasting the corrected code here in case someone wants to use it in the future:

function end_timer(start){
    stop = new Date()
    output("Load time:" + parseInt(stop.getTime() - start.getTime()))
}


start = new Date()
go("facebook.com")
wait()
end_timer(start)
nikifor