remove favico

doesn't make much sense in an app...
Lorenz Hübschle-Schneider 11 years ago
parent bde1bf0d85
commit 94a495ea79
  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

@ -28,7 +28,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>
</head> </head>
<body ng-controller="WeechatCtrl" ng-keydown="handleKeyPress($event)" ng-class="{'no-overflow': connected}"> <body ng-controller="WeechatCtrl" ng-keydown="handleKeyPress($event)" ng-class="{'no-overflow': connected}">
<div ng-hide="connected" class="container"> <div ng-hide="connected" class="container">
@ -367,16 +366,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">

@ -656,7 +656,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');
} }
@ -698,26 +698,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();
@ -790,14 +770,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() {
@ -857,8 +831,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", true); $store.bind($scope, "orderbyserver", true);
// 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 showing seconds on timestamps // Save setting for showing seconds on timestamps
@ -942,18 +914,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();
}
});
// Update font family when changed // Update font family when changed
$scope.$watch('fontfamily', function() { $scope.$watch('fontfamily', function() {
changeClassStyle('favorite-font', 'fontFamily', $scope.fontfamily); changeClassStyle('favorite-font', 'fontFamily', $scope.fontfamily);
@ -1259,7 +1219,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