<commit_before>(function () {

    angular.module('ReFigure')
        .component('foundFigures', {
            templateUrl: 'view/foundFigures.component.html',
            controller: CtrlFunction,
            controllerAs: 'vm'
        });

    CtrlFunction.$inject=["$scope"];
    function CtrlFunction($scope) {
        let vm = this;
        vm.figures = [];
        vm.onShowMoreInfo = show;
        let currentIndex = -1;
   //     activate();

        //////////////////////////

        vm.$onInit = function () {
            chrome.storage.local.get('rfFigures', function (data) {
                $scope.$apply(function() {
                    vm.figures = data.rfFigures;
                });
            });
        };

        function show(index) {
            if (currentIndex < 0) {
                vm.figures[index].showMoreInfo = true;
                currentIndex = index;
            }
            else if (index === currentIndex) {
                vm.figures[index].showMoreInfo = !vm.figures[index].showMoreInfo;
            }
            else {
                vm.figures[currentIndex].showMoreInfo = false;
                vm.figures[index].showMoreInfo = true;
                currentIndex = index;
                //if(index > currentIndex){
                //   window.scrollIntoView(element);
                // }
            }
        }
     }

})();<commit_msg>~ fix<commit_after>(function () {

    angular.module('ReFigure')
        .component('foundFigures', {
            templateUrl: 'view/foundFigures.component.html',
            controller: CtrlFunction,
            controllerAs: 'vm'
        });

    CtrlFunction.$inject=["$scope"];
    function CtrlFunction($scope) {
        let vm = this;
        vm.figures = [];
        vm.onShowMoreInfo = show;
        let currentIndex = -1;
   //     activate();

        //////////////////////////

        vm.$onInit = function () {
            chrome.storage.local.get('rfFigures', function (data) {
                $scope.$apply(function() {
                    vm.figures = data.rfFigures;
                });
            });
        };

        function show(index) {
            if (currentIndex < 0) {
                vm.figures[index].showMoreInfo = true;
                currentIndex = index;
            }
            else if (index === currentIndex) {
                vm.figures[index].showMoreInfo = !vm.figures[index].showMoreInfo;
            } else {
                vm.figures[currentIndex].showMoreInfo = false;
                vm.figures[index].showMoreInfo = true;
                currentIndex = index;
                //if(index > currentIndex){
                //   window.scrollIntoView(element);
                // }
            }
        }
     }

})();
{'fraction_non_alphanumeric': 0.14321972443799855, 'fraction_numerical': 0.0014503263234227702, 'mean_word_length': 1.295341098169717, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2892859', 'n_tokens_mistral': 748, 'n_tokens_neox': 681, 'n_words': 111}