From d2a30c1d13802571b3149cd5305e81d736c41fff Mon Sep 17 00:00:00 2001 From: David Cormier Date: Fri, 25 Jul 2014 17:34:29 -0400 Subject: [PATCH] Plugin visibility defaults to value of rootScope.visible And plugin content is shown if it has to be visible --- js/glowingbear.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/js/glowingbear.js b/js/glowingbear.js index c591bda..4dbae7b 100644 --- a/js/glowingbear.js +++ b/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(); + } } }; });