tinycon-0.6.5/ 0000775 0000000 0000000 00000000000 12702236474 0013214 5 ustar 00root root 0000000 0000000 tinycon-0.6.5/.gitignore 0000664 0000000 0000000 00000000030 12702236474 0015175 0 ustar 00root root 0000000 0000000 .DS_Store
node_modules/
tinycon-0.6.5/Gruntfile.js 0000664 0000000 0000000 00000000443 12702236474 0015512 0 ustar 00root root 0000000 0000000 module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.initConfig({
uglify: {
all: {
options: {
preserveComments: 'some'
},
files: {
'tinycon.min.js': ['tinycon.js']
}
},
},
});
}; tinycon-0.6.5/LICENSE 0000664 0000000 0000000 00000002034 12702236474 0014220 0 ustar 00root root 0000000 0000000 Copyright (c) 2015 Tom Moor
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
tinycon-0.6.5/README.md 0000664 0000000 0000000 00000005026 12702236474 0014476 0 ustar 00root root 0000000 0000000 # Tinycon
A small library for manipulating the favicon, in particular adding alert bubbles and changing images. Tinycon gracefully falls back to a number in title approach for browsers that don't support canvas or dynamic favicons.
See the Live Demo here.
## Documentation
Tinycon adds a single object to the global namespace and does not require initialisation.
### Installation
There are several versions of Tinycon published on NPM, unfortunately they are not controlled by me and do not track HEAD. The best idea is to install from github
directly and cut out the middleman!
```
npm install tommoor/tinycon --save
```
### Basic Usage
```javascript
Tinycon.setBubble(6);
```
### Options
Tinycon can take a range of options to customise the look
* width: the width of the alert bubble
* height: the height of the alert bubble
* font: a css string to use for the fontface (recommended to leave this)
* color: the foreground font color
* background: the alert bubble background color
* fallback: should we fallback to a number in brackets for browsers that don't support canvas/dynamic favicons? Boolean, or use the string 'force' to ensure a title update even in supported browsers.
* abbreviate: should tinycon shrink large numbers such as 1000 to an abbreviated version (1k). Boolean, defaults to true
```javascript
Tinycon.setOptions({
width: 7,
height: 9,
font: '10px arial',
color: '#ffffff',
background: '#549A2F',
fallback: true
});
```
### AMD support
Tinycon can also be used as an asynchronous module.
```javascript
require([
'tinycon.js'
], function (T) {
T.setOptions({
width: 7,
height: 9,
font: '10px arial',
color: '#ffffff',
background: '#549A2F',
fallback: true
});
T.setBubble(7);
});
```
## Browser Support
Tinycon has been tested to work completely in the following browsers. Older versions may be supported, but haven't been tested:
* Chrome 15+
* Firefox 9+
* Opera 11+
Currently the library degrades to title update:
* Internet Explorer 9
* Safari 5
## License / Credits
Tinycon is released under the MIT license. It is simple and easy to understand and places almost no restrictions on what you can do with Tinycon.
[More Information](http://en.wikipedia.org/wiki/MIT_License)
Tinycon was inspired by [Notificon](https://github.com/makeable/Notificon)
## Download
Releases are available for download from
[GitHub](http://github.com/tommoor/tinycon/downloads).
tinycon-0.6.5/examples/ 0000775 0000000 0000000 00000000000 12702236474 0015032 5 ustar 00root root 0000000 0000000 tinycon-0.6.5/examples/favicon.ico 0000664 0000000 0000000 00000002176 12702236474 0017161 0 ustar 00root root 0000000 0000000 h ( @ 3 3 ] ] l i 9 Z Z ` ] x <