Permalink
Browse files

Made getFaviconTag() more accurate.

The `rel` attribute can consist of space-separated multiple values.
  • Loading branch information...
1 parent 3c916b0 commit 3892bce4f2fa228ecf591e0824a73a0900f00e89 @dahlia dahlia committed Feb 12, 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 3892bce

Please sign in to comment.