freaktechnik

Untitled

Mar 23rd, 2014
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. panelButton = require("sdk/ui/button/toggle").ToggleButton({
  2.         id: "live-channels-button",
  3.         label: _("live_widget_label"),
  4.         icon: live?liveIcons:offlineIcons,
  5.         onClick: function(state) {
  6.             if(!state.checked)
  7.                 livePanel.hide()
  8.             else
  9.                 livePanel.show({position: panelButton});
  10.         }
  11.     });
  12.     livePanel.on("hide", function() {
  13.         if(panelButton.checked)
  14.             panelButton.state("window", {"checked":false});
  15.     });
Advertisement
Add Comment
Please, Sign In to add comment