Hi Dimitry > For some obscure reason Firefox (32.0.3, Linux) doesn't show favicon in tab title in single-file mode when password is on. If there is no password set or if I use Chrome instead, everything works just fine.
I couldn't duplicate the problem with Firefox 34 on the Mac. I copied tiddlywiki.com/index.html and tiddlywiki.com/encrypted.html to a new folder and opened them both in Firefox. The favicon for index.html immediately appeared to the left of the tab label, while the favicon for encrypted.html showed as soon as I entered the password. > I fixed it by adding two lines to $:/core/modules/startup/favicon.js but I have almost no experience in web-programming so I'm not even sure if I did it correctly or whether it's firefox bug or tiddlywiki's. I wouldn't have expected your modification to have made any difference. The existing code is referencing a pre-existing <link> tag in the <head> section of the page template. Your modification just moves the link element to the end of the <head> section, which shouldn't affect how it works. Best wishes Jeremy On Thu, Dec 25, 2014 at 2:35 AM, Dmitriy Demin <[email protected]> wrote: > Hi > > For some obscure reason Firefox (32.0.3, Linux) doesn't show favicon in > tab title in single-file mode when password is on. If there is no password > set or if I use Chrome instead, everything works just fine. > > I fixed it by adding two lines to *$:/core/modules/startup/favicon.js* but > I have almost no experience in web-programming so I'm not even sure if I > did it correctly or whether it's firefox bug or tiddlywiki's. > > So here is modified *$:/core/modules/startup/favicon.js *: > > /*\ > title: $:/core/modules/startup/favicon.js > type: application/javascript > module-type: startup > > Favicon handling > > \*/ > (function(){ > > /*jslint node: true, browser: true */ > /*global $tw: false */ > "use strict"; > > // Export name and synchronous status > exports.name = "favicon"; > exports.platforms = ["browser"]; > exports.after = ["startup"]; > exports.synchronous = true; > > // Favicon tiddler > var FAVICON_TITLE = "$:/favicon.ico"; > > exports.startup = function() { > // Set up the favicon > setFavicon(); > // Reset the favicon when the tiddler changes > $tw.wiki.addEventListener("change",function(changes) { > if($tw.utils.hop(changes,FAVICON_TITLE)) { > setFavicon(); > } > }); > }; > > function setFavicon() { > var tiddler = $tw.wiki.getTiddler(FAVICON_TITLE); > if(tiddler) { > var faviconLink = document.getElementById("faviconLink"); > faviconLink.setAttribute("href","data:" + tiddler.fields.type + > ";base64," + tiddler.fields.text); > // Hotfix for Firefox > var docHead = document.getElementsByTagName('head')[0]; > docHead.appendChild(faviconLink); > } > } > > })(); > > > > -- > You received this message because you are subscribed to the Google Groups > "TiddlyWiki" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/tiddlywiki. > For more options, visit https://groups.google.com/d/optout. > -- Jeremy Ruston mailto:[email protected] -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/tiddlywiki. For more options, visit https://groups.google.com/d/optout.

