New ext: Open Link/img in Background Tab, in context menu

Talk about add-ons and extension development.
Locked
blrender
Posts: 8
Joined: July 28th, 2004, 4:03 pm

Post by blrender »

heyas;

thanks, mo! can't wait to have this puppy working on my firefox :)
Mozcerize
Posts: 159
Joined: July 30th, 2004, 1:13 pm

Post by Mozcerize »

A new version (1.2) has been released, which fixes a bug in version 1.1 which prevented "Open in Background Window" from working correctly on some installations. I have also taken this opportunity to change the wording of the "Open" item to "Open Link Here", in order to clarify this item's functionality.

VERSION:
1.2

TARGET:
Fx 0.9 - 1.0.
Also includes old install routine for Moz 1.x, Fx <0.9 but this is untested.

DOWNLOAD:
See later post below.

FUNCTIONALITY:
Functionality updated in newer version: see later post below.
Last edited by Mozcerize on January 2nd, 2005, 7:07 am, edited 1 time in total.
User avatar
dmccunney
Posts: 491
Joined: July 5th, 2003, 12:18 pm
Location: NY, NY

Post by dmccunney »

Mozcerize wrote:A new version (1.2) has been released, which fixes a bug in version 1.1 which prevented "Open in Background Window" from working correctly on some installations. I have also taken this opportunity to change the wording of the "Open" item to "Open Link Here", in order to clarify this item's functionality.

If I might make a suggestion for v1.3, make it possible to have the Open In links appear in a sub-menu?

Install enough extensions, and the context menu gets unweildy. Mozilla's menu handling code could be smarter: it only seems to want to align the popup menu so either the top or bottom of the menu is level with the spot you right-clicked. Once the menu gets long enough, the top or bottom can disappear off-screen.

That's bitten me often enough that I'm actively looking for ways to reduce the context menu size and put as much as possible in sub-menus.

Thanks!
______
Dennis
SeaMonkey 1.1.19/NS 7.2/SeaMonkey 2.33.1/SeaMonkey 2.34a,FF release version 32 bit, FF Developer Edition 64bit, FF Nightly 64 bit, Kompozer 0.8b3/Sunbird 0.8/Win2K Pro SP4/WinXP Pro SP3/Win7 Pro SP1/Win10 Pro, Ubuntu Linux 12.04/Ubuntu Linux 16.04/Puppy Linux 4.31
Mozcerize
Posts: 159
Joined: July 30th, 2004, 1:13 pm

Post by Mozcerize »

dmccunney wrote:If I might make a suggestion for v1.3, make it possible to have the Open In links appear in a sub-menu?


Ok, I'll look into it when I get time…
Mozcerize
Posts: 159
Joined: July 30th, 2004, 1:13 pm

New version released: 1.3

Post by Mozcerize »

A new version (1.3) has been released, which improves on version 1.2 by providing a user option to gather all the link menu items into a single submenu, thus reducing context menu real estate for those who want it. With the same intention, I have also gathered the 'View Image' and 'View Background Image' items into the submenus which this exension provides.

Finally, I have removed all support for Mozilla Application Suite, as I do not have the time to invest in testing it.

VERSION:
1.3

TARGET:
Firefox 0.9 - 1.0.

DOWNLOAD:
See later post below. Users should uninstall any version prior to 1.3 before installing version 1.3 or later.[/b] This is because the new version is intentionally treated as a brand new extension rather than an update (due to some compatibility issues with the update.mozilla.org site).

FUNCTIONALITY:
Adds items to the "right-click" context menu (CM) for links, images and background images in a webpage.

* Open in New Tab honours the user's tab opening default as specified in
Tools -> Options | Advanced | Tabbed Browsing | Select new tabs opened from links.
Only one of 'Open in Background Tab', 'Open in Foreground Tab' appears, according to the opposite of the user's default.

The context menu items are:

When right-clicking a Link
-----------------------------
The context menu contains either the following new items in addition to the standard "Open Link in New Tab" and "Open Link in New Window":
Open Link in Background Tab *
Open Link in Foreground Tab *
Open Link in Background Window
Open Link Here [ie in the current tab/window]
or, if the user prefers, all link menu items are removed and replaced with a new CM submenu called "Open Link in..." containing:
New Tab
Background Tab *
Foreground Tab *
New Window
Background Window
Here [ie in the current tab/window]

