remove favico

doesn't make much sense in an app...
Lorenz Hübschle-Schneider 11 years ago
parent 20c00bde68
commit a22c8035f2
  1. 7
      3rdparty/favico-0.3.4-mod.min.js
  2. 11
      index.html
  3. 43
      js/glowingbear.js

File diff suppressed because one or more lines are too long

@ -29,7 +29,6 @@
<script type="text/javascript" src="js/models.js"></script> <script type="text/javascript" src="js/models.js"></script>
<script type="text/javascript" src="js/plugins.js"></script> <script type="text/javascript" src="js/plugins.js"></script>
<script type="text/javascript" src="3rdparty/bindonce.min.js"></script> <script type="text/javascript" src="3rdparty/bindonce.min.js"></script>
<script type="text/javascript" src="3rdparty/favico-0.3.4-mod.min.js"></script>
<script type="text/javascript" src="3rdparty/bootstrap.min.js"></script> <script type="text/javascript" src="3rdparty/bootstrap.min.js"></script>
<script type="text/javascript" src="cordova.js"></script> <script type="text/javascript" src="cordova.js"></script>
<script type="text/javascript" src="js/app.js"></script> <script type="text/javascript" src="js/app.js"></script>
@ -319,16 +318,6 @@ $ openssl req -nodes -newkey rsa:4096 -keyout relay.pem -x509 -days 365 -out rel
</div> </div>
</form> </form>
</li> </li>
<li>
<form class="form-inline" role="form">
<div class="checkbox">
<label>
<input type="checkbox" ng-model="useFavico">
Display unread count in favicon
</label>
</div>
</form>
</li>
<li> <li>
<form class="form-inline" role="form"> <form class="form-inline" role="form">
<div class="checkbox"> <div class="checkbox">

@ -647,7 +647,7 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
buffer.unread = 0; buffer.unread = 0;
buffer.notification = 0; buffer.notification = 0;
// Trigger title and favico update // Trigger title update
$rootScope.$emit('notificationChanged'); $rootScope.$emit('notificationChanged');
} }
@ -689,26 +689,6 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
} }
}; };
$scope.updateFavico = function() {
var notifications = $rootScope.unreadCount('notification');
if (notifications > 0) {
$scope.favico.badge(notifications, {
bgColor: '#d00',
textColor: '#fff'
});
} else {
var unread = $rootScope.unreadCount('unread');
if (unread === 0) {
$scope.favico.reset();
} else {
$scope.favico.badge(unread, {
bgColor: '#5CB85C',
textColor: '#ff0'
});
}
}
};
$rootScope.$on('activeBufferChanged', function(event, unreadSum) { $rootScope.$on('activeBufferChanged', function(event, unreadSum) {
var ab = models.getActiveBuffer(); var ab = models.getActiveBuffer();
@ -772,14 +752,8 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
} }
}); });
$scope.favico = new Favico({animation: 'none'});
$rootScope.$on('notificationChanged', function() { $rootScope.$on('notificationChanged', function() {
$rootScope.updateTitle(); $rootScope.updateTitle();
if ($scope.useFavico && $scope.favico) {
$scope.updateFavico();
}
}); });
$rootScope.$on('relayDisconnect', function() { $rootScope.$on('relayDisconnect', function() {
@ -846,8 +820,6 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
$store.bind($scope, "noembed", noembed); $store.bind($scope, "noembed", noembed);
// Save setting for channel ordering // Save setting for channel ordering
$store.bind($scope, "orderbyserver", false); $store.bind($scope, "orderbyserver", false);
// Save setting for updating favicon
$store.bind($scope, "useFavico", true);
// Save setting for showtimestamp // Save setting for showtimestamp
$store.bind($scope, "showtimestamp", showtimestamp); $store.bind($scope, "showtimestamp", showtimestamp);
// Save setting for playing sound on notification // Save setting for playing sound on notification
@ -888,18 +860,6 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
$rootScope.predicate = $scope.orderbyserver ? 'serverSortKey' : 'number'; $rootScope.predicate = $scope.orderbyserver ? 'serverSortKey' : 'number';
}); });
$scope.$watch('useFavico', function() {
// this check is necessary as this is called on page load, too
if (!$rootScope.connected) {
return;
}
if ($scope.useFavico) {
$scope.updateFavico();
} else {
$scope.favico.reset();
}
});
$scope.setActiveBuffer = function(bufferId, key) { $scope.setActiveBuffer = function(bufferId, key) {
// If we are on mobile we need to collapse the menu on sidebar clicks // If we are on mobile we need to collapse the menu on sidebar clicks
@ -1206,7 +1166,6 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
// Chrome requires us to set this or it will not show the dialog // Chrome requires us to set this or it will not show the dialog
event.returnValue = "You have an active connection to your WeeChat relay. Please disconnect using the button in the top-right corner or by double-tapping the Escape key."; event.returnValue = "You have an active connection to your WeeChat relay. Please disconnect using the button in the top-right corner or by double-tapping the Escape key.";
} }
$scope.favico.reset();
}; };
}] }]

Loading…
Cancel
Save