mozdev.org

macrozilla    

resources:
Basic Script Examples

This sample works with macrozilla version 0.04. Note that this version integrates the dumparea which allows your script to generate results. The following script navigates through a set of web sites (defined in the sites array) and collects the JS code to the dumparea.

sites=['http://taboca.com','http://geckonnection.com','http://www.livesidebar.com','http://www.bradesco.com.br'];
var ii=0;

function keepnext() {
if(ii!=0) {
 if(parent.parent.__contentDocument.getElementsByTagName('script').length) {
  for(var j=0;j<parent.parent.__contentDocument.getElementsByTagName('script').length;j++) {
   
parent.document.getElementById("dumparea").value+="============\nsite:"+sites[ii]+ "\n=============\n";

parent.document.getElementById("dumparea").value+="\n"+parent.parent.__contentDocument.getElementsByTagName('script').item(j).innerHTML;


  }
 }
}

 if(ii<sites.length) {
 
  __loadSiteCallback(sites[ii],"keepnext()");
  ii++;
 } else {
 }
}

keepnext();

For questions or comments about macrozilla, please send a message to the macrozilla mailing list.
Copyright © 2000-2008. All rights reserved. Terms of Use & Privacy Policy.