Permalink
Browse files

Merge pull request #12 from StyleShare/master

getFaviconTag now detects link elements with multiple rel attributes.
  • Loading branch information...
2 parents 3c916b0 + 3892bce commit 3888ff943f2e861122b23d4b64b989dee8f02cb0 Tom Moor committed Feb 13, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 tinycon.js
View
@@ -45,7 +45,7 @@
var links = document.getElementsByTagName('link');
for(var i=0, len=links.length; i < len; i++) {
- if (links[i].getAttribute('rel') === 'icon') {
+ if ((links[i].getAttribute('rel') || '').match(/\bicon\b/)) {
return links[i];
}
}

0 comments on commit 3888ff9

Please sign in to comment.