Last active
November 7, 2015 09:36
Revisions
-
aegiz revised this gist
Nov 7, 2015 . No changes.There are no files selected for viewing
-
aegiz renamed this gist
Nov 7, 2015 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
aegiz created this gist
Nov 7, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ javascript:(function () { var root = angular.element(document.getElementsByTagName('body')[0]); 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(angular.element(childElement)); }); }; f(root); alert(watchers.length);})();