Any way to open multiple browser bookmarks from a portable file?
March 12, 2013 7:39 AM   Subscribe

I use Chrome at work, and usually open up the same set of five or six websites every day, multiple times a day. I do not store non-work-related bookmarks on this browser, so I have to load the sites up manually every time. Is there a simple, one-click method of opening up multiple bookmarks in Chrome without having those bookmarks saved in the browser?

What I'm envisioning is a file that I could download from my server and double-click to open multiple web pages, but would NOT save those pages as bookmarks (so, can't just import a bookmarks file). I would prefer a solution that requires the least possible number of actions. Thanks for your help!
posted by El Sabor Asiatico to Computers & Internet (9 answers total) 1 user marked this as a favorite
 
Best answer: Assuming you are on Windows you could try a batchfile like they talk about here
posted by Captain_Science at 8:02 AM on March 12, 2013


Can you install chrome extensions? This extension lets you import lists of urls and restore them.
posted by Maecenas at 8:04 AM on March 12, 2013


Response by poster: I think the batchfile solution is the one that would work best for my situation. Thank you!
posted by El Sabor Asiatico at 8:09 AM on March 12, 2013


Best answer: I think writing a little bit of Javascript to call window.open should work. This is my first attempt at a suitable "tool" and I did at least verify it works on Firefox, which is the only browser I have at hand right now. Can you give it a quick test? Save it as a file somewhere where it's easy to open, then open it and click the text that looks like a link. It should open three new windows and the listed sites in them.

Now, I hope I have escaped my HTML properly so it appears on the site all right. If it turns into a mess, I'll have to ask a mod to remove/fix it. Fingers crossed.

Assuming pasting works out all right, it is supposed to be a very simple web page with a link that has an attached Javascript event handler. In this case I think it's easier to put the JS into the same file as the HTML, since this for your own personal use only. (It'd be bad style on a real site.) The little script iterates over the strings in the array called sites and opens each of them in a new window. You add as many sites into the list as you wish, following the format it uses.
<html>
    <head>
        <title>Open Sites tool</title>
        <script>
            var sites = [
                'http://stackoverflow.com',
                'http://metafilter.com',
                'http://google.com',
            ];
            function open_sites() {
                for (var which in sites)
                    window.open(sites[which]);
                return false;
            }
        </script>
    </head>
    <body>
        <big><a href="" onclick='open_sites()'>Open the sites</a></big>
    </body>
</html>

posted by tykky at 8:18 AM on March 12, 2013


Response by poster: Whoa, that is pretty neat! But is it possible to have the links open in multiple tabs rather than separate pages?
posted by El Sabor Asiatico at 8:24 AM on March 12, 2013


It should be possible to open the pages in tabs in Chrome. I can't find out for sure right now because I don't have Chrome to test with, but I'll get back to you soon. It might be a very simple change, so if someone else knows the right way, just go ahead please.
posted by tykky at 8:42 AM on March 12, 2013


Well, things got confusing. I tried installing Chrome (actually called Chromium for my OS) on my computer and tried my script. It opened only one of the windows, but did put it in a tab. After a bit of searching I found out that there is an open issue about opening multiple windows from JavaScript, and this little script I wrote isn't even expected to work on Chrome, at least not consistently. (Possibly the reason for this is a security issue with malicious pages opening tons of new windows? I don't know, but I understand it's just a thing that's currently not possible to do.)

I then wanted to see if there is an option for always opening new pages in a tab, which I would then suggest you use. I found out instead that there is an option to specify what pages should be opened when Chrome/ium starts. Please check if the version of Chrome you are using has this entry in the Settings menu, and it is usable:

Heading: "On Startup", item: "Open a specific page or set of pages." (and an option to set the pages).

You could also look if there is a choice to open new pages in new tabs by default.

If that doesn't work, I think it's better to go with the more suitable of the other solutions than try to fix what I offered. I can't guarantee it will work the same on your computer even if I get it to work right on mine.
posted by tykky at 9:33 AM on March 12, 2013


Best answer: For me on Windows running:
chrome.exe "http://metafilter.com" "http://ask.metafilter.com" "http://metatalk.metafilter.com"
launches Chrome with three tabs. Put this in a batch file and it should work for you.
posted by mmascolino at 9:47 AM on March 12, 2013 [1 favorite]


FYI: The open source project "Chromium" is what Google bases their "Chrome" browser on. Chromium is available on many platforms.

Google takes the code for Chromium and adds to it an integrated Adobe Flash player, a PDF viewer, an auto updater and a few more features.

Now to make it confusing. The layout engine in Chromium (and Chrome) is WebKit. Webkit is an open source fork of KHTML (from KDE) started by Apple and is used in their Safari web browser. Webkit is now developed by Apple, Google, KDE, Nokia, Adobe and others.
posted by Leenie at 2:24 AM on March 13, 2013


« Older Blood sugar issues because of anti-psychotics...   |   Bro's guardian has revoked consent; how do I speak... Newer »
This thread is closed to new comments.