add: var opener = window.arguments[0].opener; if (opener) {  window.sizeToContent();   var sx = Math.max((opener.outerWidth  - window.outerWidth ) / 2, 0); var sy = Math.max((opener.outerHeight - window.outerHeight) / 2, 0); window.moveTo(opener.screenX + sx, opener.screenY + sy); }  
context: function onLoad(){    function ondblclick(event) { channelTreeView.onRouteDblClick(event); };    function onkeypress(event) { channelTreeView.onRouteKeyPress(event); };    function onfocus(event)    { channelTreeView.onRouteFocus(event); };    function onblur(event)     { channelTreeView.onRouteBlur(event); };    function doJoin()    {        if (joinChannel())            window.close();    };    client = window.arguments[0].client;    network = window.arguments[0].network;    network.joinDialog = window;    window.dd = client.mainWindow.dd;    window.toUnicode = client.mainWindow.toUnicode;    window.getMsg = client.mainWindow.getMsg;    window.MSG_CHANNEL_OPENED = client.mainWindow.MSG_CHANNEL_OPENED;    window.MSG_FMT_JSEXCEPTION = client.mainWindow.MSG_FMT_JSEXCEPTION;    window.MT_INFO = client.mainWindow.MT_INFO;    // Import "MSG_CD_*"...    for (var m in client.mainWindow)    {        if (m.substr(0, 7) == "MSG_CD_")            window[m] = client.mainWindow[m];    }    var tree = document.getElementById("channelList");    channelTreeView = new XULTreeView(channelTreeShare);    channelTreeView.onRowCommand = doJoin;    channelTreeView.cycleHeader = changeSort;    tree.treeBoxObject.view = channelTreeView;    // Sort by user count, decending.    changeSort("chanColUsers");    tree.addEventListener("dblclick", ondblclick, false);    tree.addEventListener("keypress", onkeypress, false);    tree.addEventListener("focus", onfocus, false);    tree.addEventListener("blur", onblur, false);    createChannelItem = new ChannelEntry("", "", MSG_CD_CREATE);    createChannelItem.first = true;    channelTreeView.childData.appendChild(createChannelItem);    document.title = getMsg(MSG_CD_TITLE, [network.unicodeName,                                           network.getURL()]);    setInterval(doCurrentStatus, STATE_DELAY);    setState(STATE_LOAD);}
meta: 1622	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/1622/85dd4b608c7541c01c2108dccf2894ac7e19d089/channels.js/buggy/xul/content/channels.js