inleft
2022-02-09 9bcb19959eeb9da9bde2561e7278f6d0a55eb151
commit | author | age
9bcb19 1 export const setDocumentTitle = function (title) {
I 2   document.title = title
3   const ua = navigator.userAgent
4   // eslint-disable-next-line
5   const regex = /\bMicroMessenger\/([\d\.]+)/
6   if (regex.test(ua) && /ip(hone|od|ad)/i.test(ua)) {
7     const i = document.createElement('iframe')
8     i.src = '/favicon.ico'
9     i.style.display = 'none'
10     i.onload = function () {
11       setTimeout(function () {
12         i.remove()
13       }, 9)
14     }
15     document.body.appendChild(i)
16   }
17 }
18
19 export const domTitle = 'Snowy'