1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
8 function userOnBeforePage()
10 dlog('userOnBeforePage()');
13 function userOnPause()
15 dlog('userOnPause()');
18 function userOnAfterPage()
20 dlog('userOnAfterPage()');
22 setTimeout(collectLinks, 5000);
25 function collectLinks()
27 dlog('collectLinks()');
29 var win = gSpider.mDocument.defaultView;
30 if (win.wrappedJSObject)
32 win = win.wrappedJSObject;
37 switch(navigator.platform)
47 case 'Linux i686 (x86_64)':
51 cdump('Error: Unknown OS ' + navigator.platform);
55 cdump('document.body: ' + win.document.body.innerHTML);
56 var links = win.document.links;
58 for (var ilink = 0; ilink < links.length; ilink++)
60 var link = links[ilink];
61 if (link.href.indexOf('http://download.mozilla.org') != -1 &&
62 link.href.indexOf('os=' + os) != -1)
65 cdump('href: ' + href);
69 gPageCompleted = true;