Fix SVG favicons

This commit is contained in:
jeremy@jermolene.com 2020-05-10 11:58:40 +01:00
parent 34181230c7
commit bf6735420d
2 changed files with 3 additions and 7 deletions

View File

@ -36,11 +36,7 @@ function setFavicon() {
var tiddler = $tw.wiki.getTiddler(FAVICON_TITLE);
if(tiddler) {
var faviconLink = document.getElementById("faviconLink");
if(tiddler.fields._canonical_uri) {
faviconLink.setAttribute("href",tiddler.fields._canonical_uri);
} else {
faviconLink.setAttribute("href","data:" + tiddler.fields.type + ";base64," + tiddler.fields.text);
}
faviconLink.setAttribute("href",$tw.utils.makeDataUri(tiddler.fields.text,tiddler.fields.type,tiddler.fields._canonical_uri));
}
}

View File

@ -1,10 +1,10 @@
created: 20131224074240979
modified: 20200422163752597
modified: 20200510115704738
tags: [[Customise TiddlyWiki]]
title: Setting a favicon
type: text/vnd.tiddlywiki
"favicons" are small icons that most browsers display to help users identify websites.
"favicons" are small icons that most browsers display to help users identify websites. Note that all browsers support bitmap images, but only certain modern browsers support SVG format icons.
! favicons in the Browser