diff --git a/index.html b/index.html index 8ea5f45..399677d 100644 --- a/index.html +++ b/index.html @@ -152,6 +152,7 @@ $ openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out rel
brand
+
+
  • +
    +
    + +
    +
    +
  • diff --git a/js/websockets.js b/js/websockets.js index 824dc1a..7c0c625 100644 --- a/js/websockets.js +++ b/js/websockets.js @@ -437,6 +437,27 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout', }); } + + $rootScope.countWatchers = function () { + var root = $(document.getElementsByTagName('body')); + var watchers = []; + + var f = function (element) { + if (element.data().hasOwnProperty('$scope')) { + angular.forEach(element.data().$scope.$$watchers, function (watcher) { + watchers.push(watcher); + }); + } + + angular.forEach(element.children(), function (childElement) { + f($(childElement)); + }); + }; + + f(root); + console.log(watchers.length); + }; + if(window.webkitNotifications != undefined) { if (window.webkitNotifications.checkPermission() == 0) { // 0 is PERMISSION_ALLOWED $log.info('Notification permission status:', window.webkitNotifications.checkPermission() == 0);