On 04/01/2013 08:03 PM, LWChris@LyricWiki wrote:
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
I managed to save complete page to server and then crunch in other program.
I just need that link to open the page and extract coordinate in the
page to send in my GPS receiver. Is just to tedious to make hunderd
clicks to got 25 coordinates... So I automate it... :D
and link like "Buy item" is not god and is thrown away. Ićm focused on
link with Geocache here...
So this problem is solved other way.
--
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.