Redirect URL

2007-01-11 Thread Andrei Korostelev
I need to have a Firefox extension which redirects certain URLs to another location. AFAIK using OnStartURIOpen() is not appropriate since it only allows or disallows the url load and cannot handle redirection. Any ideas? Firefox 2.0. ___ dev-embedding

Re: Get firefox default profile directory from non-extension

2006-12-20 Thread Andrei Korostelev
On Dec 20, 4:06 pm, "Andrei Korostelev" <[EMAIL PROTECTED]> wrote: > Hi, > > the following code, when called from Firefox extension, retrieves > firefox profile directory location. > nsresult rv = NS_InitXPCOM2(nsnull, nsnull, nsnull); > if (NS_FAILED(r

Get firefox default profile directory from non-extension

2006-12-20 Thread Andrei Korostelev
Hi, the following code, when called from Firefox extension, retrieves firefox profile directory location. nsresult rv = NS_InitXPCOM2(nsnull, nsnull, nsnull); if (NS_FAILED(rv)) return; nsCOMPtr fileLocator = do_GetService("@mozilla.org/file/directory_service;1", &rv); if (NS_FAILED(rv)) return; i

Re: Intercepting URL in Firefox extension

2006-12-19 Thread Andrei Korostelev
On Dec 19, 3:58 pm, Boris Zbarsky <[EMAIL PROTECTED]> wrote: > Andrei Korostelev wrote: > > // I set up the content listener: attempt 1 > > var wnd = > > window.QueryInterface(Components.interfaces.nsIInterfaceRequestor) > > > .getInterface(Co

Intercepting URL in Firefox extension

2006-12-19 Thread Andrei Korostelev
I need a Firefox extension which performs some actions (redirect and others) before the URL is open. Simply using Mozilla's window.addEventListener("load", Handler, ..) does not work since I have to catch the URL *before* the page is loaded. Not too exotic task on my thought. I also read a couple o