Showing 51 of 108 total issues
File mvc.js
has 1163 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
//Authors: Ari Kalfus, Burak Sezer, Sam Raphael, Wesley Wei Qian
var model = {
name: "Jeeves",
view: "weather",
Function $RouteProvider
has 185 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function $RouteProvider(){
function inherit(parent, extra) {
return angular.extend(new (angular.extend(function() {}, {prototype:parent}))(), extra);
}
Function goToSpeech
has 147 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$scope.goToSpeech = function(results) {
if ($scope.regXloop(results, 'news')) {
if ($scope.jeeves.view != 'news') {
navigator.tts.speak("On it.", function() {
$scope.$apply(function() {
Function $get
has 123 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function($rootScope, $location, $routeParams, $q, $injector, $http, $templateCache, $sce) {
/**
* @ngdoc service
* @name $route
Function changeNewsHelper
has 73 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$scope.changeNewsHelper=function(sectionName){
if($scope.regXloopForNews(sectionName, 'news')){
$scope.$apply(function(){
$scope.jeeves.newsPosition.section='news';
$scope.jeeves.newsPosition.articleIndex = 0;
Function readArticle
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$scope.readArticle = function(){
$scope.jeeves.newsPosition.pause=false;
$scope.jeeves.newsPosition.pausePosition=0;
$scope.jeeves.newsPosition.contArticleContent="";
Function updateRoute
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function updateRoute() {
var next = parseRoute(),
last = $route.current;
if (next && last && next.$$route === last.$$route
File angular-route.js
has 278 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* @license AngularJS v1.2.18
* (c) 2010-2014 Google, Inc. http://angularjs.org
* License: MIT
*/
Function getHelp
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$scope.getHelp = function(results) {
if ($scope.jeeves.view == 'weather') {
$scope.jeeves.weathermodalhelp = $modal.open({
templateUrl: "weather-help.html",
windowClass: 'help-window'
Function ngViewFactory
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function ngViewFactory( $route, $anchorScroll, $animate) {
return {
restrict: 'ECA',
terminal: true,
priority: 400,
Function makeApiCall
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function makeApiCall() {
gapi.client.load('gmail', 'v1', function() {
var request = gapi.client.gmail.users.messages.list({
labelIds: ['INBOX', 'UNREAD']
});
Function link
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
link: function(scope, $element, attr, ctrl, $transclude) {
var currentScope,
currentElement,
previousElement,
autoScrollExp = attr.autoscroll,
Function getEmail
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
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";
Function disableBack
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$scope.disableBack = function(){
if($scope.jeeves.displayNews.newsCount<5){
var button = document.getElementById('newsBack');
button.disabled = 'disabled';
}else{
Function decode
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
base64.decode = function(s) {
// convert to string
s = "" + s;
var getbyte64 = base64.getbyte64;
var pads, i, b10;
Function encode
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
base64.encode = function(s) {
if (arguments.length != 1) {
throw "SyntaxError: Not enough arguments";
}
var padchar = base64.PADCHAR;
Function changeWeather
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$scope.changeWeather = function(setting) {
var city = "";
if(typeof setting == "boolean"){ // If the change is made by typing, the setting will be a boolean.
Function startTTS
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function startTTS() {
navigator.tts.startup(success, fail);
function success () {
var $element = $('#body-controller-element');
Function changeView
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
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 {
Function globalCommands
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
$scope.globalCommands = function(results) {
for (var i = 0; i < results.length; i++){
if (results[i] == "how is the weather" || results[i] == "how's the weather" || results[i] == "what's the weather" || results[i] == "what is the weather like today" || results[i] == "what's the weather like" || results[i] == "how's the weather today" || results[i] == "how is the weather today"){
$scope.$apply(function() {
$scope.changeView("weather");