瀏覽代碼

Handle webkit

master
Roderic Day 5 年之前
父節點
當前提交
5b26f9a4fb
共有 1 個檔案被更改,包括 3 行新增2 行删除
  1. +3
    -2
      pico.js

+ 3
- 2
pico.js 查看文件

@@ -36,7 +36,7 @@ State.unseen = 0
listen('post', () => {State.unseen += !document.hasFocus(); updateTitle()})
listen('focus', () => {State.unseen = 0; updateTitle()})
const updateTitle = () => {
document.title = `Pico.Chat` + (State.unseen ? ` (${State.unseen})` : ``)
document.title = `pico.chat` + (State.unseen ? ` (${State.unseen})` : ``)
}

/*
@@ -120,7 +120,8 @@ const scrollIntoView = (vnode) => {
vnode.dom.scrollIntoView()
}
const toggleFullscreen = (el) => (event) => {
document.fullscreenElement ? document.exitFullscreen() : el.requestFullscreen()
const requestFullscreen = (el.requestFullscreen || el.webkitRequestFullscreen).bind(el)
document.fullscreenElement ? document.exitFullscreen() : requestFullscreen()
}
const prettyTime = (ts) => {
const dt = new Date(ts)

Loading…
取消
儲存