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

Talk about add-ons and extension development.
Locked
Mozcerize
Posts: 159
Joined: July 30th, 2004, 1:13 pm

Post by Mozcerize »

Hi posicat,

Sorry, I don't plan on implementing any keyboard or mouse keystrokes with this extension. "Open link in..." simply provides the missing GUI for the existing keystrokes, together with a couple of bonus features (such as opening in windows and choosing where to view images) which only required minor modifications to the main code. I seem to remember hearing about another extension out there which allows you to change the keyboard and mouse keystoke mapping...

Best wishes,
Mozcerize
Mozcerize
Posts: 159
Joined: July 30th, 2004, 1:13 pm

New version - 1.4.1 for Fx 1.5--2.0

Post by Mozcerize »

ZM (writing on addons.mozilla.org/firefox/379) wrote:View image in "New Windows" no workie in 2.0
Hi,
Thanks for a very excellent add on.
I just installed ff 2.0 from scratch and the first add on I installed is this.
Everything seems to work except for the Open Image in New Window. Seems to work in a background window but not a new windows.
Maybe it's a quick fix for ya, I hope. I use this feature all the time.


Thanks for reporting this issue. (I'm embarrassed not to have spotted it sooner!)

Here's version 1.4.1 for Firefox 1.5 and Firefox 2.0.

No functionality changes since 1.4; just a bugfix release.

VERSION:
1.4.1

TARGET:
Firefox 1.5--2.0

DOWNLOAD:
See later post below

FUNCTIONALITY:
See later post below
Last edited by Mozcerize on July 10th, 2009, 8:14 am, edited 4 times in total.
cedear
Posts: 2
Joined: June 18th, 2008, 8:24 am

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

Post by cedear »

Can we get a version marked for 3.0 final? Only marked for 3.0 pre at the moment, can't install :(
Mozcerize
Posts: 159
Joined: July 30th, 2004, 1:13 pm

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

Post by Mozcerize »

cedear wrote:Can we get a version marked for 3.0 final?

Sure! It's done; thanks for reminding me.
abuli
Posts: 7
Joined: June 19th, 2008, 10:38 am

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

Post by abuli »

don t work on any of my pc`s. when i open in background window i cant go to it. and if i try to klick the main window it just blink. but i love and need this. hope for a fix. and yes i have a brain even if my English sux
Mozcerize
Posts: 159
Joined: July 30th, 2004, 1:13 pm

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

Post by Mozcerize »

abuli wrote:don t work on any of my pc`s. when i open in background window i cant go to it. and if i try to klick the main window it just blink.


Sorry to hear you're having problems; I'll look into it as soon as I can.
nightshifter
Posts: 7
Joined: June 18th, 2003, 4:49 pm

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

Post by nightshifter »

I am experiencing the same problem on three computers, all upgrades from FF2. When I right-click open a link in background window it opens, but I am unable to view the window. When I click on it in the taskbar, it just flashes, but doesn't open.
abhinavk
Posts: 40
Joined: July 7th, 2008, 1:19 pm
Location: India
Contact:

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

Post by abhinavk »

I have corrected the problem of Background Windows.
Here is the new modified function. I have added the setTimeOut function. But I am unsure about the timeout value. Keeping it 0 or 1 do not works. You can use it as your will.

function openlinkOpenNewBackgroundWindowWith(href, aDocument) {
if (aDocument) {
urlSecurityCheck(href, aDocument.nodePrincipal);
}

// if and only if the current window is a browser window and it has a document with a character
// set, then extract the current charset menu setting from the current document and use it to
// initialize the new browser window...
var charsetArg = null;
var wintype = document.documentElement.getAttribute("windowtype");
if (wintype == "navigator:browser") {
charsetArg = "charset=" + window.content.document.characterSet;
}

var referrerURI = aDocument ? aDocument.documentURIObject : null;
gCurrWindow = window;
var newWindow = window.openDialog(getBrowserURL(), "_blank", "chrome,all,dialog=no", href, charsetArg, referrerURI, null);
newWindow.addEventListener('focus', openlinkDoWindowFocus, false);

setTimeout( function () {
newWindow.removeEventListener('focus', openlinkDoWindowFocus, false);
}, 1000 );
}
abhinavk
Posts: 40
Joined: July 7th, 2008, 1:19 pm
Location: India
Contact:

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

Post by abhinavk »

I have tested my code. Itz working properly. But there is a problem (minor)

Although the opened background windows is not in focus, it displays itself in focus in taskbar.

So to open the background windows u have to first click it to minimize then click again to open it in focus.

You can see it yourself.
abhinavk
Posts: 40
Joined: July 7th, 2008, 1:19 pm
Location: India
Contact:

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

Post by abhinavk »

abhkum wrote:I have tested my code. Itz working properly. But there is a problem (minor)

Although the opened background windows is not in focus, it displays itself in focus in taskbar.

So to open the background windows u have to first click it to minimize then click again to open it in focus.

You can see it yourself.
Suggestion: You should remove the Background Window option because in this era of tabbed browsing. No body opens new windows ever then why there is a option of Background Windows.

Suggested Menu Options:

For Hyperlinks-
Open link in New Window
Open link in New Tab
Open link in Background Tab
Open link in Current Tab

For Images-
View Image>
Here
New Tab
Background Tab
New Windows

For Background Images-
>
Here
New Tab
Background Tab
New Window
nightshifter
Posts: 7
Joined: June 18th, 2003, 4:49 pm

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

Post by nightshifter »

the option of new background window is why I want this addon. I still don't dig tabs like others do and find the addon valuable to load several pages in the background to flip through when I'm done with the main page, or the main window is loading another page from that site (like reddit or digg).
Mozcerize
Posts: 159
Joined: July 30th, 2004, 1:13 pm

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

Post by Mozcerize »

Thanks to SUN Chun-Yen (on the addons.mozilla.org review page) and abhkum for pointing out that I had failed to remove an event listener on the new background window which was causing it to be unfocusable; and sorry to those of you who have been missing this feature!

I have created an update which fixes this bug (and fixes the problem that abhkum mentioned in which removing the event listener then causes the wrong taskbar button to be active on the Windows Taskbar). Details of the update can be found in my next post below.

abhkum wrote:No body opens new windows ever then why there is a option of Background Windows.


I do; that's why I made the option available :-)
Mozcerize
Posts: 159
Joined: July 30th, 2004, 1:13 pm

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

Post by Mozcerize »

Here's version 1.5.1 for Firefox 3.

No functionality changes since 1.5; just a bugfix release.

VERSION:
1.5.1

TARGET:
Firefox 3

DOWNLOAD:
See later post below

FUNCTIONALITY:
See later post below
Last edited by Mozcerize on July 10th, 2009, 8:15 am, edited 3 times in total.
User avatar
w8sdz
Posts: 8
Joined: January 24th, 2005, 12:40 am
Location: Port Orange, FL
Contact:

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

Post by w8sdz »

When will v 1.5.1 be accessible? When I try to install it an error message displays saying file not found.
73 de w8sdz - Keith - sip:w8sdz@getonsip.com
Locked