Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

Commit

Permalink
Some fixes for Firefox 3.6. There are a good chunk of users still on …
Browse files Browse the repository at this point in the history
…it, so we should try and support them for one more release of the toolbar
  • Loading branch information
brianking committed Nov 25, 2011
1 parent 1b9386e commit acfa8f6
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 13 deletions.
4 changes: 2 additions & 2 deletions chrome/content/lib.js
Expand Up @@ -619,7 +619,7 @@ var fbLib = {
_maxSizePopupFacebookFriendsList: function()
{
var list = top.document.getElementById('PopupFacebookFriendsList');
var style = window.getComputedStyle(list);
var style = window.getComputedStyle(list, null);

var anonChildren = list.ownerDocument.getAnonymousNodes(list);
var realh;
Expand All @@ -635,7 +635,7 @@ var fbLib = {
{
if (anonChildren2[j].nodeType == 1)
{
var style2 = window.getComputedStyle(anonChildren2[j]);
var style2 = window.getComputedStyle(anonChildren2[j], null);
realh = style2.getPropertyValue("height");
}
}
Expand Down
4 changes: 1 addition & 3 deletions chrome/content/toolbar.js
Expand Up @@ -336,11 +336,9 @@ var facebook = {
try {
var url = gBrowser.currentURI.spec;

if (gBrowser.currentURI.ref != "")
if (gBrowser.currentURI.ref && gBrowser.currentURI.ref != "")
url = url.substring(0, url.indexOf('#'));

fbLib.debug("updateLikeCount: have url = '" + url + "'");

facebook.clearLikeCount();

var prefSvc = Cc['@mozilla.org/preferences-service;1'].getService(Ci.nsIPrefBranch);
Expand Down
10 changes: 6 additions & 4 deletions components/facebook.js
Expand Up @@ -1401,11 +1401,12 @@ facebookService.prototype = {
var left = win.screen.width - 215;
var top = win.screen.height - 105*this._lastAlertPosition;
this._lastAlertPosition++;
panel.openPopupAtScreen(left, top);

win.setTimeout(function() { panel.hidePopup(); }, 10000);
panel.addEventListener('popuphiding', function(){NotifierUnload(panel)}, false);
panel.addEventListener('click', function(){NotifierClick(panel)}, false);
panel.openPopupAtScreen(left, top, false);

win.setTimeout(function() { panel.hidePopup(); }, 10000);
}
catch (e) {
debug('Notifier Exception : '+e);
Expand All @@ -1420,8 +1421,9 @@ facebookService.prototype = {
_createPopup : function(doc, lastPos, picVal, labelVal)
{
var panel = doc.createElement("panel");
panel.setAttribute("level", "floating");
//panel.setAttribute("level", "floating");
panel.setAttribute("noautohide", "true");
//panel.setAttribute("noautofocus", "true");
panel.setAttribute("width", "210");
panel.setAttribute("height", "100");
panel.setAttribute("lposition", lastPos);
Expand Down Expand Up @@ -1451,7 +1453,7 @@ facebookService.prototype = {
vbox.appendChild(label);
vbox.appendChild(hbox);
panel.appendChild(vbox);
doc.documentElement.appendChild(panel);
doc.getElementById("main-window").appendChild(panel);
return panel;
}
};
Expand Down
7 changes: 4 additions & 3 deletions components/fbRemoteAutoComplete.js
Expand Up @@ -289,6 +289,7 @@ FacebookRemoteAutoCompleteSearch.prototype = {
};

// The following line is what XPCOM uses to create components
const NSGetFactory =
XPCOMUtils.generateNSGetFactory([ FacebookRemoteAutoCompleteSearch ]);

if (XPCOMUtils.generateNSGetFactory)
const NSGetFactory = XPCOMUtils.generateNSGetFactory( [FacebookRemoteAutoCompleteSearch] );
else
const NSGetModule = XPCOMUtils.generateNSGetModule( [FacebookRemoteAutoCompleteSearch] );
2 changes: 1 addition & 1 deletion install.rdf
Expand Up @@ -29,7 +29,7 @@
<em:targetApplication>
<Description>
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id>
<em:minVersion>4.0</em:minVersion>
<em:minVersion>3.6</em:minVersion>
<em:maxVersion>11.0a1</em:maxVersion>
</Description>
</em:targetApplication>
Expand Down

0 comments on commit acfa8f6

Please sign in to comment.