This commit is contained in:
saiyan committed 2016-05-24 10:58:43 +02:00
1 parent 7833afec1f
commit 31a0666fdb
4 files changed
+65

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
{
"name": "saiyan/unread_favicon",
"type": "roundcube-plugin",
"license": "MIT",
"repositories": [
{
"type": "composer",
"url": "https://plugins.roundcube.net"
}
],
"require": {
"roundcube/plugin-installer": ">=0.1.3"
}
}
+7
View File
@@ -0,0 +1,7 @@
/**
* @license MIT
* @fileOverview Favico animations
* @author Miroslav Magda, http://blog.ejci.net
* @version 0.3.10
*/
!function(){var e=function(e){"use strict";function t(e){if(e.paused||e.ended||g)return!1;try{f.clearRect(0,0,s,l),f.drawImage(e,0,0,s,l)}catch(o){}p=setTimeout(function(){t(e)},S.duration),O.setIcon(h)}function o(e){var t=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;e=e.replace(t,function(e,t,o,n){return t+t+o+o+n+n});var o=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return o?{r:parseInt(o[1],16),g:parseInt(o[2],16),b:parseInt(o[3],16)}:!1}function n(e,t){var o,n={};for(o in e)n[o]=e[o];for(o inLine truncated
+22
View File
@@ -0,0 +1,22 @@
function updateFavicon(){
var count = 0;
$('.unreadcount').each(function(){
var c = parseInt($(this).text());
if(c && !isNaN(c)){
count += c;
}
});
if(count !== last)
favicon.badge(count);
}
/*****************************/
var last = -1;
var favicon=new Favico({
animation:'pop'
});
window.setInterval(updateFavicon, 10000);
+22
View File
@@ -0,0 +1,22 @@
<?php
/**
* Unread Favivon
*
* Shows the number of unread Emails inside the favicon
*
* @version 1.0
* @author Christian Sucker
* @url http://roundcube.net/plugins/unread_favicon
*/
class unread_favicon extends rcube_plugin
{
public $task = 'mail';
private $map;
function init()
{
$this->include_script('favico-0.3.10.min.js');
$this->include_script('unread_favicon.js');
}
}