Bug 797667 - Add back the SocialToolbar.button getter. r=markh
authorJared Wein <jwein@mozilla.com>
Wed, 03 Oct 2012 21:00:57 -0700
changeset 115498 a2da97e3ebc683fdfd7e1f4db6d2ab09234ec87e
parent 115497 d93199111fda746b4d2a6f477255194e1a76a66a
child 115499 e0907e4af12baf20477f38fb21c429f9d5e6a9df
push id1708
push userakeybl@mozilla.com
push dateMon, 19 Nov 2012 21:10:21 +0000
treeherdermozilla-beta@27b14fe50103 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmarkh
bugs797667
milestone18.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 797667 - Add back the SocialToolbar.button getter. r=markh
browser/base/content/browser-social.js
--- a/browser/base/content/browser-social.js
+++ b/browser/base/content/browser-social.js
@@ -530,21 +530,25 @@ let SocialShareButton = {
     }
     shareButton.style.backgroundImage = 'url("' + encodeURI(imageURL) + '")';
   }
 };
 
 var SocialToolbar = {
   // Called once, after window load, when the Social.provider object is initialized
   init: function SocialToolbar_init() {
-    document.getElementById("social-provider-button").setAttribute("image", Social.provider.iconURL);
+    this.button.setAttribute("image", Social.provider.iconURL);
     this.updateButton();
     this.updateProfile();
   },
 
+  get button() {
+    return document.getElementById("social-provider-button");
+  },
+
   updateButtonHiddenState: function SocialToolbar_updateButtonHiddenState() {
     let tbi = document.getElementById("social-toolbar-item");
     tbi.hidden = !Social.uiVisible;
     if (!SocialUI.haveLoggedInUser()) {
       let parent = document.getElementById("social-notification-box");
       while (parent.hasChildNodes())
         parent.removeChild(parent.firstChild);