aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-05-06 17:37:42 -1000
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-05-06 17:37:42 -1000
commitbc37b05926f3b5acff7905748607f4f0da5ac14e (patch)
tree3a7abb29bb1787a2a6112330e59c62c46997436a
parentd81825f4b4da83bd0376ac916107f425872eee7b (diff)
downloadpatchfoo-bc37b05926f3b5acff7905748607f4f0da5ac14e.tar.gz
patchfoo-bc37b05926f3b5acff7905748607f4f0da5ac14e.zip
Put shortcut icon in correct place
-rw-r--r--lib/serve.js1
-rw-r--r--lib/util.js4
2 files changed, 2 insertions, 3 deletions
diff --git a/lib/serve.js b/lib/serve.js
index bce474c..d9cbfe7 100644
--- a/lib/serve.js
+++ b/lib/serve.js
@@ -987,6 +987,7 @@ Serve.prototype.wrapPage = function (title, searchQ) {
h('meta', {charset: 'utf-8'}),
h('title', title),
h('meta', {name: 'viewport', content: 'width=device-width,initial-scale=1'}),
+ h('link', {rel: 'icon', href: render.toUrl('/static/hermie.ico'), type: 'image/x-icon'}),
h('style', styles())
),
h('body',
diff --git a/lib/util.js b/lib/util.js
index 90fc55a..6a419f9 100644
--- a/lib/util.js
+++ b/lib/util.js
@@ -38,9 +38,7 @@ u.toHTML = function (el) {
if (typeof el === 'string' || Array.isArray(el)) {
return h('div', el).innerHTML
}
- var html = el.outerHTML || String(el)
- if (el.nodeName === 'html') html = '<!doctype html><link rel="icon" href="static/hermie.ico" type="image/x-icon"/>' + html + '\n'
- return html
+ return el.outerHTML || String(el)
}
u.hyperwrap = function (fn) {