B2G/gecko/browser/base/content/browser-social.js
// Called once Social.jsm's provider has been set
Called once Social.jsm's provider has been set
Called once Social . jsm ' s provider has been set
function SocialUI_providerReady() {
    if (!Social.provider)
      return;
    this.updateToggleCommand();
    let toggleCommand = this.toggleCommand;
    let brandShortName = document.getElementById("bundle_brand").getString("brandShortName");
    let label = gNavigatorBundle.getFormattedString("social.toggle.label",
                                                    [Social.provider.name,
                                                     brandShortName]);
    let accesskey = gNavigatorBundle.getString("social.toggle.accesskey");
    toggleCommand.setAttribute("label", label);
    toggleCommand.setAttribute("accesskey", accesskey);
    let kbMenuitem = document.getElementById("menu_socialAmbientMenu");
    kbMenuitem.hidden = !Social.enabled;
    kbMenuitem.setAttribute("label", label);
    kbMenuitem.setAttribute("accesskey", accesskey);
    document.getElementById("menu_socialSidebar").setAttribute("label", Social.provider.name);
    SocialToolbar.init();
    SocialShareButton.init();
    SocialSidebar.init();
    SocialMenu.populate();
    SocialChatBar.update();
  }
function SocialUI_providerReady ( ) { if ( ! Social . provider ) return ; this . updateToggleCommand ( ) ; let toggleCommand = this . toggleCommand ; let brandShortName = document . getElementById ( "bundle_brand" ) . getString ( "brandShortName" ) ; let label = gNavigatorBundle . getFormattedString ( "social.toggle.label" , [ Social . provider . name , brandShortName ] ) ; let accesskey = gNavigatorBundle . getString ( "social.toggle.accesskey" ) ; toggleCommand . setAttribute ( "label" , label ) ; toggleCommand . setAttribute ( "accesskey" , accesskey ) ; let kbMenuitem = document . getElementById ( "menu_socialAmbientMenu" ) ; kbMenuitem . hidden = ! Social . enabled ; kbMenuitem . setAttribute ( "label" , label ) ; kbMenuitem . setAttribute ( "accesskey" , accesskey ) ; document . getElementById ( "menu_socialSidebar" ) . setAttribute ( "label" , Social . provider . name ) ; SocialToolbar . init ( ) ; SocialShareButton . init ( ) ; SocialSidebar . init ( ) ; SocialMenu . populate ( ) ; SocialChatBar . update ( ) ; }
Called once Social.jsm's provider has been set
Called once Social . jsm ' s provider has been set
// If we couldn't find a provider, nothing to do here. // The View->Sidebar menu.