Skip to content

Commit

Permalink
Merge pull request tommoor#76 from waschmittel/patch-1
Browse files Browse the repository at this point in the history
Restore the original Favicon on reset
  • Loading branch information
tommoor committed Apr 9, 2016
2 parents 340c048 + fbecd43 commit dc92c1f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tinycon.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@

if (!originalFavicon || !currentFavicon) {
var tag = getFaviconTag();
originalFavicon = currentFavicon = tag ? tag.getAttribute('href') : '/favicon.ico';
currentFavicon = tag ? tag.getAttribute('href') : '/favicon.ico';
if (!originalFavicon) {
originalFavicon = currentFavicon;
}
}

return currentFavicon;
Expand Down Expand Up @@ -268,6 +271,7 @@
};

Tinycon.reset = function(){
currentFavicon = originalFavicon;
setFaviconTag(originalFavicon);
};

Expand Down

0 comments on commit dc92c1f

Please sign in to comment.