Tips: Add favicon.ico #63

Open
opened 2 months ago by xn--ck8h · 2 comments

If you normally use any hosting, just upload or deploy the favicon.ico along with the Feather Wiki .html file. (immediately below which the domain refers to)
But Tiddlyhost can only upload .html files, so we can't use this.

Add this to your "Custom JS". https://example.net.eu.org/favicon.ico is the favicon.ico to display.

var link = document.createElement('link');
link.rel = 'icon';
document.getElementsByTagName('head')[0].appendChild(link);
link.href = 'https://example.net.eu.org/favicon.ico';

or minify

var link=document.createElement("link");link.rel="icon",document.getElementsByTagName("head"[0].appendChild(link),link.href="https://example.net.eu.org/favicon.ico"

If you have JS code that can be implemented more simply, please comment it.

If you normally use any hosting, just upload or deploy the `favicon.ico` along with the Feather Wiki .html file. (immediately below which the domain refers to) But [Tiddlyhost](https://tiddlyhost.com/) can only upload .html files, so we can't use this. Add this to your "Custom JS". `https://example.net.eu.org/favicon.ico` is the favicon.ico to display. ``` var link = document.createElement('link'); link.rel = 'icon'; document.getElementsByTagName('head')[0].appendChild(link); link.href = 'https://example.net.eu.org/favicon.ico'; ``` or minify ``` var link=document.createElement("link");link.rel="icon",document.getElementsByTagName("head"[0].appendChild(link),link.href="https://example.net.eu.org/favicon.ico" ``` If you have JS code that can be implemented more simply, please comment it.
xn--ck8h added the
discussion
label 2 months ago
document.head.appendChild(window.html`<link rel="icon" href="https://example.net.eu.org/favicon.ico">`);

window.html comes fron nanohtml, which FeatherWiki depends on anyway.

```js document.head.appendChild(window.html`<link rel="icon" href="https://example.net.eu.org/favicon.ico">`); ``` `window.html` comes fron `nanohtml`, which FeatherWiki depends on anyway.
Poster

it's working. Good response comment.

it's working. Good response comment.
xn--ck8h changed title from tips: Add favicon.ico to Tips: Add favicon.ico 2 months ago
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Reference: Alamantus/FeatherWiki#63
Loading…
There is no content yet.