[SCRIPT] Linkify

PHP Scripts, Socials API's and more
User avatar
p455w0rd
Site Admin
Site Admin
Posts: 283
Joined: Wed Sep 14, 2005 12:00 am
Contact:

[SCRIPT] Linkify

Postby p455w0rd » Sat Dec 15, 2012 7:38 am

Ever go to a web page and there's a link in plain text to a file that you want to download. If you copy and paste, this downloads to the default download directory. Now there may be a built in way to do this, but I figure I wasted the same amount of time writing this little piece of code as I would have spending time looking up a built-in method.

For this I am using Google Chrome, so your results may vary, but I imagine this should work on any of the top 10 browsers.

So click the star or whatever you normally do to add a bookmark, then click the edit link. change the name to something like "JavaScript Linkify". Then enter the following code as the url:


javascript:var a=prompt('Type a url:','http://');var n=document.open();n.write(''+a+'');


When when the page with the link loads, right-click click "Save target as..."

Image
Image

Return to “Code”

Who is online

Users browsing this forum: No registered users and 1 guest