Barra de progreso de favicon animado-FavIconX
| Autor: | nicolasbize |
|---|---|
| Views Total: | 2,907 |
| Sitio oficial: | Ir a la web |
| Actualizado: | November 30, 2015 |
| Licencia: | MIT |
Vista prévia
Descripción
FavIconX es una biblioteca de JavaScript puro que muestra una barra de progreso animada y altamente personalizable como el favicon en la pestaña del navegador.
¿Cómo funciona?
Cargue la biblioteca de JavaScript de FavIconX en la parte inferior del documento para que las páginas se carguen más rápido.
<script src="faviconx.js"></script>
Crea una barra de progreso de favicon básica.
FavIconX.setValue(40); // 40%
Opciones de configuración con valores predeterminados.
FavIconX.config({
// 'circle' (default), 'doughnut', or 'square'
shape = 'circle';
// enable animation
animated = false;
// animation speed in ms
animationSpeed = 2000;
// animation callback
animCallback = null;
// border color
borderColor = '#3A70B1';
// border color at max value
borderColor2 = null;
// shadow color
shadowColor = 'rgba(255, 0, 0, 0)';
// border width
borderWidth = 1;
// fill color
fillColor = '#3A70B1';
// fill color at max value
fillColor2 = null;
// enable / disable title modifications
updateTitle = true;
// percentage value between 0 and 100
value = 0;
// used to configure how the tab title is rendered.
titleRenderer = function(val, title){
return '[' + val + '%] - ' + title;
};
}).setValue(Value, Animated, AnimationSpeed, Callback]); API pública.
// Returns the current value as displayed in the tab. // If the icon is currently being animated, it returns the intermediate value, not the destination value. FavIconX.getValue() // Resets the configuration to its default properties and recovers the initial favicon. FavIconX.reset() // Sets the favicon to a success check icon. // foreColor(optional) : the shape color (defaults to '#FFFFFF'). // backColor(optional) : the circle color (defaults to '#53C516'). FavIconX.complete([foreColor], [backColor]) // Sets the favicon to a failure cross icon. // foreColor(optional) : the shape color (defaults to '#FFFFFF'). // backColor(optional) : the circle color (defaults to '#F6491F'). FavIconX.fail([foreColor], [backColor])





