Skip to content

Commit

Permalink
Added a timer event for true peekaboo support
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Persson committed Apr 22, 2016
1 parent 6b567be commit d7ce649
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion static/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,22 @@ app.config(['$routeProvider', function ($routeProvider) {
* Controls all other Pages
*/

app.controller('PageCtrl', ['$scope', '$route', 'Flash', function($scope, $route, Flash) {
app.controller('PageCtrl', ['$scope', '$route', 'Flash', '$interval', '$timeout', function($scope, $route, Flash, $interval, $timeout) {
console.log("Page Controller reporting for duty.");
Flash.clear();
$scope.activeTab = $route.current.activeTab;
$scope.sideActiveTab = $route.current.sideActiveTab;
$scope.logoImg = "peekaboo.svg"

$interval(function() {
$scope.logoImg = "peekaboo-open-hands.svg"

$timeout(function() {
$scope.logoImg = "peekaboo.svg"
}, Math.random() * 4000 + 1000);

}, Math.random() * 17000 + 3000);

} ]);

/*
Expand Down

0 comments on commit d7ce649

Please sign in to comment.