arikalfus/Jeeves

View on GitHub

Showing 51 of 108 total issues

File mvc.js has 1163 lines of code (exceeds 250 allowed). Consider refactoring.
Open

//Authors: Ari Kalfus, Burak Sezer, Sam Raphael, Wesley Wei Qian

var model = {
    name: "Jeeves",
    view: "weather",
Severity: Major
Found in js/mvc.js - About 2 days to fix

    Function $RouteProvider has 185 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function $RouteProvider(){
      function inherit(parent, extra) {
        return angular.extend(new (angular.extend(function() {}, {prototype:parent}))(), extra);
      }
    
    
    Severity: Major
    Found in js/angular-route.js - About 7 hrs to fix

      Function goToSpeech has 147 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          $scope.goToSpeech = function(results) {
              if ($scope.regXloop(results, 'news')) {
                  if ($scope.jeeves.view != 'news') {
                      navigator.tts.speak("On it.", function() {
                          $scope.$apply(function() {
      Severity: Major
      Found in js/mvc.js - About 5 hrs to fix

        Function $get has 123 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

              function($rootScope, $location, $routeParams, $q, $injector, $http, $templateCache, $sce) {
        
            /**
             * @ngdoc service
             * @name $route
        Severity: Major
        Found in js/angular-route.js - About 4 hrs to fix

          Function changeNewsHelper has 73 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              $scope.changeNewsHelper=function(sectionName){
                  if($scope.regXloopForNews(sectionName, 'news')){
                      $scope.$apply(function(){
                          $scope.jeeves.newsPosition.section='news';
                          $scope.jeeves.newsPosition.articleIndex = 0;
          Severity: Major
          Found in js/mvc.js - About 2 hrs to fix

            Function readArticle has 71 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                $scope.readArticle = function(){
                    $scope.jeeves.newsPosition.pause=false;
                    $scope.jeeves.newsPosition.pausePosition=0;
                    $scope.jeeves.newsPosition.contArticleContent="";
            
            
            Severity: Major
            Found in js/mvc.js - About 2 hrs to fix

              Function updateRoute has 67 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  function updateRoute() {
                    var next = parseRoute(),
                        last = $route.current;
              
                    if (next && last && next.$$route === last.$$route
              Severity: Major
              Found in js/angular-route.js - About 2 hrs to fix

                File angular-route.js has 278 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                /**
                 * @license AngularJS v1.2.18
                 * (c) 2010-2014 Google, Inc. http://angularjs.org
                 * License: MIT
                 */
                Severity: Minor
                Found in js/angular-route.js - About 2 hrs to fix

                  Function getHelp has 58 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      $scope.getHelp = function(results) {
                          if ($scope.jeeves.view == 'weather') {
                              $scope.jeeves.weathermodalhelp = $modal.open({
                                  templateUrl: "weather-help.html",
                                  windowClass: 'help-window'
                  Severity: Major
                  Found in js/mvc.js - About 2 hrs to fix

                    Function ngViewFactory has 55 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function ngViewFactory(   $route,   $anchorScroll,   $animate) {
                      return {
                        restrict: 'ECA',
                        terminal: true,
                        priority: 400,
                    Severity: Major
                    Found in js/angular-route.js - About 2 hrs to fix

                      Function makeApiCall has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function makeApiCall() {
                        gapi.client.load('gmail', 'v1', function() {
                          var request = gapi.client.gmail.users.messages.list({
                            labelIds: ['INBOX', 'UNREAD']
                          });
                      Severity: Minor
                      Found in js/googleauthorize.js - About 2 hrs to fix

                        Function link has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            link: function(scope, $element, attr, ctrl, $transclude) {
                                var currentScope,
                                    currentElement,
                                    previousElement,
                                    autoScrollExp = attr.autoscroll,
                        Severity: Minor
                        Found in js/angular-route.js - About 1 hr to fix

                          Function getEmail has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              $scope.getEmail = function() {
                                  $scope.jeeves.emailList.length = 0;
                                  $scope.jeeves.emailCount = 0;
                                  // After get the email, hide the refiresh button.
                                  document.getElementById("refresh-button").style.visibility = "hidden";
                          Severity: Minor
                          Found in js/mvc.js - About 1 hr to fix

                            Function disableBack has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                $scope.disableBack = function(){
                                    if($scope.jeeves.displayNews.newsCount<5){
                                        var button = document.getElementById('newsBack');
                                        button.disabled = 'disabled';
                                    }else{
                            Severity: Minor
                            Found in js/mvc.js - About 1 hr to fix

                              Function decode has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                              base64.decode = function(s) {
                                  // convert to string
                                  s = "" + s;
                                  var getbyte64 = base64.getbyte64;
                                  var pads, i, b10;
                              Severity: Minor
                              Found in js/base64.js - About 1 hr to fix

                                Function encode has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                base64.encode = function(s) {
                                    if (arguments.length != 1) {
                                    throw "SyntaxError: Not enough arguments";
                                    }
                                    var padchar = base64.PADCHAR;
                                Severity: Minor
                                Found in js/base64.js - About 1 hr to fix

                                  Function changeWeather has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      $scope.changeWeather = function(setting) {
                                  
                                          var city = "";
                                  
                                          if(typeof setting == "boolean"){    // If the change is made by typing, the setting will be a boolean.
                                  Severity: Minor
                                  Found in js/mvc.js - About 1 hr to fix

                                    Function changeView has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        $scope.changeView = function(selected) {
                                            if (selected == 'back'){
                                                if ($scope.jeeves.isMenuOpen) {        // If the menu is open, the back button will just close the menu.
                                                    $scope.closeMenu();
                                                } else {
                                    Severity: Minor
                                    Found in js/mvc.js - About 1 hr to fix

                                      Function startTTS has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          function startTTS() {
                                              navigator.tts.startup(success, fail);
                                      
                                              function success () {
                                                  var $element = $('#body-controller-element');
                                      Severity: Minor
                                      Found in js/startFunction.js - About 1 hr to fix

                                        Function base64_decode has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                        function base64_decode(data) {
                                          //  discuss at: http://phpjs.org/functions/base64_decode/
                                          // original by: Tyler Akins (http://rumkin.com)
                                          // improved by: Thunder.m
                                          // improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
                                        Severity: Minor
                                        Found in js/base64_decode.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language