grab links

Subscribe to grab links 11 posts, 6 voices

 
colore User

hello

is there a way to grab and somehow store all the links or urls in the text of all the webpages I visit, that contain a specific string eg urls like www.*.com/*.pdf ?

ie, the script must scan the text and links of all the webpages I visit and if it finds an url of the above mask, it should store it (in a text file, in a bookmark folder, anywhere)

thanks

 
Dan Atkinson Scriptwright

It won't be able to write to a file.

 
colore User

I know, maybe bookmark or parse the urls to another program?

 
Descriptor Scriptwright

A script can't do that, it would have to be an extension because only an extension would have those privileges.
The best you could hope for with a script is to make a list and copy it to the clipboard.

Edit: I mean to manually copy to clipboard, alien_scum is correct as far as I know, and illustrated what I meant.

 
Descriptor Scriptwright

Something like Linky https://addons.mozilla.org/en-US/firefox/addon/425

 
alien_scum Scriptwright

You could create a new page with the information in then save that using the normal CTRL-S eg

GM_openInTab("data:text/plain,"+escape(listOlinks));

Descriptor, I didn't think the clipboard was accessible from scripts.

 
tlacaelel Scriptwright

Try saving it to a cookie.
document.cookie = "expires=xxxx;"
document.cookie += "example.com/some.pdf"
?

 
gialloporpora Scriptwright

Dear all,

I have searched for a copyToClipboard function to add in my script and I have found this post.

Since Photobucket Website has a similar function working with Firefox, I have also searched with Google finding this (partial) solution:

http://www.jeffothy.com/weblog/clipboard-copy

I know this is not a "good" solution, it use Flash, but Flash is the most popular plugin,, I think all people have it installed.

My problem, is where to host the file clipboard.swf for these two reasons, I think is a great thing if it could be hosted on userscript.org:
- my site is not very good, sometimes it is down for many hours
- for security reasons, I believe that it is better if the file is hosted in a secure place, like this site.

If this is not possible, no problem I don't insert the copyToClipboard function in my userscript.

Thanks for your attention and excuse me for my english.

Sandro

 
alien_scum Scriptwright

I would recommend a data uri, it encodes the flash as a string you can just include in your script. For more information checkout Dive into Greasemonkey.

 
gialloporpora Scriptwright

@alien_scum,
thank you for your suggestion.
I have tried with your method, but unfortunatelly it doesn't work :-(

I have used "The Data Uri Kitchen" to encode SWF file as a string (first in base64 and after with no base64) but it doesn't work.

For the moment, I hav uploaded a second version of my script that use the _clipboard.swf hosted in my site.

Ciao
Sandro

 
gialloporpora Scriptwright

I have searched for this problem and I have find this Topic:
http://www.webmasterworld.com/flash/3510424.htm

At the moment browser not support SWF file inserted as data link, I have also tried with Opera and it not support these data linktoo.

It is not a problem relative to Greasemonkey but this is a feature not supported by Firefox.
I think that no browser support this, not only FF.