|
|
@ -22,18 +22,24 @@ function log(aMsg) { |
|
|
|
Services.console.logStringMessage(msg); |
|
|
|
Services.console.logStringMessage(msg); |
|
|
|
dump(msg + '\n'); |
|
|
|
dump(msg + '\n'); |
|
|
|
} |
|
|
|
} |
|
|
|
function getWindow(top, id) top.QueryInterface(Ci.nsIInterfaceRequestor) |
|
|
|
function getWindow(top, id) { |
|
|
|
|
|
|
|
return top.QueryInterface(Ci.nsIInterfaceRequestor) |
|
|
|
.getInterface(Ci.nsIDOMWindowUtils) |
|
|
|
.getInterface(Ci.nsIDOMWindowUtils) |
|
|
|
.getOuterWindowWithId(id); |
|
|
|
.getOuterWindowWithId(id); |
|
|
|
function windowID(win) win.QueryInterface(Ci.nsIInterfaceRequestor) |
|
|
|
} |
|
|
|
|
|
|
|
function windowID(win) { |
|
|
|
|
|
|
|
return win.QueryInterface(Ci.nsIInterfaceRequestor) |
|
|
|
.getInterface(Ci.nsIDOMWindowUtils) |
|
|
|
.getInterface(Ci.nsIDOMWindowUtils) |
|
|
|
.outerWindowID; |
|
|
|
.outerWindowID; |
|
|
|
function topWindow(win) win.QueryInterface(Ci.nsIInterfaceRequestor) |
|
|
|
} |
|
|
|
|
|
|
|
function topWindow(win) { |
|
|
|
|
|
|
|
return win.QueryInterface(Ci.nsIInterfaceRequestor) |
|
|
|
.getInterface(Ci.nsIWebNavigation) |
|
|
|
.getInterface(Ci.nsIWebNavigation) |
|
|
|
.QueryInterface(Ci.nsIDocShellTreeItem) |
|
|
|
.QueryInterface(Ci.nsIDocShellTreeItem) |
|
|
|
.rootTreeItem |
|
|
|
.rootTreeItem |
|
|
|
.QueryInterface(Ci.nsIInterfaceRequestor) |
|
|
|
.QueryInterface(Ci.nsIInterfaceRequestor) |
|
|
|
.getInterface(Ci.nsIDOMWindow); |
|
|
|
.getInterface(Ci.nsIDOMWindow); |
|
|
|
|
|
|
|
} |
|
|
|
let application = Cc['@mozilla.org/fuel/application;1'] |
|
|
|
let application = Cc['@mozilla.org/fuel/application;1'] |
|
|
|
.getService(Ci.fuelIApplication); |
|
|
|
.getService(Ci.fuelIApplication); |
|
|
|
let privateBrowsing = Cc['@mozilla.org/privatebrowsing;1'] |
|
|
|
let privateBrowsing = Cc['@mozilla.org/privatebrowsing;1'] |
|
|
|