var httpRequestObserver =
{
observe: function(subject, topic, data)
{
if (topic == "http-on-modify-request") {
var httpChannel = subject.QueryInterface(Components.interfaces.nsIHttpChannel);
var WebAddress = httpChannel.originalURI.spec;
},
get observerService() {
return Components.classes["@mozilla.org/observer-service;1"]
.getService(Components.interfaces.nsIObserverService);
},
register: function()
{
this.observerService.addObserver(this, "http-on-modify-request", false);
},
QueryInterface: function(aIID){
if (aIID.equals(Ci.nsIObserver) || aIID.equals(Ci.nsISupports))
{
return this;
}
throw Components.results.NS_NOINTERFACE;
},
unregister: function()
{
this.observerService.removeObserver(this, "http-on-modify-request");
}
};
No comments:
Post a Comment