Sie sind auf Seite 1von 7

/*1350278634,173213215*/ if (self.CavalryLogger) { CavalryLogger.start_js(["h7fiM"]); } __d("FbdEventLog",["URI","AsyncSignal"],function(a,b,c,d,e,f){var g=b('URI'),h=b ('AsyncSignal'),i={log:function(j,k,l,m){if(!j)return;var n=g('/desktop/eventlog .php'),o=new h(n.toString(),{event:j,category:k||'unknown',payload:l||''});o.set Handler(m).send();}};e.exports=i;}); __d("ModalMask",["DOM","UserAgent","Vector"],function(a,b,c,d,e,f){var g=b('DOM' ),h=b('UserAgent'),i=b('Vector'),j={_modalMask:null,_depth:0,show:function(){if( !this._modalMask){this._modalMask=g.create('div',{id:'modalMaskOverlay'});g.appe ndContent(document.body,this._modalMask);}this._depth++;if(h.ie()<7)this.

_modalM ask.height=i.getDocumentDimensions().y+'px';},hide:function(){this._depth--;if(! this._depth&&this._modalMask){g.remove(this._modalMask);this._modalMask=null;}}} ;e.exports=j;}); __d("DownloadDialog",["event-extensions","Arbiter","Class","CSS","DataStore","Mo dalMask","Overlay","Parent","Style","copyProperties","emptyFunction"],function(a ,b,c,d,e,f){b('event-extensions');var g=b('Arbiter'),h=b('Class'),i=b('CSS'),j=b ('DataStore'),k=b('ModalMask'),l=b('Overlay'),m=b('Parent'),n=b('Style'),o=b('co pyProperties'),p=b('emptyFunction');function q(){this.parent.construct(this);ret urn this;}h.extend(q,l);o(q,{POSITIONS:{BOTTOM_LEFT:'bottom_left',TOP_LEFT:'top_ left',IE9_BOTTOM:'ie9_bottom'},activeDialogs:{},dismissAll:function(){for(var r in this.POSITIONS)this.hideDialog(this.POSITIONS[r]);},hideDialog:function(r){va r s=this.activeDialogs[r];s&&s.hide();this.activeDialogs[r]=null;}});o(q.prototy pe,{_cancelHandler:p,_closeHandler:p,_width:null,position:q.POSITIONS.BOTTOM_LEF T,init:function(r,s){this.parent.init(r);this.position=s;var t=(j.get(this._root ,'modal')==='true');q.hideDialog(s);q.activeDialogs[s]=this;Event.listen(this._r oot,'click',function(event){if(m.byClass(event.getTarget(),'closeButton'))if(thi s._cancelHandler()!==false)q.hideDialog(this.position);}.bind(this));this.subscr ibe('show',function(){if(t)k.show();g.inform('layer_shown',{type:'DownloadDialog '});}.bind(this));this.subscribe('hide',function(){if(t)k.hide();g.inform('layer _hidden',{type:'DownloadDialog'});this._closeHandler();}.bind(this));},setWidth: function(r){this._width=Math.floor(r);return this;},updatePosition:function(){if (this._width)n.set(this._overlay,'width',this._width+'px');return true;},setCanc elHandler:function(r){this._cancelHandler=r||p;return this;},setCloseHandler:fun ction(r){this._closeHandler=r||p;return this;}});e.exports=q;}); __d("FbdConversionTracking",["AsyncRequest","emptyFunction"],function(a,b,c,d,e, f){var g=b('AsyncRequest'),h=b('emptyFunction'),i={logClick:function(j,k){if(!k) k='desktop';new g().setURI('/ajax/desktop/log_clicks.php').setData({click_source :j,promo:k}).setAllowCrossPageTransition(true).setErrorHandler(h).send();},logCo nversion:function(j,k){if(!k)k='desktop';new g().setURI('/ajax/desktop/log_conve rsions.php').setData({conversion_action:j,promo:k}).setAllowCrossPageTransition( true).setErrorHandler(h).send();}};e.exports=i;}); __d("MegaphoneHelper",["Animation","AsyncRequest","Dialog","ge"],function(a,b,c, d,e,f){var g=b('Animation'),h=b('AsyncRequest'),i=b('Dialog'),j=b('ge'),k={hideS tory:function(l,m,n,o,p){var q={mp_id:l,location:m,context:o};new h().setURI('/a jax/megaphone/megaphone_hide.php').setMethod('POST').setData(q).setHandler(funct ion(s){p&&p(s);}).send();var r=j(n);if(r)g(r).to('height',0).duration(500).hide( ).go();},createModalStory:function(l,m,n,o){var p;if(!l.buttons||!l.buttons.leng th){l.buttons=i.CLOSE;p=this.hideStory.bind(this,m,n,o,null);}var q=new i(l);if( p)q.setHandler(p);q.show();},buttonOnClick:function(l,m,n,o,p,q){var r=function( ){if(p){new h().setURI(o).send();}else document.location.href=o;};if(q){this.hid eStory(l,m,'',n,function(){r();});}else r();}};e.exports=k;}); __d("FbdInstall",["$","AsyncRequest","CSS","DOM","DownloadDialog","FbdConversion Tracking","FbdEventLog","FBDesktopDetect","FBDesktopPlugin","MegaphoneHelper"],f unction(a,b,c,d,e,f){var g=b('$'),h=b('AsyncRequest'),i=b('CSS'),j=b('DOM'),k=b( 'DownloadDialog'),l=b('FbdConversionTracking'),m=b('FbdEventLog'),n=b('FBDesktop Detect'),o=b('FBDesktopPlugin'),p=b('MegaphoneHelper'),q=1000,r=300*q,s={cancelS etup:function(){var t=JSON.stringify({ref:this.ref});m.log('download_canceled',' setup',t);l.logConversion('download_canceled');},hideMegaphone:function(){if(thi

s.megaphoneId&&this.megaphoneLoc)p.hideStory(this.megaphoneId,this.megaphoneLoc, this.elementId,'',null);},init:function(t,u){this.downloadUrl=t;this.ref=u||'unk nown';},initInstallWait:function(t,u,v){this.megaphoneId=t;this.megaphoneLoc=u;t his.elementId=v;this._waitForInstall(r);},promptDownload:function(t){t=t||this.d ownloadUrl;if(t){var u=JSON.stringify({ref:this.ref});m.log('download_prompted', 'setup',u);l.logConversion('download_prompted');var v=j.create('iframe',{src:t,c lassName:'hidden_elem'});j.appendContent(document.body,v);}},_responseHandler:fu nction(t){if(t.payload){this._authToken=t.payload.access_token;this._userId=t.pa yload.id;}if(this._authToken&&this._userId){this._waitForRunningStart=new Date() .getTime();setTimeout(this._waitForRunning.bind(this),q);}},setupPlugin:function (){new h('/ajax/desktop/download').send();this.promptDownload();},updateSidebarL inkVisibility:function(){if(!n.isPluginInstalled()){i.show(g('sidebar-messengerinstall-link'));i.show(g('sidebar-messenger-install-separator'));}},_waitForInst all:function(t){var u=JSON.stringify({ref:this.ref});if(n.isPluginInstalled()){m .log('install_success','setup',u);l.logConversion('install_success');o.recheck() ;new h("/desktop/fbdesktop2/transfer.php").setMethod("POST").setHandler(this._re sponseHandler.bind(this)).send();k.dismissAll();this.hideMegaphone();return;}if( t<=0){m.log('install_timeout','setup',u);l.logConversion('install_timeout');k.di smissAll();}else setTimeout(this._waitForInstall.bind(this,t-q),q);},_waitForRun ning:function(){var t=new Date().getTime()-this._waitForRunningStart;if(o.isAppR unning()){o.transferAuthToken(this._authToken,this._userId);}else if(t<r)setTime out(this._waitForRunning.bind(this),q);}};e.exports=s;}); __d("legacy:fbdesktop2-install-js",["FbdInstall"],function(a,b,c,d){a.FbdInstall =b('FbdInstall');},3); __d("legacy:fbdesktop-conversion-tracking",["FbdConversionTracking"],function(a, b,c,d){a.FbdConversionTracking=b('FbdConversionTracking');},3); __d("VersionCompare",[],function(a,b,c,d,e,f){function g(h,i){if(h===null||h===u ndefined||typeof h!='string')return -1;if(i===null||i===undefined||typeof i!='st ring')return 1;if(h===i)return 0;var j=h.split('.'),k=i.split('.');while(j.lengt h>0||k.length>0){var l=j.length>0?parseInt(j.shift(),10):0,m=k.length>0?parseInt (k.shift(),10):0;if(l>m)return 1;if(l<m)return -1;}return 0;}e.exports={compare: g};}); __d("DesktopRepromoLoader",["AsyncRequest","BlackbirdUpsell","FBDesktopDetect"," FBDesktopPlugin","Run","VersionCompare","emptyFunction"],function(a,b,c,d,e,f){v ar g=b('AsyncRequest'),h=b('BlackbirdUpsell'),i=b('FBDesktopDetect'),j=b('FBDesk topPlugin'),k=b('Run'),l=b('VersionCompare'),m=b('emptyFunction'),n=null;functio n o(p){if(p&&p.payload&&p.payload.should_show_promo)new g().setURI('/ajax/deskto p/repromo_dialog/').setData({relative_to:'#'+n.id}).setAllowCrossPageTransition( true).setErrorHandler(m).send();}e.exports={init:function(p){n=p;k.onAfterLoad(f unction(){var q=j.isAppRunning();setTimeout(function(){if(i.isPluginInstalled()& &!h.isVisible()&&l.compare(j.getVersion(),"1.0.0.12")>=0&&(!q||j.getUserID()===' 0'))new g().setURI('/ajax/desktop/repromo/').setData({action:'get_info'}).setAll owCrossPageTransition(true).setErrorHandler(m).setHandler(o).send();},1000);});} };}); __d("SidebarTicker",["Arbiter","AsyncRequest","ChatSidebar","CSS","DOM","Run","S impleDrag","TickerController","$","copyProperties"],function(a,b,c,d,e,f){var g= b('Arbiter'),h=b('AsyncRequest'),i=b('ChatSidebar'),j=b('CSS'),k=b('DOM'),l=b('R un'),m=b('SimpleDrag'),n=b('TickerController'),o=b('$'),p=b('copyProperties'),q= 1e-07;function r(s){this._ticker=o('pagelet_ticker');this._initSubscriptions();i f(j.hasClass(document.documentElement,'sidebarMode'))this._onSidebarShow();this. _initResizeBehavior(s);}r.hide=function(){l.onAfterLoad(function(){k.remove(o('p agelet_ticker'));k.remove(k.find(document.body,'div.fbSidebarGripper'));i.resize ();});};p(r.prototype,{_initResizeBehavior:function(s){var t=this._ticker,u=t.pa rentNode,v=this._saveResizedState.bind(this),w,x,y,z=function(ca,event){w=event. clientY;x=t.offsetHeight;y=u.offsetHeight;},aa=function(ca,event){var da=x+(even t.clientY-w),ea=100-(((y-da)/y)*100);ea=Math.max(q,Math.min(90,ea));t.style.heig ht=ea+'%';if(ca=='end'){v(ea);g.inform('Ticker/resized');}i.resize();},ba=new m( s);ba.subscribe('start',z);ba.subscribe(['update','end'],aa);},_saveResizedState :function(s){new h('/ajax/feed/ticker/resize').setData({height:''+s}).setMethod( 'POST').send();},_initSubscriptions:function(){this._subscriptions=[g.subscribe(

'sidebar/show',this._onSidebarShow.bind(this))];},_onSidebarShow:function(){n.sh ow(this._ticker);}});e.exports=r;}); __d("CanvasAppRequestUpdater",["Arbiter","CSS","ChannelConstants","DOM","copyPro perties"],function(a,b,c,d,e,f){var g=b('Arbiter'),h=b('CSS'),i=b('ChannelConsta nts'),j=b('DOM'),k=b('copyProperties');function l(m){this._root=m;g.subscribe(i. getArbiterType('app_request_create'),function(n,o){var p=j.scry(this._root,".ite m_"+o.obj.appid)[0],q=p&&j.scry(p,".requestsList")[0];q&&j.appendContent(q,o.obj .request);p&&this._updateBookmark(p,1);}.bind(this));g.subscribe(i.getArbiterTyp e('app_request_delete'),function(n,o){var p=j.scry(this._root,".item_"+o.obj.app id)[0],q=p&&j.scry(p,"[data-requestid='"+o.obj.requestid+"']")[0];q&&j.remove(q. parentElement);p&&this._updateBookmark(p,-1);}.bind(this));}k(l.prototype,{_upda teBookmark:function(m,n){var o=j.find(m,".flyout"),p=j.find(m,".countValue"),q=p arseInt(j.getText(p),10),r=Math.max(0,q+n);j.setContent(p,r);if(r<1){h.hide(p.pa rentElement);h.hide(o);}else{h.show(p.parentElement);h.show(o);}}});e.exports=l; }); __d("CanvasFlyoutLoader",["event-extensions","AsyncRequest"],function(a,b,c,d,e, f){b('event-extensions');var g=b('AsyncRequest'),h={endpoint:'/ajax/canvas/flyou ts',init:function(i,j,k){this.root=i;this.largeApps=j;this.seeAllApps=k;this.han dler=Event.listen(i,'mouseenter',this.loadFlyouts.shield(this));},loadFlyouts:fu nction(){this.handler.remove();this.handler=null;var i={items:this.largeApps,all _apps:this.seeAllApps};new g().setURI(this.endpoint).setRelativeTo(this.root).se tMethod('post').setReadOnly(true).setData(i).setAllowCrossPageTransition(true).s end();}};e.exports=h;}); __d("CanvasRecommendationFlyoutLoader",["event-extensions","AsyncRequest"],funct ion(a,b,c,d,e,f){b('event-extensions');var g=b('AsyncRequest'),h={endpoint:'/aja x/canvas/recommendation/flyouts',init:function(i,j){this.root=i;this.apps=j;this .handler=Event.listen(i,'mouseenter',this.loadFlyouts.shield(this));},loadFlyout s:function(){this.handler.remove();this.handler=null;var i={items:this.apps};new g().setURI(this.endpoint).setRelativeTo(this.root).setMethod('post').setReadOnl y(true).setData(i).setAllowCrossPageTransition(true).send();}};e.exports=h;}); window.init_live_message_receive=window.init_live_message_receive||function(a){w indow.init_live_message_receive=emptyFunction;Arbiter.subscribe(ChannelConstants .getArbiterType('app_msg'),function(b,c){if(c.obj.event_name=='beep_event'){Boot loader.loadComponents('beeper',function(){Beeper.ensureInitialized();Beeper.setP arams(a);LiveMessageReceiver.route(c.obj);});}else LiveMessageReceiver.route(c.o bj);});}; __d("BuddyListNub",["event-extensions","Arbiter","AvailableList","BlackbirdUpsel l","ChannelConnection","ChannelConstants","ChatConfig","ChatVisibility","Class", "CSS","Dock","DOM","HTML","Keys","NubController","OrderedFriendsList","PresenceP rivacy","Toggler","copyProperties","ge","tx","MercuryConfig"],function(a,b,c,d,e ,f){b('event-extensions');var g=b('Arbiter'),h=b('AvailableList'),i=b('Blackbird Upsell'),j=b('ChannelConnection'),k=b('ChannelConstants'),l=b('ChatConfig'),m=b( 'ChatVisibility'),n=b('Class'),o=b('CSS'),p=b('Dock'),q=b('DOM'),r=b('HTML'),s=b ('Keys'),t=c('MercuryConfig'),u=b('NubController'),v=b('OrderedFriendsList'),w=b ('PresencePrivacy'),x=b('Toggler'),y=b('copyProperties'),z=b('ge'),aa=b('tx'),ba =32,ca=10;function da(ea,fa,ga){this.parent.construct(this);this.parent.init(ea) ;this.root=ea;this.orderedList=fa;this.typeahead=ga;this.button=q.find(ea,'a.fbN ubButton');this.label=q.find(ea,'span.label');this.body=q.scry(ea,'div.fbNubFlyo utBody')[0];var ha=q.find(ea,'div.fbNubFlyoutTitlebar');x.createInstance(ha).set Sticky(false);fa.subscribe('render',this.flyoutContentChanged.bind(this));fa.set ScrollContainer(this.body);h.subscribe('buddylist/availability-changed',this._up dateCount.bind(this));g.subscribe('chat/connect',this._handleConnect.bind(this)) ;w.subscribe('privacy-user-presence-changed',this._handleVisibilityChange.bind(t his));this.message=q.find(ea,'div.fbDockChatBuddyListNubMessage div.message');th is.warningMsgText=null;this.warningMsgEventListener=null;this.showWarningTimeout =null;j.subscribe(j.CONNECTED,this._handleChannelConnected.bind(this));j.subscri be(j.SHUTDOWN,this._handleChannelShutdown.bind(this));j.subscribe(j.RECONNECTING ,this._handleChannelReconnecting.bind(this));j.subscribe([j.MUTE_WARNING,j.UNMUT E_WARNING],this._updateView.bind(this));this.subscribe('show',this.onShow.bind(t his));this.subscribe('hide',this.onHide.bind(this));this.subscribe('resize',this

.onResize.bind(this));Event.listen(ea,'keydown',this._onKeyDown.bind(this));Even t.listen(this.button,'click',this.onButtonClick.bind(this));ga.subscribe(['respo nd','reset'],function(ia,ja){if(this._isOpen){var ka=this.orderedList.isVisible( );if(ja&&ja.value&&ja.value===ga.getCore().getValue()&&ga.getView().isVisible()) {p.setUseMaxHeight(this.root,false);this.orderedList.hide();}else this._showBudd yList();if(ka!==this.orderedList.isVisible())this.flyoutContentChanged();}}.bind (this));g.subscribe('sidebar/show',this.hide.bind(this));this._orderedListCount= v.getList().length;g.inform('buddylist-nub/initialized',this,g.BEHAVIOR_PERSISTE NT);this._handleVisibilityChange();}n.extend(da,u);y(da.prototype,{getButton:fun ction(){return this.button;},getRoot:function(){return this.root;},_handleConnec t:function(ea){this._updateView(true);},_getShutdownReason:function(ea){switch(e a){case k.HINT_AUTH:return "Your session has timed out. Please log in.";case k.H INT_CONN:return aa._("Facebook {Chat} is currently unavailable.",{Chat:"Chat"}); case k.HINT_MAINT:return aa._("Facebook {Chat} is currently down for maintenance .",{Chat:"Chat"});default:return aa._("Facebook {Chat} is currently unavailable. ",{Chat:"Chat"});}},_getReconnectMsg:function(ea){var fa;if(ea===null){fa="Unabl e to connect to chat. Check your Internet connection.";}else if(ea>l.get('warnin g_countdown_threshold_msec')){var ga=q.create('a',{href:'#',className:'fbChatRec onnectLink'},"Try again"),ha=q.create('div',null,ga),ia=ha.innerHTML;fa=r(aa._(" Unable to connect to chat. {try-again-link}",{'try-again-link':ia}));}else if(ea >1000){fa=aa._("Unable to connect to chat. Reconnecting in {seconds}...",{second s:Math.floor(ea/1000)});}else fa="Unable to connect to chat. Reconnecting...";re turn fa;},_resetShowWarningTimeout:function(){if(this.showWarningTimeout){clearT imeout(this.showWarningTimeout);this.showWarningTimeout=null;}},_handleChannelCo nnected:function(ea){this._resetShowWarningTimeout();if(this.orderedList.isVisib le())m.goOnline();this.warningMsgText=null;this._updateView();},_handleChannelSh utdown:function(ea,fa){this._resetShowWarningTimeout();this.warningMsgText=this. _getShutdownReason(fa);this._updateView();},_handleChannelReconnecting:function( ea,fa){this._resetShowWarningTimeout();this.warningMsgText=this._getReconnectMsg (fa);if(fa>1000){if(fa>l.get('warning_countdown_threshold_msec')){if(this.warnin gMsgEventListener){this.warningMsgEventListener.remove();this.warningMsgEventLis tener=null;}this.warningMsgEventListener=Event.listen(this.message,'click',funct ion(event){if(o.hasClass(event.getTarget(),'fbChatReconnectLink')){this._tryReco nnect();event.kill();}}.bind(this));}this.showWarningTimeout=setTimeout(this._ha ndleChannelReconnecting.bind(this,ea,fa-1000),1000,false);}this._updateView();}, _tryReconnect:function(){if(j.disconnected())j.reconnect();},_handleVisibilityCh ange:function(){this._updateView();if(i.shouldShow()){if(m.hasBlackbirdEnabled() ){i.showBlackbirdDialog(this.getButton(),w.getVisibility());}else if(!m.isOnline ())i.showOfflineDialog(this.getButton());}else i.hide();if(!m.isOnline())this.hi de();},_updateView:function(ea){var fa=z('fbDockChat');o.conditionClass(fa,'offl ine',!m.isOnline());o.conditionClass(fa,'error',j.disconnected());if(j.disconnec ted())q.setContent(this.message,this.warningMsgText);if(!m.isOnline()){if(t.Chat ControlLanguageChangeGK){this._setLabel(aa._("{Chat} (Off)",{Chat:"Chat"}));}els e this._setLabel(aa._("{Chat} (Offline)",{Chat:"Chat"}));}else if(j.disconnected ()){this._setLabel(aa._("{Chat} (Disconnected)",{Chat:"Chat"}));}else{var ga=h.g etOnlineCount();if(ga){var ha=aa._("{Chat} {number-available}",{Chat:"Chat",'num ber-available':['<span class="count">','(<strong>',ga,'</strong>)','</span>'].jo in('')});this._setLabel(r(ha));}else this._setLabel("Chat",ea);}},onButtonClick: function(){this._conditionallyShowTypeahead();if(o.shown(this.typeahead.getEleme nt())){var ea=this.subscribe('show',function(){this.typeahead.getCore().getEleme nt().focus();i.dismiss();}.bind(this));this.unsubscribe.bind(this,ea).defer();}} ,onHide:function(){this._isOpen=false;if(this._buddyListRenderSubscription){this .orderedList.unsubscribe(this._buddyListRenderSubscription);this._buddyListRende rSubscription=null;}this.orderedList.hide();this.typeahead.getCore().reset();},_ onKeyDown:function(event){var ea=Event.getKeyCode(event);if(ea===s.ESC&&!o.hasCl ass(this.root,'menuOpened')){this.hide();return false;}},onResize:function(){var ea=p.getMaxFlyoutHeight(this.root)-60,fa=Math.max(250,ea);this.orderedList.setN umTopFriends(Math.floor(fa/ba));},_showBuddyList:function(){if(!this._buddyListR enderSubscription)this._buddyListRenderSubscription=this.orderedList.subscribe(' render',p.setUseMaxHeight.bind(p,this.root,false));this.orderedList.show();},onS

how:function(){this._isOpen=true;if(j.disconnected()){this._tryReconnect();this. _showBuddyList();}else m.goOnline(this._showBuddyList.bind(this));},_setLabel:fu nction(ea,fa){var ga=this.label.cloneNode(true);q.setContent(ga,ea);q.replace(th is.label,ga);this.label=ga;this.throbber&&o.conditionShow(this.throbber,!!fa);}, _conditionallyShowTypeahead:function(){o.conditionShow(this.typeahead.getElement (),this._orderedListCount>=ca);},_updateCount:function(){this._updateView();this ._conditionallyShowTypeahead();}});e.exports=da;}); __d("LiveBarData",["function-extensions","Arbiter","ArbiterMixin","AsyncRequest" ,"ChannelConstants","LayerDestroyOnHide","copyProperties","setTimeoutAcrossTrans itions","throttle"],function(a,b,c,d,e,f){b('function-extensions');var g=b('Arbi ter'),h=b('ArbiterMixin'),i=b('AsyncRequest'),j=b('ChannelConstants'),k=b('Layer DestroyOnHide'),l=b('copyProperties'),m=b('setTimeoutAcrossTransitions'),n=b('th rottle'),o=false,p={},q={},r={};function s(z){if((z.expires*1000)-Date.now()>0)r eturn true;return false;}function t(z){var aa=z.payload.actions;if(!(aa&&aa.leng th))return;var ba;for(var ca=0;ca<aa.length;ca++){ba=aa[ca].actor_id;if(!p[ba]|| aa[ca].action_id!=p[ba].action_id)continue;if(aa[ca].delete_action||aa[ca].remov e){w(aa[ca]);continue;}}}function u(z){var aa=false;for(var ba=0;ba<z.length;ba+ +){if(z[ba].delete_action||z[ba].remove){w(z[ba]);continue;}var ca=z[ba].actor_i d,da=z[ba].action_id;if(p[ca]){if(p[ca].action_id==da)continue;w(p[ca]);}aa=true ;p[ca]=z[ba];v(z[ba]);}if(aa)y.inform('new-actions');}function v(z){var aa=(z.ex pires*1000)-Date.now();q[z.actor_id]=m(w.curry(z),Math.max(0,aa));}function w(z) {if(!p[z.actor_id])return;if(p[z.actor_id].action_id!=z.action_id)return;delete p[z.actor_id];var aa=z.actor_id;if(q[aa]){clearTimeout(q[aa]);delete q[aa];}x(aa );y.inform('remove-action',z);}function x(z){var aa=r[z];if(aa){aa.enableBehavio r(k);if(!aa.isShown())aa.destroy();delete r[z];}}g.subscribe(j.getArbiterType('l ivebar_update'),function(z,aa){u(aa.obj.actions);});var y={};l(y,h,{fetch:functi on(){if(o)return;var z=[];for(var aa in p){var ba=p[aa];if(ba.suppress_callout)c ontinue;if(!r[ba.actor_id])z.push(p[aa]);}if(z.length>0){o=true;new i().setURI(' /ajax/chat/livebar.php').setData({actions:z}).setHandler(t).setFinallyHandler(fu nction(){o=false;}).setAllowCrossPageTransition(true).send();}},addActions:u,get Action:function(z){var aa=p[z];if(aa&&s(aa))return aa;return null;},getDialog:fu nction(z){var aa=this.getAction(z);if(aa&&r[aa.actor_id])return r[aa.actor_id];r eturn null;},setDialog:function(z,aa,ba){var ca=p[z];if(ca&&ca.action_id==aa){x( z);r[z]=ba;y.inform('dialog-fetched',z);}}});e.exports=y;}); __d("LiveBar",["event-extensions","function-extensions","ChatConfig","CSS","Live BarData","$","copyProperties","ge","setTimeoutAcrossTransitions","tx","ChatOrder edList","ContextualDialogX"],function(a,b,c,d,e,f){b('event-extensions');b('func tion-extensions');var g=b('ChatConfig'),h=b('CSS'),i=b('LiveBarData'),j=b('$'),k =b('copyProperties'),l=b('ge'),m=b('setTimeoutAcrossTransitions'),n=b('tx');b('C hatOrderedList');b('ContextualDialogX');var o=g.get('livebar_fetch_defer')||1000 ;function p(q,r,s){this._orderedList=q;this._root=q.getRoot();this._liveBarTypes =s;this._hoverController=q.getHoverController();this._hoverController.subscribe( 'hover',this._mouseMove.bind(this));this._hoverController.subscribe('leave',this ._mouseLeave.bind(this));q.subscribe('render',this._handleChatListUpdate.shield( this));i.subscribe('new-actions',this._updateIcons.bind(this));i.subscribe('remo ve-action',this._handleRemoveAction.bind(this));i.subscribe('dialog-fetched',fun ction(t,u){this._setDialogContent(u);}.bind(this));i.addActions(r);}k(p,{setDial og:function(q,r,s){i.setDialog(q,r,s);}});k(p.prototype,{_root:null,_liveBarType s:null,_hoverController:null,_registrations:{},_renderedIcons:{},_fetchTimer:nul l,_mouseLeftRoot:false,_chatListRendered:false,_getLiveBarTypes:function(){retur n this._liveBarTypes;},_handleChatListUpdate:function(){if(!this._chatListRender ed){this._chatListRendered=true;this._updateIcons();}},_handleShow:function(q){t his._setDialogContent(q);},_mouseMove:function(){if(!this._fetchTimer){this._fet chTimer=m(this._fetch.bind(this),o);this._mouseLeftRoot=false;}},_mouseLeave:fun ction(){this._mouseLeftRoot=true;clearTimeout(this._fetchTimer);this._fetchTimer =null;},_setDialogContent:function(q){var r=i.getDialog(q);if(r)this._hoverContr oller.showHovercard(q,r);},_fetch:function(){if(this._mouseLeftRoot)return;this. _fetchTimer=null;i.fetch();},_updateIcons:function(){if(!this._chatListRendered) return;var q=this._orderedList.getAllNodes(),r=this._getLiveBarTypes();for(var s in q){var t=i.getAction(s);if(t&&(!this._renderedIcons[s]||this._renderedIcons[

s]!=t.action_id)){for(var u=0;u<r.length;u++)h.removeClass(q[s],r[u]);h.addClass (q[s],t.livebar_type);this._renderedIcons[s]=t.action_id;var v=this._hoverContro ller.register(s,this._handleShow.bind(this));if(v)this._registrations[s]=v;}}},_ handleRemoveAction:function(q,r){var s=r.action_id,t=r.actor_id;this._registrati ons[t]&&this._registrations[t].unregister();delete this._registrations[t];if(thi s._renderedIcons[t]==s){var u=this._getLiveBarTypes(),v=this._orderedList.getAll Nodes();if(v[t])for(var w=0;w<u.length;w++)h.removeClass(v[t],u[w]);delete this. _renderedIcons[t];}}});e.exports=p;}); __d("LiveBarDark",["Class","LiveBar","copyProperties","emptyFunction"],function( a,b,c,d,e,f){var g=b('Class'),h=b('LiveBar'),i=b('copyProperties'),j=b('emptyFun ction');function k(l,m,n){this.parent.construct(this,l,m,n);}g.extend(k,h);i(k.p rototype,{_setupDialogContent:j,_show:j,_updateIcons:j,_handleRemoveAction:j,_ha ndleChatListUpdate:j});e.exports=k;}); __d("ChatSidebarDropdown",["Arbiter","AsyncRequest","Chat","ChatOptions","ChatVi sibility","CSS","DOM","JSLogger","PresenceState","Selector","copyProperties"],fu nction(a,b,c,d,e,f){var g=b('Arbiter'),h=b('AsyncRequest'),i=b('Chat'),j=b('Chat Options'),k=b('ChatVisibility'),l=b('CSS'),m=b('DOM'),n=b('JSLogger'),o=b('Prese nceState'),p=b('Selector'),q=b('copyProperties');function r(s){this._root=s;this ._logger=n.create('blackbird');this._displayBrowserNotificationsIfNeeded();p.lis ten(s,'select',this._onSelect.bind(this));p.listen(s,'toggle',this._onToggle.bin d(this));g.subscribe('chat/option-changed',this._onOptionChanged.bind(this));}q( r.prototype,{changeSetting:function(s,t){if(this._pendingChange)return false;thi s._pendingChange=true;var u={};u[s]=t;j.setSetting(s,t,'sidebar_menu');new h('/a jax/chat/settings.php').setHandler(this._onChangeSettingResponse.bind(this,s,t)) .setErrorHandler(this._onChangeSettingError.bind(this,s,t)).setFinallyHandler(th is._onChangeFinally.bind(this)).setData(u).setAllowCrossPageTransition(true).sen d();},_displayBrowserNotificationsIfNeeded:function(){if(window.webkitNotificati ons){m.scry(document,'li.sidebar-browser-notif').forEach(l.show);if(window.webki tNotifications.checkPermission()!==0)m.scry(document,'li.sidebar-browser-notif') .forEach(function(s){l.removeClass(s,'checked');});}},_conditionEnabled:function (s,t){var u=p.getOption(this._root,s);u&&p.setOptionEnabled(u,t);},_onChangeSett ingResponse:function(s,t,u){o.doSync();},_onChangeSettingError:function(s,t,u){j .setSetting(s,!t,'sidebar_menu_error');},_onChangeFinally:function(){this._pendi ngChange=false;},_onOptionChanged:function(s,t){var u=t.name,v=t.value;if(u==='s ound'||u==='browser_notif'){var w=p.getOption(this._root,u);if(v!==p.isOptionSel ected(w))p.setSelected(this._root,u,v);}},_onSelect:function(s){if(this._pending Change)return false;var t=false,u=false,v=p.getOptionValue(s.option);switch(v){c ase 'sidebar':return this.toggleSidebar();case 'online':if(!k.isOnline()){k.goOn line();}else u=true;t=true;break;case 'offline':if(k.isOnline()){k.goOffline();} else u=true;t=true;break;case 'advanced_settings':g.inform('chat/advanced-settin gs-dialog-opened');t=true;break;}if(u){this._logger.error('sidebar_dropdown_visi bility_error',{action:v});}else this._logger.log('sidebar_dropdown_set_visibilit y',{action:v});if(t){p.toggle(this._root);return false;}},_onToggle:function(s){ if(this._pendingChange)return false;var t=p.getOptionValue(s.option),u=p.isOptio nSelected(s.option);switch(t){case 'visibility':if(!k){this._jslogger.error('on_ toggle_visibility_undefined');return;}k.toggleVisibility();this._logger.log('sid ebar_dropdown_toggle_visibility',{available:u});break;case 'browser_notif':if(u& &window.webkitNotifications&&window.webkitNotifications.checkPermission()!==0){w indow.webkitNotifications.requestPermission(function(){this.changeSetting(t,u);} .bind(this));}else this.changeSetting(t,u);break;case 'sound':this.changeSetting (t,u);break;}p.toggle(this._root);},_onVisibilityChanged:function(){var s=k.isOn line(),t=p.getOption(this._root,'visibility');if(s!==p.isOptionSelected(t))p.set Selected(this._root,'visibility',s);},toggleSidebar:function(){i.toggleSidebar() ;p.toggle(this._root);return false;}});e.exports=r;}); __d("legacy:megaphone",["MegaphoneHelper"],function(a,b,c,d){a.MegaphoneHelper=b ('MegaphoneHelper');},3); __d("FbdPromo",["event-extensions","Arbiter","AsyncRequest","ChatSidebar","copyP roperties","CSS","DOM","FbdConversionTracking","FBDesktopDetect","FbdInstall"],f unction(a,b,c,d,e,f){b('event-extensions');var g=b('Arbiter'),h=b('AsyncRequest' ),i=b('ChatSidebar'),j=b('copyProperties'),k=b('CSS'),l=b('DOM'),m=b('FbdConvers

ionTracking'),n=b('FBDesktopDetect'),o=b('FbdInstall'),p="show",q="install",r="c ancel",s="learn_more";function t(u,v,w){this._root=u;Event.listen(l.find(u,'.ins tall-button'),'click',this.installClick.bind(this,v));Event.listen(l.find(u,'.le arn-more'),'click',this.learnMoreClick.bind(this));Event.listen(l.find(u,'.promo -close-button'),'click',this.cancelClick.bind(this));this.type=w;this.showPromo( );}j(t.prototype,{cancelClick:function(){this.hidePromo();this.postPromoAction(r );},hidePromo:function(u){k.hide(this._root);i.resize();},installClick:function( u){o.init(u,this.type);o.setupPlugin();this.postPromoAction(q);setTimeout(functi on(){this.hidePromo();}.bind(this),3000);},learnMoreClick:function(){this.postPr omoAction(s);},postPromoAction:function(u){new h("/ajax/desktop/promo_action.php ").setMethod("POST").setData({action:u,type:this.type}).send();m.logClick(this.t ype+'_promo_'+u);},showPromo:function(){if(n.isPluginInstalled())return;k.show(t his._root);if(i.isVisible()){this.postPromoAction(p);}else{var u=true;g.subscrib e('sidebar/show',function(){if(u){u=false;this.postPromoAction(p);}}.bind(this)) ;}}});e.exports=t;});

Das könnte Ihnen auch gefallen