<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -327,7 +327,7 @@ function withContent(account, address, url, code) {
     if(browser) {
         code(browser.contentWindow);        
     } else {
-        var tabBrowser = top.getBrowser();
+        var tabBrowser = getBrowser();
         if(tabBrowser.currentURI.spec != 'about:blank')
             tabBrowser.selectedTab = tabBrowser.addTab();
 
@@ -451,11 +451,11 @@ function scrollingOnlyIfAtBottom(window, action) {
 function findBrowser(account, address, url) {
     var index = findBrowserIndex(account, address, url);
     if(index != -1)
-        return window.top.getBrowser().getBrowserAtIndex(index);
+        return getBrowser().getBrowserAtIndex(index);
 }
 
 function findBrowserIndex(account, address, url) {
-    var tabBrowser = window.top.getBrowser();
+    var tabBrowser = getBrowser();
     var browser;
     var numTabs = tabBrowser.mPanelContainer.childNodes.length;
     var index = 0;
@@ -492,7 +492,7 @@ function growTextBox(textBox) {
 
 function getBrowser() {
     // XXX Temporary: won't work well with stand-alone window.
-    return top.gBrowser;
+    return top.getBrowser();
 }
 
 function withContactInfoOf(account, address, action) {
@@ -737,8 +737,8 @@ function displayAuxiliaryAndConversations() {
 }
 
 function focusContent(account, address, url) {
-    top.getBrowser().selectedTab =
-        top.getBrowser().tabContainer.childNodes[
+    getBrowser().selectedTab =
+        getBrowser().tabContainer.childNodes[
             findBrowserIndex(account, address, url)];
 }
 
@@ -1289,7 +1289,7 @@ function receivedMessageWithURL(message) {
     if(_('conversations', {address: XMPP.JID(message.stanza.@from).address, role: 'follow'})
        .getAttribute('checked') == 'true') {
         var url = message.stanza.body.toString().match(urlRegexp)[0];
-        window.top.getBrowser().addTab(url);   
+        getBrowser().addTab(url);
     }
 }
 </diff>
      <filename>chrome/content/sameplace.js</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>c011fb10a2149af0bf825c4fe41d9fe2d2ee9245</id>
    </parent>
  </parents>
  <author>
    <name>Massimiliano Mirra</name>
    <email>bard@hyperstruct.net</email>
  </author>
  <url>http://github.com/bard/sameplace/commit/839840cbe7e445e60804815cf48c6db45025961d</url>
  <id>839840cbe7e445e60804815cf48c6db45025961d</id>
  <committed-date>2006-09-11T07:08:58-07:00</committed-date>
  <authored-date>2006-09-11T07:08:58-07:00</authored-date>
  <message>Always using local getBrowser() to resolve the associated tabbed browser.

darcs-hash:20060911140858-8cc29-46a8dfdc45a7e3fc041ca0d06b819cc51c9ddc45.gz</message>
  <tree>97d879cf8c93ac942980b2d1d0d543f3ab56e096</tree>
  <committer>
    <name>Massimiliano Mirra</name>
    <email>bard@hyperstruct.net</email>
  </committer>
</commit>
