0

我试图让 Firefox 自动访问一组网页,并以某种方式向我报告加载每个页面需要多少时间。到目前为止,我最好的选择似乎是 ChickenFoot 扩展。但是,以下程序始终输出相同的加载时间(3 毫秒):

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)

有没有人有任何想法?谢谢 !

4

1 回答 1

0

好的,我找到了。我只是在此处粘贴更正的代码,以防将来有人想使用它:

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)
于 2009-12-15T16:05:00.313 回答