Am 29.03.2013 12:06, schrieb Slavko Kocjancic:
Hello...

The folowing script send all <a href...> to local server where is saved to
file.
The problem is that I cant manage to extend that.

for example there is one link of my interest.

  <a
href="/xxxx/xxxxx_xxxxxxx.aspx?guid=78316a46-9dd2-4444-ae75-636436de55788d5c"
class="lnk  "><span>Some text here</span></a>

So I wan't to POST just links wich have "a href" and the <span> element is
present.
In addition I wan't to pass entire text betwen <a and /a>


//Send all url's to server
var allLinks, thisLink;
allLinks = document.evaluate("//a[@href]",document,
null,XPathResult.ORDERED_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/test.php',
     headers: {'Content-type': 'application/x-www-form-urlencoded'},
     data: 'par='+lines[i],
     onload: function(responseDetails) {}
   });
};

Why would you want to log links to a server?
It looks like you're writing a script to exploit somebody by sending his session links to you so you can use them.

You could perfectly see from

<a href="/shop/order_091bc7a.aspx?guid=78316a46-9dd2-4324-ae75-636436de55788d5c" 
class="lnk"><span>Buy item</span></a>

what the link does.

I won't support until I know what exactly you're doing here.

Chris

--
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