Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(refactor) Removed 32 console.log statements from code. #42

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions app/scripts/account/account.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ module.factory('updateData', ['fbutil', '$timeout', '$window', '$rootScope', fun
birthday: birthday,
ssn: ssn,
};
console.log(userEmail);
console.log(userData);

ref.update(userData, function() {console.log('success');});
ref.update(userData, function() {
//provide user feed back for successful data update
});
}
};
return functions;
Expand Down
1 change: 0 additions & 1 deletion app/scripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ angular.module('jetgrizzlyApp', [
$scope.user = user;
$scope.currentRoom = window.currentRoom;
userRoom.setRoom($scope.currentRoom);
// console.log($scope.currentRoom);
var roomsRef = new $window.Firebase(config.firebase.url+'/rooms/');
var sync = $firebase(roomsRef);
$scope.rooms = sync.$asObject();
Expand Down
1 change: 0 additions & 1 deletion app/scripts/auth/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ module.controller('RegisterController', function ($scope, $state, SimpleLogin, $
});
module.controller('LogoutController', function (SimpleLogin, $state, $scope, $stateParams) {
SimpleLogin.logout();
console.log('Logged out!');
$state.go('login', $stateParams, {
reload: true
});
Expand Down
1 change: 0 additions & 1 deletion app/scripts/controllers/chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ var module = angular.module('jetgrizzlyApp.chat', ['firebase.utils', 'firebase']
module.controller('ChatController', ['fbutil', '$scope', '$window', '$firebase', '$location', '$anchorScroll', function(fbutil, $scope, $window, $firebase, $location, $anchorScroll) {

var currentRoom = $scope.$parent.currentRoom;
// console.log(currentRoom);
var limit = fbutil.ref2('/rooms/'+currentRoom+'/messages').limit(30);

// create an AngularFire reference to the data and download the data into a local object
Expand Down
15 changes: 2 additions & 13 deletions app/scripts/controllers/videoqueue.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ angular.module('jetgrizzlyApp')
var currentRoom = $scope.$parent.room;

var currentRoom = $scope.$parent.currentRoom;
// console.log(currentRoom);

var queueRef = new $window.Firebase(config.firebase.url+'/rooms/'+currentRoom+'/queue/');

Expand All @@ -34,35 +33,25 @@ angular.module('jetgrizzlyApp')
});

$scope.addToQueue = function(item) {
console.log('Link added: '+ item);
var item = { item: item, voteCount: 0 };
$scope.queue.$add(item).then(function(){
console.log('scope.item', $scope.item);
$scope.item = '';
$scope.queueForm.$setPristine();
console.log('your video has been added to the queue');
});
};

$scope.upvote = function(index){
var tempCount = $scope.queue[index].voteCount;
++tempCount;
console.log(tempCount);
$scope.queue[index].voteCount = tempCount;
$scope.queue.$save(index).then(function(){
console.log('upvote saved');
});
$scope.queue.$save(index);
};

$scope.downVote = function(index){
var tempCount = $scope.queue[index].voteCount;
console.log(tempCount);
--tempCount;
console.log(tempCount);
$scope.queue[index].voteCount = tempCount;
$scope.queue.$save(index).then(function(){
console.log('downvote saved');
});
$scope.queue.$save(index);
};

}]);
Expand Down
10 changes: 0 additions & 10 deletions app/scripts/room/room.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,21 +55,13 @@ var module = angular.module('jetgrizzlyApp.Room', ['ui.router']).config(function
events: {
'onStateChange': function(event){
if (event.data === 0){ // Video has ended
console.log('video ended');
console.log(playerState.getCurrentVideoId());
console.log(lastVideo);
if(playerState.getCurrentVideoId() !== lastVideo){
// firebase changed before our playback ended so we play it right away.
console.log('not equal');
lastVideo = playerState.getCurrentVideoId();
scope.player.loadVideoById(lastVideo);
} else {
console.log('equal');
// player must wait for next video from server
console.log(playerState.getNextVideo());

playerState.getNextVideo().then(function(nextVideo){
console.log(nextVideo);
// video wait ended and new video is loaded
lastVideo = nextVideo.currentVideo;
scope.player.loadVideoById(lastVideo);
Expand All @@ -87,8 +79,6 @@ var module = angular.module('jetgrizzlyApp.Room', ['ui.router']).config(function
} else if (event.data === 3) {
// video is buffering

} else {
console.log(event.data);
}
}
}
Expand Down
3 changes: 0 additions & 3 deletions app/scripts/services/playerstate.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,10 @@ angular.module('jetgrizzlyApp')
.factory('playerState', function (config, $window, $q, $firebase, userRoom) {

var currentRoom = userRoom.getRoom();
console.log('current room: ' + currentRoom);
var youtubeRef = new $window.Firebase(config.firebase.url+'/rooms/'+currentRoom+'/youTube');
var currentVideoObject = {isPlaying:false,currentVideo:''};
// video change is deferred so that player plays next when appropiate
var deferredVideoChange = $q.defer();
console.log( deferredVideoChange );


// listen to value changes on firebase to resolve the promise when video changes
youtubeRef.on('value', function(snapshot){
Expand Down