It turns out, nothing special is needed to make it work, just a couple of files in resources section and a piece of javascript added to dbscript.js.
Here is the path:
1. Create icon set with
https://realfavicongenerator.net/ . Adjust appearance of your favicon, in Favicon Generator Options, on Path tab, select "I cannot or I do not want to place favicon files at the root..." and type "res.aspx" in a box below. Selecting "The web site is already in production" on "Version/Refresh" tab may be useful as well. Generate favicons.
2. Download and unpack your favicon package (step 1) and upload its content to resource section of your database, marking all files as "public". Also, copy the code from step 3 of the results. Add ' (apostrophe) at the beginning of each line and '+ at the end.
3. Add the following code to your dbscript.js
(function ($) {
var head = $("head");
// remove elements set by TeamDesk
head.find('>link[rel=icon]').remove();
head.find('>link[rel="shortcut icon"]').remove();
head.find('>link[rel=apple-touch-icon]').remove();
head.find('>link[rel=manifest]').remove();
head.find('>link[rel=mask-icon]').remove();
head.find('>meta[name^=msapplication-]').remove();
head.append(
// Replace with the code made in previous step
'<link rel="apple-touch-icon" sizes="180x180" href="res.aspx/apple-touch-icon.png">'+
'<link rel="icon" type="image/png" sizes="32x32" href="res.aspx/favicon-32x32.png">'+
'<link rel="icon" type="image/png" sizes="16x16" href="res.aspx/favicon-16x16.png">'+
'<link rel="manifest" href="res.aspx/site.webmanifest">'+
'<link rel="mask-icon" href="res.aspx/safari-pinned-tab.svg" color="#5bbad5">'+
'<link rel="shortcut icon" href="res.aspx/favicon.ico">'+
'<meta name="msapplication-TileColor" content="#da532c">'+
'<meta name="msapplication-config" content="res.aspx/browserconfig.xml">'+
'<meta name="theme-color" content="#ffffff">'
);
})(jQuery);
That's it.