Plugin visibility defaults to value of rootScope.visible

And plugin content is shown if it has to be visible
rewrite-with-urlplugin
David Cormier 11 years ago
parent dc1ce08800
commit d2a30c1d13
  1. 8
      js/glowingbear.js

@ -1300,7 +1300,7 @@ weechat.config(['$routeProvider',
]);
weechat.directive('plugin', function() {
weechat.directive('plugin', function($rootScope) {
/*
* Plugin directive
* Shows additional plugin content
@ -1316,6 +1316,8 @@ weechat.directive('plugin', function() {
$scope.displayedContent = "";
$scope.plugin.visible = $rootScope.visible;
$scope.hideContent = function() {
$scope.plugin.visible = false;
};
@ -1339,6 +1341,10 @@ weechat.directive('plugin', function() {
};
setTimeout(scroll, 100);
};
if ($scope.plugin.visible) {
$scope.showContent();
}
}
};
});

Loading…
Cancel
Save