When right-clicking Images and Background Images
------------------------------------------------------------
The standard "View (Background) Image" menu items are removed and replaced with new CM subfolders called "View (Background) Image in..." which provide:
Background Tab *
Foreground Tab *
New Tab *
Background Window
New Window
Here [ie in the current tab/window]

NOTE: I have no plans to incorporate keyboard shortcuts into this extension. This would be quite complicated, as it would have to override lots of defaults set up elsewhere. Indeed, the main point of this extension is to provide the missing graphical UI which corresponds to the existing keyboard shortcuts which the application provides for opening links.
Last edited by Mozcerize on July 10th, 2009, 7:59 am, edited 8 times in total.
User avatar
dmccunney
Posts: 491
Joined: July 5th, 2003, 12:18 pm
Location: NY, NY

Post by dmccunney »

Mozcerize wrote:A new version (1.3) has been released, which improves on version 1.2 by providing a user option to gather all the link menu items into a single submenu, thus reducing context menu real estate for those who want it. With the same intention, I have also gathered the 'View Image' and 'View Background Image' items into the submenus which this exension provides.

Thank you!

Finally, I have removed all support for Mozilla Application Suite, as I do not have the time to invest in testing it.

:-(
I'm afraid I still use Seamonkey as well as FF. Can I offer you assistance in testing?
(BTW: 1.20 fails to install in Seamonkey 1.7.5 with a "Can't convert String to string" error at line 62 in the install script.)
______
Dennis
SeaMonkey 1.1.19/NS 7.2/SeaMonkey 2.33.1/SeaMonkey 2.34a,FF release version 32 bit, FF Developer Edition 64bit, FF Nightly 64 bit, Kompozer 0.8b3/Sunbird 0.8/Win2K Pro SP4/WinXP Pro SP3/Win7 Pro SP1/Win10 Pro, Ubuntu Linux 12.04/Ubuntu Linux 16.04/Puppy Linux 4.31
Mozcerize
Posts: 159
Joined: July 30th, 2004, 1:13 pm

Post by Mozcerize »

dmccunney wrote:I'm afraid I still use Seamonkey as well as FF. Can I offer you assistance in testing?


Yeah, I had it fail to install for me, too :-/. Which led me to give up on the seamonkey support. But if you're interested in testing it, I'll see if I can knock something up. It's just a matter of getting an install.js script made up; I originally borrowed someone else's, but I'll have another look around to find another one. I'll send you a private message when done, and maybe you could test it for me.

Cheers.
User avatar
dmccunney
Posts: 491
Joined: July 5th, 2003, 12:18 pm
Location: NY, NY

Post by dmccunney »

Mozcerize wrote:
dmccunney wrote:I'm afraid I still use Seamonkey as well as FF. Can I offer you assistance in testing?

Yeah, I had it fail to install for me, too :-/. Which led me to give up on the seamonkey support. But if you're interested in testing it, I'll see if I can knock something up. It's just a matter of getting an install.js script made up; I originally borrowed someone else's, but I'll have another look around to find another one. I'll send you a private message when done, and maybe you could test it for me.

Replied to your private note.

But to recapitulate publically, the new version installs here under Mozilla 1.7.5 without a hitch, and works as intended. The needed hack to user.js to enable the sub-menu is trivial to perform.

Thanks for doing this, and I'd go ahead and make it available publically.
______
Dennis
SeaMonkey 1.1.19/NS 7.2/SeaMonkey 2.33.1/SeaMonkey 2.34a,FF release version 32 bit, FF Developer Edition 64bit, FF Nightly 64 bit, Kompozer 0.8b3/Sunbird 0.8/Win2K Pro SP4/WinXP Pro SP3/Win7 Pro SP1/Win10 Pro, Ubuntu Linux 12.04/Ubuntu Linux 16.04/Puppy Linux 4.31
Mozcerize
Posts: 159
Joined: July 30th, 2004, 1:13 pm

Unofficial alternate version available for Mozilla

Post by Mozcerize »

An alternate version of 1.3 for Firefox is available for Mozilla (a.k.a. Seamonkey, the browser supplied with the Mozilla Application Suite). This is currently an unofficial version, in that I don't plan to test it myself on different Mozilla builds. However, it works for me (and, as posted above, Dennis; thanks for testing!) on Mozilla 1.7.5. I would guess that it will work on other versions too.

Its behaviour is exactly the same as version 1.3 for Firefox. However, Mozilla doesn't provide the same support as Firefox for Options Dialogs for extensions, and so the preferences which Fx users can set through a dialog will have to be set manually via the "user.js" file in the Profile folder. (Create this file as a new text file if it doesn't already exist.) Copy the following line into this file:

