From 407f9111adb99ee9cde7778e970511ed5e4cb423 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lorenz=20H=C3=BCbschle-Schneider?= Date: Sun, 27 Dec 2015 19:19:23 +0100 Subject: [PATCH] Update Angular to 1.4.x series (1.4.8) Angular now has a .$$watchersCount property, which makes our watcher counting function unnecessary. Also add sha384 emojione SRI hash --- index.html | 10 +++++----- js/glowingbear.js | 16 +--------------- 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/index.html b/index.html index 5e2122f..7daf2f2 100644 --- a/index.html +++ b/index.html @@ -19,12 +19,12 @@ - - - - + + + + - + diff --git a/js/glowingbear.js b/js/glowingbear.js index e2f48fc..51de8cc 100644 --- a/js/glowingbear.js +++ b/js/glowingbear.js @@ -49,22 +49,8 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout', }); $scope.settings = settings; - // From: http://stackoverflow.com/a/18539624 by StackOverflow user "plantian" $rootScope.countWatchers = function () { - var q = [$rootScope], watchers = 0, scope; - while (q.length > 0) { - scope = q.pop(); - if (scope.$$watchers) { - watchers += scope.$$watchers.length; - } - if (scope.$$childHead) { - q.push(scope.$$childHead); - } - if (scope.$$nextSibling) { - q.push(scope.$$nextSibling); - } - } - $log.debug(watchers); + $log.debug($rootScope.$$watchersCount); }; $scope.isinstalled = (function() {