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

Commit

Permalink
Bring window to focus on launch if already open.
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian King authored and eletuchy committed May 13, 2009
1 parent 8865c75 commit e43b847
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions chrome/content/toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,17 @@ var facebook = {
}
},
photoupload: function() {
window.openDialog('chrome://facebook/content/photoupload/photoupload.xul',
'facebook:photoupload', 'chrome,titlebar,toolbar,dialog=no,resizable');
var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
.getService(Components.interfaces.nsIWindowMediator);
var win = wm.getMostRecentWindow("facebook:photoupload");
if (win) {
win.focus();
}
else
{
window.openDialog('chrome://facebook/content/photoupload/photoupload.xul',
'facebook:photoupload', 'chrome,titlebar,toolbar,dialog=no,resizable');
}
},
clearFriends: function(sessionEnded) {
var list = document.getElementById('PopupFacebookFriendsList');
Expand Down

0 comments on commit e43b847

Please sign in to comment.