MozillaZine

Any extension/add-on to open all links in a webpage portion?

Talk about add-ons and extension development.
jayaraj
 
Posts: 32
Joined: June 23rd, 2009, 5:31 am

Post Posted June 23rd, 2009, 5:45 am

Hi,
I use the latest version of firefox (3.0.11) and need an extension to open all the links in a webpage on separate new tabs. I would even prefer an extension that can open all the links in a selected area. I did a search and (Snap Links 0.0.4) https://addons.mozilla.org/en-US/firefox/addon/4336 suits my purpose in theory but it does not work with latest firefox. Is there any other add-on which will do the same thing?
Please help me to find this as it will be a big time saver.

Thanks in advance

Crazy-EyE
 
Posts: 397
Joined: February 24th, 2008, 6:27 am
Location: Moscow, Russia

Post Posted June 23rd, 2009, 2:34 pm

Mouse Gestures has built-in gesture to open in new tabs/window all the links that you crossed with mouse when doing the gesture. Maybe FireGestures can do it too.

jayaraj
 
Posts: 32
Joined: June 23rd, 2009, 5:31 am

Post Posted June 26th, 2009, 6:14 am

Crazy-EyE wrote:Mouse Gestures has built-in gesture to open in new tabs/window all the links that you crossed with mouse when doing the gesture. Maybe FireGestures can do it too.

thank you i will give a try.

mdsy
 
Posts: 3
Joined: February 21st, 2009, 2:12 am

Post Posted June 26th, 2009, 2:54 pm

Use the extension wizard (http://ted.mielczarek.org/code/mozilla/extensionwiz/) to generate a skeleton extension, then add this code to it (as the menu item oncommand function):

Code: Select all
function openSelectedLinksInTabs(){

        var n_to_open,dl,dll,i,a=[];

        function linkIsSafe(u){
         if (u.substr(0,7)=='mailto:') return false;
         if (u.substr(0,11)=='javascript:') return false;
         return true;
        }

        n_to_open = 0;
        dl = content.document.links;
        dll = dl.length;

        if(content.getSelection && content.getSelection().containsNode){
          for(i=0;i<dll;++i){
            if (content.getSelection().containsNode(dl[i], true) && linkIsSafe(dl[i].href)) ++n_to_open;
          }
          if (n_to_open) {
            for(i=0;i<dll;++i)
                if (content.getSelection().containsNode(dl[i], true) && linkIsSafe(dl[i].href)) a.push(dl[i].href);
         }
        }

        if (!n_to_open) alert('No Links in Selection!');

        var doNext =0;
        function openLink(){
          gBrowser.addTab(a[doNext++]);
          if(doNext==a.length) { window.clearInterval(int); /*alert('done');*/ }
        }

        if(a.length>0){
          gBrowser.addTab(a[doNext++]); //open first one immediately
          int=window.setInterval(openLink,500); //change interval to anything you like
          me.image=throb;
        }


}

therube

User avatar
 
Posts: 13904
Joined: March 10th, 2004, 9:59 pm
Location: Maryland USA

Post Posted June 28th, 2009, 11:41 am

Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.19) Gecko/20110420 SeaMonkey/2.0.14 Pinball CopyURL+ FetchTextURL FlashGot NoScript

Chaosas
 
Posts: 96
Joined: July 18th, 2004, 3:22 am

Post Posted July 1st, 2009, 7:37 am

I used to use Mouse Gestures Redox as mentioned above to do this. It worked perfectly. I used a simple "Down" motion to draw a straight vertical line and all links it crossed would be opened. It was great for opening multiple forum threads, file downloads, etc. However it does not work with Firefox 3.5 (yet?).

I wasn't able achieve the same with Fire Gestures, however it has a feature to open all links in a selection. First you select all links, then draw a gesture with your mouse. So it works a bit different.

Snap Links does not work with 3.5 yet either, but it looks exactly what I'm looking for, so I'm waiting for it to be updated.

The given bookmarklet is nice. I only wish there was a keyboard shortcut for it and no confirmation :-k

Crazy-EyE
 
Posts: 397
Joined: February 24th, 2008, 6:27 am
Location: Moscow, Russia

Post Posted July 1st, 2009, 11:06 am

However it does not work with Firefox 3.5 (yet?).

You can download updated version from its website http://www.mousegestures.org/installation/

Chaosas
 
Posts: 96
Joined: July 18th, 2004, 3:22 am

Post Posted July 1st, 2009, 2:21 pm

Crazy-EyE wrote:
However it does not work with Firefox 3.5 (yet?).

You can download updated version from its website http://www.mousegestures.org/installation/

Nice! Thanks a lot.

Return to Extension Development


Who is online

Users browsing this forum: No registered users and 2 guests