summaryrefslogtreecommitdiff
path: root/crocoite/data/extract-links.js
blob: f2a37aa654721abb5f2fa1f2be6855de7706d8b1 (plain)
1
2
3
4
5
6
7
8
9
/*	Extract links from a page
 */
let x = document.body.querySelectorAll('a[href]');
let ret = [];
let index = 0;
for( index=0; index < x.length; index++ ) {
   ret.push (x[index].href);
}
ret; /* immediately return results, for use with Runtime.evaluate() */