user_pref("openlink.useSubmenuForLinks", true);

This will make the link menu items to gather into a submenu. Set the word "true" to "false" if you later decide you don't want the submenu.

VERSION:
1.3.1. This is not an upgrade from 1.3 for Firefox. It is an alternate version for Mozilla (a.k.a. Seamonkey, the browser supplied with the Mozilla Application Suite).

STATUS:
Unofficial.

TARGET:
Mozilla 1.7.5.
I would guess that this also works for other versions of Mozilla, too.

DOWNLOAD:
Sorry, this version is no longer available.

FUNCTIONALITY:
As version 1.3 for Firefox. See my previous post.
Last edited by Mozcerize on July 10th, 2009, 8:00 am, edited 2 times in total.
User avatar
gssq
Posts: 504
Joined: December 7th, 2002, 10:17 am
Location: Singapore
Contact:

Post by gssq »

Suggestion: Allow customisation of the context menu. It's rather cluttered now. I'd like to trim mine a bit, and others probably would too :)
Mozcerize
Posts: 159
Joined: July 30th, 2004, 1:13 pm

Post by Mozcerize »

gssq wrote:Suggestion: Allow customisation of the context menu. It's rather cluttered now. I'd like to trim mine a bit, and others probably would too :)


er, see above

:P

Also, don't forget about the Menu Editor extension.
Last edited by Mozcerize on April 25th, 2011, 1:40 pm, edited 2 times in total.
User avatar
Glacier2112
Posts: 4
Joined: February 16th, 2005, 10:59 am
Location: Montana

Adapt Open link in... for Thunderbird?

Post by Glacier2112 »

I use this extension in Firefox all the time (works great). I am wondering if this could be adapted to work with Thunderbird. I would like to be able to right-click on a link in an email and have an option to load the the link in a new tab in Firefox in the backgrond without leaving Thunderbird. I am not interested in opening multiple links at once. I would love if I could keep reading my emails and click an occasional email link, then when I am done or ready switch to Firefox and have the clicked links available in separate tabs for review. I've always found it annoying switching back and forth between an email program and browser every time I click a link. If I could choose to load a link in the background or immediatly would be a welcome choice. Is there any chance this could be done.

Thanks Glacier2112
Mozcerize
Posts: 159
Joined: July 30th, 2004, 1:13 pm

Post by Mozcerize »

Hi Glacier2112! Glad you find this extension useful. Unfortunately, I don't use Thunderbird myself, and I don't have time to do any new work on this extension at the moment. What you suggest would certainly be nice though, and I wish I could make it happen in my current email client!

Sorry I can't be of more help right now.
User avatar
Glacier2112
Posts: 4
Joined: February 16th, 2005, 10:59 am
Location: Montana

Post by Glacier2112 »

Oh well, never hurts to ask. Thanks for the quick reply.... :)

Glacier
gmbwizard
Posts: 11
Joined: February 9th, 2005, 5:02 pm

Problems install ver. 1.3, conflict with Menu Editor ext.?

Post by gmbwizard »

I have been using "Open Link with..." for several months and found it to be a very helpful extension. Despite twice weekly updates of Firefox, I was running version 1.1 until yesterday when I updated to version 1.3 by way of Mozilla Update. Unfortunately, I didn’t read this Mozillaline forum until after I installed the new version so I didn’t uninstall the earlier version first. I subsequently uninstalled the earlier version but I still can’t get version 1.3 to work. Complicating the issue is that I am running the “Menu Editor” extension to be able to reorganize my entire context menu. The ability to group link functions in version 1.3 may be conflicting with the more global capabilities of “Menu Editor”. However, even if I disable the Menu Editor extension, I can’t get the [Open Link in] context menu entry for version 1.3 to appear.

I would appreciate any thoughts you might have on this problem and I think it would be a good idea if you and the author of Menu Edit compared functionality and code. Did I make an unrecoverable error by not uninstalling version 1.1 before installing version 1.3? What can be done to minimize negative interaction between "Open Link with..." and Menu Editor? You can see my comments in the Mozillaline “Menu Editor” Forum here:

<a href="http://forums.mozillazine.org/viewtopic.php?t=211920&postdays=0&postorder
=asc&postsperpage=15&start=195&sid=e474a61d38d52ac187ab916a06ed8a33"
>My Menu Editor Post</a>
Last edited by gmbwizard on April 27th, 2005, 6:47 am, edited 2 times in total.
Locked