Hello...

I try to write GM script. 
On the start I wan't to save all href's to local server and that works...

*//Send all url's to server
var allLinks, thisLink;
allLinks = document.evaluate('//a[@href]',document, 
null,XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
for (var i = 0; i < allLinks.snapshotLength; i++) {
  thisLink = allLinks.snapshotItem(i);
  GM_xmlhttpRequest({
    method: 'POST',
    url: 'http://127.0.0.1/vaje/test.php',
    headers: {'Content-type': 'application/x-www-form-urlencoded'},
    data: 'par='+thisLink,
    onload: function(responseDetails) {}
  });
};

*
I wan't to automaticaly click the url with Next > text (url is java script 
tag)
This work's too

*//click to next page.
var TargetLink              = $("a:contains('Next >')");
if (TargetLink  &&  TargetLink.length) window.location.href    = 
TargetLink[0].href;
*
Now the problem is that program separated works without problem, but cant 
figure out how to combine both. So that links are saved and click is done 
after that.
If both part's are present then neither works!

Help

Slavko.

-- 
You received this message because you are subscribed to the Google Groups 
"greasemonkey-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/greasemonkey-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to