How can I make a script to catch strings as input and open them in a firefox document?

How can I make a script to catch strings as input and open them in a Firefox document? Each link will go to a different window or tab. Any ideas would be much appreciated.

I just want to have some links and open them. For example, I have 50 links. And copying and parsing these 50 links is very time consuming and also a lot of work. If I can just write a script to read these links and let the computer do the job, that will be very helpful to me. I just don't know how to write this or where, because it doesn't sound too difficult (you just need to know how to do it). Thanks for any suggestions.

-1


source to share


2 answers


If I got to you, I think you could do something like this. This will open the listed four URLs, but is probably being blocked by a popup blocker.



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Documento sin t&iacute;tulo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<script>
<!--
    var dir = new Array();
    dir[0] = "http://www.creativecorner.cl/";
    dir[1] = "http://www.sourcing.cl/";
    dir[2] = "http://www.feeds.cl/";
    dir[3] = "http://www.neonomade.com/";
    for(i = 0 ; i < dir.length ; i++){
        window.open(dir[i],'autowindow' + i,'width=1024,height=768');
    }
-->
</script>
</body>
</html>

      

+1


source


Enter this filename "links.html" to your hard drive:

<html>
<head><title>Your links</title></head>
<body>
Your links:<br />
<a href="XXX">XXX</a><br />
</body>
</html>

      

Replace the two "XXX" with one link and emit one "link" (a) line per link. You should be able to do this in most text editors with a little search. Once you're done, save the file and open it in your browser.



Another option is to look at your browser's bookmark file and duplicate the format. You can usually ignore things like "last time", etc. Just add links.

If you want to do this in JavaScript, you will need to use a form with a text box. Create a small HTML document with a form, JavaScript, textbox and div for the result.

Add a button that calls a JavaScript function that takes text from the textbox, breaks it into lines, and creates the HTML above (link lines only) as a string. Now assign this line to the innerHTML

div attribute to make the links accessible.

0


source







All Articles