Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #102 Add path as a setting property #103

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Tinycon can take a range of options to customize the look
* font: a css string to use for the fontface (recommended to leave this)
* color: the foreground font color
* background: the alert bubble background color
* path: path to the favicon file (default '/favicon.icon')
* 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

Expand All @@ -47,7 +48,8 @@ Tinycon.setOptions({
font: '10px arial',
color: '#ffffff',
background: '#549A2F',
fallback: true
fallback: true,
path: '/favicon.icon'
});
```

Expand All @@ -66,7 +68,8 @@ require([
font: '10px arial',
color: '#ffffff',
background: '#549A2F',
fallback: true
fallback: true,
path: '/favicon.icon'
});

T.setBubble(7);
Expand Down
5 changes: 3 additions & 2 deletions tinycon.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
background: '#F03D25',
fallback: true,
crossOrigin: true,
abbreviate: true
abbreviate: true,
path: '/favicon.ico'
};

var ua = (function () {
Expand Down Expand Up @@ -73,7 +74,7 @@

if (!originalFavicon || !currentFavicon) {
var tag = getFaviconTag();
currentFavicon = tag ? tag.getAttribute('href') : '/favicon.ico';
currentFavicon = tag ? tag.getAttribute('href') : options.path;
if (!originalFavicon) {
originalFavicon = currentFavicon;
}
Expand Down
3 changes: 1 addition & 2 deletions tinycon.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.