Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Doesn't work contains another "icon" string in link rel on Chrome. #36

Merged
merged 1 commit into from

3 participants

@ussy

Chrome couldn't update a favicon.
ex) <link rel="shortcut icon" ...

It seems that link tag wasn't remove.
Because removeFaviconTag method compare "icon".

removeFaviconTag method compare

links[i].getAttribute('rel') === 'icon'

But getFaviconTag method compare string as regex.
getFaviconTag method compare

(links[i].getAttribute('rel') || '').match(/\bicon\b/)
@tommoor
Owner

Thanks! This fix makes a lot of sense, i'll get this merged in,

@manuel-84

Please release this update, it's important

@tommoor tommoor merged commit 8db1eec into tommoor:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  tinycon.js
View
2  tinycon.js
@@ -62,7 +62,7 @@
for(var i=0, len=links.length; i < len; i++) {
var exists = (typeof(links[i]) !== 'undefined');
- if (exists && links[i].getAttribute('rel') === 'icon') {
+ if (exists && (links[i].getAttribute('rel') || '').match(/\bicon\b/)) {
head.removeChild(links[i]);
}
}
Something went wrong with that request. Please try again.