webXMPP

Check-in [7f4bafda00]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add an explicit button to re-sync with server, when you're not sure (and it saves the full cost of a screen repaint).
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256:7f4bafda00722994dcfca6cd22fefcbd64e0aa0436d145660c4bd4ab492aa15e
User & Date: ajv-899-334-8894@vsta.org 2017-07-25 04:21:38
Context
2018-01-18
00:29
Deal with peers which are online/registered, but not pushing status. We should still see that they're online, as distinct from a peer who is entirely disconnected from XMPP. check-in: 848935f105 user: ajv-899-334-8894@vsta.org tags: master, trunk
2017-07-25
04:21
Add an explicit button to re-sync with server, when you're not sure (and it saves the full cost of a screen repaint). check-in: 7f4bafda00 user: ajv-899-334-8894@vsta.org tags: master, trunk
01:58
Add some support for Chromium with nullified functions (for Chromium engine on Ubuntu Touch) check-in: 2179aad7b2 user: ajv-899-334-8894@vsta.org tags: master, trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to html/xmpp.html.

11
12
13
14
15
16
17

18
19
20
21
22
23
24
  <form>
   <select id="ourDests">
    <option value="--" selected>--</option>
   </select>
   <input type="text" id="ourSend" name="message">
   <input type="submit" onclick="return doSend();"
    name = "send" value="Send">

  </form>

 <script src="/js/ui.js"></script>
 <script src="/js/polling.js"></script>

</body>
</html>







>







11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
  <form>
   <select id="ourDests">
    <option value="--" selected>--</option>
   </select>
   <input type="text" id="ourSend" name="message">
   <input type="submit" onclick="return doSend();"
    name = "send" value="Send">
   <button type="button" onclick="return doPoll();">Poll</button>
  </form>

 <script src="/js/ui.js"></script>
 <script src="/js/polling.js"></script>

</body>
</html>

Changes to html/xmpp_fcm.html.

11
12
13
14
15
16
17

18
19
20
21
22
23
24
25
26
27
  <form>
   <select id="ourDests">
    <option value="--" selected>--</option>
   </select>
   <input type="text" id="ourSend" name="message">
   <input type="submit" onclick="return doSend();"
    name = "send" value="Send">

  </form>

 <script src="/js/ui.js"></script>

 <script src="https://www.gstatic.com/firebasejs/3.7.8/firebase.js"></script>
 <script src="/js/fcm.js"></script>

 </body>
</html>








>










11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
  <form>
   <select id="ourDests">
    <option value="--" selected>--</option>
   </select>
   <input type="text" id="ourSend" name="message">
   <input type="submit" onclick="return doSend();"
    name = "send" value="Send">
   <button type="button" onclick="return doPoll();">Poll</button>
  </form>

 <script src="/js/ui.js"></script>

 <script src="https://www.gstatic.com/firebasejs/3.7.8/firebase.js"></script>
 <script src="/js/fcm.js"></script>

 </body>
</html>

Changes to js/ui.js.

382
383
384
385
386
387
388









389
390
391
392
393
394
395
    rxTO = setTimeout(
	function() { rxTO = null; moreMessages(); },
	RX_TIMEOUT);

    // Network error state
    ourState = 4;
}










// Ask for more messages
function moreMessages() {

    // Only one, please
    if (curReq != null) {
	return;







>
>
>
>
>
>
>
>
>







382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
    rxTO = setTimeout(
	function() { rxTO = null; moreMessages(); },
	RX_TIMEOUT);

    // Network error state
    ourState = 4;
}

// Manual request for us to start long polling for new messages
// Shouldn't be needed, but some browser ports don't do a fully
//  reliable expose/hide event treatment.
function doPoll() {
    goOffline();
    goOnline();
    return false;
}

// Ask for more messages
function moreMessages() {

    // Only one, please
    if (curReq != null) {
	return;