[Project_owners] On Page Load

joe ertaba belaviyo at gmail.com
Thu Jul 12 06:06:47 PDT 2007


i am using something like:

//***************************************
var a =
{
  QueryInterface : function(aIID)
  {
    if (aIID.equals(Components.interfaces.nsIWebProgressListener) ||
        aIID.equals(Components.interfaces.nsISupportsWeakReference) ||
        aIID.equals(Components.interfaces.nsIObserver) ||
        aIID.equals(Components.interfaces.nsIHttpNotify) ||
        aIID.equals(Components.interfaces.nsISupports))
      return this;
    throw Components.results.NS_NOINTERFACE;
  },

  observe: function(aSubject, aTopic, aData)
  {
    if (aTopic == "http-on-modify-request")
    {
      aSubject.QueryInterface(Components.interfaces.nsIHttpChannel);
      var uri = aSubject.URI.asciiSpec;
      dump("*** " + uri + " ***\n");
    }
  }
}


function regListener()
{
 observerService.addObserver(a, "http-on-modify-request", false);
}
function unregListener()
{
 observerService.removeObserver(a, "http-on-modify-request");
}



my problem is how to change uri of special sites?
realy i dont need to know what tab its blong to, only i what to change uri


On 7/12/07, Neil <neil at parkwaycc.co.uk> wrote:
>
> joe ertaba wrote:
>
> > is there any code that fire before any communication with server. i
> > want to filter before url send to server.
>
> I think a URI content listener might do what you want, but I'm not sure
> how you would use it.
> _______________________________________________
> Project_owners mailing list
> Project_owners at mozdev.org
> http://mozdev.org/mailman/listinfo/project_owners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mozdev.org/pipermail/project_owners/attachments/20070712/56ce9a5a/attachment.html 


More information about the Project_owners mailing list