From 4250f89ed3113016c0ae4315ace8769c2c8c9db6 Mon Sep 17 00:00:00 2001 From: tophf Date: Wed, 17 May 2017 01:09:31 +0300 Subject: [PATCH] Add favicons only in Firefox --- dom.js | 12 ++++++++++++ edit.html | 3 --- manage.html | 3 --- options/index.html | 3 --- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/dom.js b/dom.js index 598cd3f8..30d21779 100644 --- a/dom.js +++ b/dom.js @@ -11,6 +11,18 @@ for (const type of [NodeList, NamedNodeMap, HTMLCollection, HTMLAllCollection]) } } +// add favicon in Firefox +if (/Firefox/.test(navigator.userAgent)) { + for (const size of [128, 38, 32, 19, 16]) { + document.head.appendChild($element({ + tag: 'link', + rel: 'icon', + href: `/images/icon/${size}.png`, + sizes: size + 'x' + size, + })); + } +} + function onDOMready() { if (document.readyState != 'loading') { diff --git a/edit.html b/edit.html index d446f5a0..f64f31d2 100644 --- a/edit.html +++ b/edit.html @@ -1,9 +1,6 @@ - - - diff --git a/manage.html b/manage.html index b9f4f3f1..eb405e0a 100644 --- a/manage.html +++ b/manage.html @@ -3,9 +3,6 @@ - - - diff --git a/options/index.html b/options/index.html index 83601098..5812ddc3 100644 --- a/options/index.html +++ b/options/index.html @@ -3,9 +3,6 @@ Stylus - - -