<commit_before>app.directive('clickSelect', function () {
  return {
    restrict: 'A',
    link: function (scope, element, attrs) {
      element.on('click', function () {
		    try{
          this.select();
        } catch(e){
          if(e.toString().indexOf('this.select is not a function')){
              console.log(this)
          }
        }
      });
    }
  };
});

app.directive('scrollif', ['$rootScope',function ($rootScope) {
      return{
        restrict : 'A',
        transclude: false,
        link: function (scope, element, attributes) {
          console.log('scrollif')
          $rootScope.$on('loaded', function () {
            setTimeout(function () {

              if (scope.$eval(attributes.scrollIf)) {
                $('#pwList').scrollTo(0, element[0].offsetTop)

              }
            }, 500);
          });
        }
      }

    }
]);


app.directive('makeUrl', ['$rootScope',
  function($rootScope) {
    return {
      restrict : 'A',
      transclude: false,
      scope:{
        url: '='
      },
      link : function(scope, element) {
        scope.$watch('url',function(newVal){
          if(!newVal){
            return
          }
          var newUrl;
          if(!scope.url.match(/([http|https|ftp|mailto])/)){
            newUrl = 'http://'+ scope.url;
          } else {
            newUrl = scope.url;
          }
          element.attr('href',newUrl);
        });
      }
    };
  }
]);

app.directive('progressBar', ['$rootScope',
  function($rootScope) {
    return {
      restrict : 'A',
      transclude: false,
      scope:{
        percent: '=',
        width:'='
      },
      template: '<div class="progress" style="width: {{width}}px;"><div class="progress-bar" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: {{percent}}%;"><span class="sr-only">{{percent}}% Complete</span></div></div>',
      link : function(scope, element) {
        console.log(scope)
      }
    };
  }
]);

app.directive('showLoaded', ['$rootScope',
  function($rootScope) {
    return {
      restrict : 'A',
      transclude : false,
      link : function(scope, element) {
        $rootScope.$on('loaded', function(){
          element.css('display','block');
        });
      }
    };<commit_msg>Remove some code<commit_after>app.directive('clickSelect', function () {
  return {
    restrict: 'A',
    link: function (scope, element, attrs) {
      element.on('click', function () {
		    try{
          this.select();
        } catch(e){
          if(e.toString().indexOf('this.select is not a function')){
              console.log(this)
          }
        }
      });
    }
  };
});

app.directive('scrollif', ['$rootScope',function ($rootScope) {
      return{
        restrict : 'A',
        transclude: false,
        link: function (scope, element, attributes) {
          console.log('scrollif')
          $rootScope.$on('loaded', function () {
            setTimeout(function () {

              if (scope.$eval(attributes.scrollIf)) {
                $('#pwList').scrollTo(0, element[0].offsetTop)

              }
            }, 500);
          });
        }
      }

    }
]);


app.directive('makeUrl', ['$rootScope',
  function($rootScope) {
    return {
      restrict : 'A',
      transclude: false,
      scope:{
        url: '='
      },
      link : function(scope, element) {
        scope.$watch('url',function(newVal){
          if(!newVal){
            return
          }
          var newUrl;
          if(!scope.url.match(/([http|https|ftp|mailto])/)){
            newUrl = 'http://'+ scope.url;
          } else {
            newUrl = scope.url;
          }
          element.attr('href',newUrl);
        });
      }
    };
  }
]);

app.directive('progressBar', ['$rootScope',
  function($rootScope) {
    return {
      restrict : 'A',
      transclude: false,
      scope:{
        percent: '=',
        width:'='
      },
      template: '<div class="progress" style="width: {{width}}px;"><div class="progress-bar" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: {{percent}}%;"><span class="sr-only">{{percent}}% Complete</span></div></div>',
    };
  }
]);

app.directive('showLoaded', ['$rootScope',
  function($rootScope) {
    return {
      restrict : 'A',
      transclude : false,
      link : function(scope, element) {
        $rootScope.$on('loaded', function(){
          element.css('display','block');
        });
      }
    };
{'fraction_non_alphanumeric': 0.18123336291038156, 'fraction_numerical': 0.0048802129547471165, 'mean_word_length': 1.9412915851272015, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '1505208', 'n_tokens_mistral': 1375, 'n_tokens_neox': 1362, 'n_words': 222}