Roderic Day пре 5 година
родитељ
комит
b1329df046
2 измењених фајлова са 11 додато и 1 уклоњено
  1. +0
    -1
      pico.html
  2. +11
    -0
      pico.js

+ 0
- 1
pico.html Прегледај датотеку

<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<title>PicoChat!</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<script src="https://unpkg.com/mithril/mithril.min.js"></script> <script src="https://unpkg.com/mithril/mithril.min.js"></script>
<script src="/pico.js" defer></script> <script src="/pico.js" defer></script>

+ 11
- 0
pico.js Прегледај датотеку

listen('peerInfo', (e) => onPeerInfo(e)) listen('peerInfo', (e) => onPeerInfo(e))
const doNotLog = new Set(['login', 'post', 'peerInfo']) const doNotLog = new Set(['login', 'post', 'peerInfo'])


/*
*
* ALERTS
*
*/
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})` : ``)
}


/* /*
* *

Loading…
Откажи
Сачувај